/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
export const UpdateResourceStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
export const UpdateResourceRole = {
    Primary: "primary",
    Secondary: "secondary",
};
export const UpdateResourceImportance = {
    Primary: "primary",
    Secondary: "secondary",
};
/** @internal */
export const UpdateResourceStatus$inboundSchema = z.nativeEnum(UpdateResourceStatus);
/** @internal */
export const UpdateResourceStatus$outboundSchema = UpdateResourceStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var UpdateResourceStatus$;
(function (UpdateResourceStatus$) {
    /** @deprecated use `UpdateResourceStatus$inboundSchema` instead. */
    UpdateResourceStatus$.inboundSchema = UpdateResourceStatus$inboundSchema;
    /** @deprecated use `UpdateResourceStatus$outboundSchema` instead. */
    UpdateResourceStatus$.outboundSchema = UpdateResourceStatus$outboundSchema;
})(UpdateResourceStatus$ || (UpdateResourceStatus$ = {}));
/** @internal */
export const UpdateResourceRole$inboundSchema = z.nativeEnum(UpdateResourceRole);
/** @internal */
export const UpdateResourceRole$outboundSchema = UpdateResourceRole$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var UpdateResourceRole$;
(function (UpdateResourceRole$) {
    /** @deprecated use `UpdateResourceRole$inboundSchema` instead. */
    UpdateResourceRole$.inboundSchema = UpdateResourceRole$inboundSchema;
    /** @deprecated use `UpdateResourceRole$outboundSchema` instead. */
    UpdateResourceRole$.outboundSchema = UpdateResourceRole$outboundSchema;
})(UpdateResourceRole$ || (UpdateResourceRole$ = {}));
/** @internal */
export const UpdateResourceImportance$inboundSchema = z.nativeEnum(UpdateResourceImportance);
/** @internal */
export const UpdateResourceImportance$outboundSchema = UpdateResourceImportance$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var UpdateResourceImportance$;
(function (UpdateResourceImportance$) {
    /** @deprecated use `UpdateResourceImportance$inboundSchema` instead. */
    UpdateResourceImportance$.inboundSchema = UpdateResourceImportance$inboundSchema;
    /** @deprecated use `UpdateResourceImportance$outboundSchema` instead. */
    UpdateResourceImportance$.outboundSchema = UpdateResourceImportance$outboundSchema;
})(UpdateResourceImportance$ || (UpdateResourceImportance$ = {}));
/** @internal */
export const UpdateResourceResource$inboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: UpdateResourceStatus$inboundSchema.optional(),
    dateLastModified: z.string().datetime({ offset: true }).transform(v => new Date(v)).optional(),
    metadata: z.nullable(z.record(z.any())).optional(),
    title: z.string(),
    roles: z.array(UpdateResourceRole$inboundSchema).optional(),
    importance: UpdateResourceImportance$inboundSchema.optional(),
    vendorResourceId: z.string(),
    vendorId: z.string().optional(),
    applicationId: z.string().optional(),
});
/** @internal */
export const UpdateResourceResource$outboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: UpdateResourceStatus$outboundSchema.optional(),
    dateLastModified: z.date().transform(v => v.toISOString()).optional(),
    metadata: z.nullable(z.record(z.any())).optional(),
    title: z.string(),
    roles: z.array(UpdateResourceRole$outboundSchema).optional(),
    importance: UpdateResourceImportance$outboundSchema.optional(),
    vendorResourceId: z.string(),
    vendorId: z.string().optional(),
    applicationId: z.string().optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var UpdateResourceResource$;
(function (UpdateResourceResource$) {
    /** @deprecated use `UpdateResourceResource$inboundSchema` instead. */
    UpdateResourceResource$.inboundSchema = UpdateResourceResource$inboundSchema;
    /** @deprecated use `UpdateResourceResource$outboundSchema` instead. */
    UpdateResourceResource$.outboundSchema = UpdateResourceResource$outboundSchema;
})(UpdateResourceResource$ || (UpdateResourceResource$ = {}));
export function updateResourceResourceToJSON(updateResourceResource) {
    return JSON.stringify(UpdateResourceResource$outboundSchema.parse(updateResourceResource));
}
export function updateResourceResourceFromJSON(jsonString) {
    return safeParse(jsonString, (x) => UpdateResourceResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateResourceResource' from JSON`);
}
/** @internal */
export const UpdateResourceRequestBody$inboundSchema = z.object({
    resource: z.lazy(() => UpdateResourceResource$inboundSchema),
});
/** @internal */
export const UpdateResourceRequestBody$outboundSchema = z.object({
    resource: z.lazy(() => UpdateResourceResource$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var UpdateResourceRequestBody$;
(function (UpdateResourceRequestBody$) {
    /** @deprecated use `UpdateResourceRequestBody$inboundSchema` instead. */
    UpdateResourceRequestBody$.inboundSchema = UpdateResourceRequestBody$inboundSchema;
    /** @deprecated use `UpdateResourceRequestBody$outboundSchema` instead. */
    UpdateResourceRequestBody$.outboundSchema = UpdateResourceRequestBody$outboundSchema;
})(UpdateResourceRequestBody$ || (UpdateResourceRequestBody$ = {}));
export function updateResourceRequestBodyToJSON(updateResourceRequestBody) {
    return JSON.stringify(UpdateResourceRequestBody$outboundSchema.parse(updateResourceRequestBody));
}
export function updateResourceRequestBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => UpdateResourceRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateResourceRequestBody' from JSON`);
}
/** @internal */
export const UpdateResourceRequest$inboundSchema = z.object({
    sourcedId: z.string(),
    RequestBody: z.lazy(() => UpdateResourceRequestBody$inboundSchema),
}).transform((v) => {
    return remap$(v, {
        "RequestBody": "requestBody",
    });
});
/** @internal */
export const UpdateResourceRequest$outboundSchema = z.object({
    sourcedId: z.string(),
    requestBody: z.lazy(() => UpdateResourceRequestBody$outboundSchema),
}).transform((v) => {
    return remap$(v, {
        requestBody: "RequestBody",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var UpdateResourceRequest$;
(function (UpdateResourceRequest$) {
    /** @deprecated use `UpdateResourceRequest$inboundSchema` instead. */
    UpdateResourceRequest$.inboundSchema = UpdateResourceRequest$inboundSchema;
    /** @deprecated use `UpdateResourceRequest$outboundSchema` instead. */
    UpdateResourceRequest$.outboundSchema = UpdateResourceRequest$outboundSchema;
})(UpdateResourceRequest$ || (UpdateResourceRequest$ = {}));
export function updateResourceRequestToJSON(updateResourceRequest) {
    return JSON.stringify(UpdateResourceRequest$outboundSchema.parse(updateResourceRequest));
}
export function updateResourceRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => UpdateResourceRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateResourceRequest' from JSON`);
}
//# sourceMappingURL=updateresource.js.map