/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../../lib/schemas.js";
export const CreateResourceStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
export const CreateResourceRole = {
    Primary: "primary",
    Secondary: "secondary",
};
export const CreateResourceImportance = {
    Primary: "primary",
    Secondary: "secondary",
};
/** @internal */
export const CreateResourceStatus$inboundSchema = z.nativeEnum(CreateResourceStatus);
/** @internal */
export const CreateResourceStatus$outboundSchema = CreateResourceStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateResourceStatus$;
(function (CreateResourceStatus$) {
    /** @deprecated use `CreateResourceStatus$inboundSchema` instead. */
    CreateResourceStatus$.inboundSchema = CreateResourceStatus$inboundSchema;
    /** @deprecated use `CreateResourceStatus$outboundSchema` instead. */
    CreateResourceStatus$.outboundSchema = CreateResourceStatus$outboundSchema;
})(CreateResourceStatus$ || (CreateResourceStatus$ = {}));
/** @internal */
export const CreateResourceRole$inboundSchema = z.nativeEnum(CreateResourceRole);
/** @internal */
export const CreateResourceRole$outboundSchema = CreateResourceRole$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateResourceRole$;
(function (CreateResourceRole$) {
    /** @deprecated use `CreateResourceRole$inboundSchema` instead. */
    CreateResourceRole$.inboundSchema = CreateResourceRole$inboundSchema;
    /** @deprecated use `CreateResourceRole$outboundSchema` instead. */
    CreateResourceRole$.outboundSchema = CreateResourceRole$outboundSchema;
})(CreateResourceRole$ || (CreateResourceRole$ = {}));
/** @internal */
export const CreateResourceImportance$inboundSchema = z.nativeEnum(CreateResourceImportance);
/** @internal */
export const CreateResourceImportance$outboundSchema = CreateResourceImportance$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateResourceImportance$;
(function (CreateResourceImportance$) {
    /** @deprecated use `CreateResourceImportance$inboundSchema` instead. */
    CreateResourceImportance$.inboundSchema = CreateResourceImportance$inboundSchema;
    /** @deprecated use `CreateResourceImportance$outboundSchema` instead. */
    CreateResourceImportance$.outboundSchema = CreateResourceImportance$outboundSchema;
})(CreateResourceImportance$ || (CreateResourceImportance$ = {}));
/** @internal */
export const CreateResourceResource$inboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: CreateResourceStatus$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(CreateResourceRole$inboundSchema).optional(),
    importance: CreateResourceImportance$inboundSchema.optional(),
    vendorResourceId: z.string(),
    vendorId: z.string().optional(),
    applicationId: z.string().optional(),
});
/** @internal */
export const CreateResourceResource$outboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: CreateResourceStatus$outboundSchema.optional(),
    dateLastModified: z.date().transform(v => v.toISOString()).optional(),
    metadata: z.nullable(z.record(z.any())).optional(),
    title: z.string(),
    roles: z.array(CreateResourceRole$outboundSchema).optional(),
    importance: CreateResourceImportance$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 CreateResourceResource$;
(function (CreateResourceResource$) {
    /** @deprecated use `CreateResourceResource$inboundSchema` instead. */
    CreateResourceResource$.inboundSchema = CreateResourceResource$inboundSchema;
    /** @deprecated use `CreateResourceResource$outboundSchema` instead. */
    CreateResourceResource$.outboundSchema = CreateResourceResource$outboundSchema;
})(CreateResourceResource$ || (CreateResourceResource$ = {}));
export function createResourceResourceToJSON(createResourceResource) {
    return JSON.stringify(CreateResourceResource$outboundSchema.parse(createResourceResource));
}
export function createResourceResourceFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateResourceResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateResourceResource' from JSON`);
}
/** @internal */
export const CreateResourceRequest$inboundSchema = z.object({
    resource: z.lazy(() => CreateResourceResource$inboundSchema),
});
/** @internal */
export const CreateResourceRequest$outboundSchema = z.object({
    resource: z.lazy(() => CreateResourceResource$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateResourceRequest$;
(function (CreateResourceRequest$) {
    /** @deprecated use `CreateResourceRequest$inboundSchema` instead. */
    CreateResourceRequest$.inboundSchema = CreateResourceRequest$inboundSchema;
    /** @deprecated use `CreateResourceRequest$outboundSchema` instead. */
    CreateResourceRequest$.outboundSchema = CreateResourceRequest$outboundSchema;
})(CreateResourceRequest$ || (CreateResourceRequest$ = {}));
export function createResourceRequestToJSON(createResourceRequest) {
    return JSON.stringify(CreateResourceRequest$outboundSchema.parse(createResourceRequest));
}
export function createResourceRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateResourceRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateResourceRequest' from JSON`);
}
/** @internal */
export const CreateResourceSourcedIdPairs$inboundSchema = z.object({
    suppliedSourcedId: z.string(),
    allocatedSourcedId: z.string(),
});
/** @internal */
export const CreateResourceSourcedIdPairs$outboundSchema = z.object({
    suppliedSourcedId: z.string(),
    allocatedSourcedId: z.string(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateResourceSourcedIdPairs$;
(function (CreateResourceSourcedIdPairs$) {
    /** @deprecated use `CreateResourceSourcedIdPairs$inboundSchema` instead. */
    CreateResourceSourcedIdPairs$.inboundSchema = CreateResourceSourcedIdPairs$inboundSchema;
    /** @deprecated use `CreateResourceSourcedIdPairs$outboundSchema` instead. */
    CreateResourceSourcedIdPairs$.outboundSchema = CreateResourceSourcedIdPairs$outboundSchema;
})(CreateResourceSourcedIdPairs$ || (CreateResourceSourcedIdPairs$ = {}));
export function createResourceSourcedIdPairsToJSON(createResourceSourcedIdPairs) {
    return JSON.stringify(CreateResourceSourcedIdPairs$outboundSchema.parse(createResourceSourcedIdPairs));
}
export function createResourceSourcedIdPairsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateResourceSourcedIdPairs$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateResourceSourcedIdPairs' from JSON`);
}
/** @internal */
export const CreateResourceResponse$inboundSchema = z.object({
    sourcedIdPairs: z.lazy(() => CreateResourceSourcedIdPairs$inboundSchema),
});
/** @internal */
export const CreateResourceResponse$outboundSchema = z.object({
    sourcedIdPairs: z.lazy(() => CreateResourceSourcedIdPairs$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateResourceResponse$;
(function (CreateResourceResponse$) {
    /** @deprecated use `CreateResourceResponse$inboundSchema` instead. */
    CreateResourceResponse$.inboundSchema = CreateResourceResponse$inboundSchema;
    /** @deprecated use `CreateResourceResponse$outboundSchema` instead. */
    CreateResourceResponse$.outboundSchema = CreateResourceResponse$outboundSchema;
})(CreateResourceResponse$ || (CreateResourceResponse$ = {}));
export function createResourceResponseToJSON(createResourceResponse) {
    return JSON.stringify(CreateResourceResponse$outboundSchema.parse(createResourceResponse));
}
export function createResourceResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateResourceResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateResourceResponse' from JSON`);
}
//# sourceMappingURL=createresource.js.map