"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.CreateResourceResponse$ = exports.CreateResourceResponse$outboundSchema = exports.CreateResourceResponse$inboundSchema = exports.CreateResourceSourcedIdPairs$ = exports.CreateResourceSourcedIdPairs$outboundSchema = exports.CreateResourceSourcedIdPairs$inboundSchema = exports.CreateResourceRequest$ = exports.CreateResourceRequest$outboundSchema = exports.CreateResourceRequest$inboundSchema = exports.CreateResourceResource$ = exports.CreateResourceResource$outboundSchema = exports.CreateResourceResource$inboundSchema = exports.CreateResourceImportance$ = exports.CreateResourceImportance$outboundSchema = exports.CreateResourceImportance$inboundSchema = exports.CreateResourceRole$ = exports.CreateResourceRole$outboundSchema = exports.CreateResourceRole$inboundSchema = exports.CreateResourceStatus$ = exports.CreateResourceStatus$outboundSchema = exports.CreateResourceStatus$inboundSchema = exports.CreateResourceImportance = exports.CreateResourceRole = exports.CreateResourceStatus = void 0;
exports.createResourceResourceToJSON = createResourceResourceToJSON;
exports.createResourceResourceFromJSON = createResourceResourceFromJSON;
exports.createResourceRequestToJSON = createResourceRequestToJSON;
exports.createResourceRequestFromJSON = createResourceRequestFromJSON;
exports.createResourceSourcedIdPairsToJSON = createResourceSourcedIdPairsToJSON;
exports.createResourceSourcedIdPairsFromJSON = createResourceSourcedIdPairsFromJSON;
exports.createResourceResponseToJSON = createResourceResponseToJSON;
exports.createResourceResponseFromJSON = createResourceResponseFromJSON;
const z = __importStar(require("zod"));
const schemas_js_1 = require("../../lib/schemas.js");
exports.CreateResourceStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
exports.CreateResourceRole = {
    Primary: "primary",
    Secondary: "secondary",
};
exports.CreateResourceImportance = {
    Primary: "primary",
    Secondary: "secondary",
};
/** @internal */
exports.CreateResourceStatus$inboundSchema = z.nativeEnum(exports.CreateResourceStatus);
/** @internal */
exports.CreateResourceStatus$outboundSchema = exports.CreateResourceStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CreateResourceStatus$;
(function (CreateResourceStatus$) {
    /** @deprecated use `CreateResourceStatus$inboundSchema` instead. */
    CreateResourceStatus$.inboundSchema = exports.CreateResourceStatus$inboundSchema;
    /** @deprecated use `CreateResourceStatus$outboundSchema` instead. */
    CreateResourceStatus$.outboundSchema = exports.CreateResourceStatus$outboundSchema;
})(CreateResourceStatus$ || (exports.CreateResourceStatus$ = CreateResourceStatus$ = {}));
/** @internal */
exports.CreateResourceRole$inboundSchema = z.nativeEnum(exports.CreateResourceRole);
/** @internal */
exports.CreateResourceRole$outboundSchema = exports.CreateResourceRole$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CreateResourceRole$;
(function (CreateResourceRole$) {
    /** @deprecated use `CreateResourceRole$inboundSchema` instead. */
    CreateResourceRole$.inboundSchema = exports.CreateResourceRole$inboundSchema;
    /** @deprecated use `CreateResourceRole$outboundSchema` instead. */
    CreateResourceRole$.outboundSchema = exports.CreateResourceRole$outboundSchema;
})(CreateResourceRole$ || (exports.CreateResourceRole$ = CreateResourceRole$ = {}));
/** @internal */
exports.CreateResourceImportance$inboundSchema = z.nativeEnum(exports.CreateResourceImportance);
/** @internal */
exports.CreateResourceImportance$outboundSchema = exports.CreateResourceImportance$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CreateResourceImportance$;
(function (CreateResourceImportance$) {
    /** @deprecated use `CreateResourceImportance$inboundSchema` instead. */
    CreateResourceImportance$.inboundSchema = exports.CreateResourceImportance$inboundSchema;
    /** @deprecated use `CreateResourceImportance$outboundSchema` instead. */
    CreateResourceImportance$.outboundSchema = exports.CreateResourceImportance$outboundSchema;
})(CreateResourceImportance$ || (exports.CreateResourceImportance$ = CreateResourceImportance$ = {}));
/** @internal */
exports.CreateResourceResource$inboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: exports.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(exports.CreateResourceRole$inboundSchema).optional(),
    importance: exports.CreateResourceImportance$inboundSchema.optional(),
    vendorResourceId: z.string(),
    vendorId: z.string().optional(),
    applicationId: z.string().optional(),
});
/** @internal */
exports.CreateResourceResource$outboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: exports.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(exports.CreateResourceRole$outboundSchema).optional(),
    importance: exports.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.
 */
var CreateResourceResource$;
(function (CreateResourceResource$) {
    /** @deprecated use `CreateResourceResource$inboundSchema` instead. */
    CreateResourceResource$.inboundSchema = exports.CreateResourceResource$inboundSchema;
    /** @deprecated use `CreateResourceResource$outboundSchema` instead. */
    CreateResourceResource$.outboundSchema = exports.CreateResourceResource$outboundSchema;
})(CreateResourceResource$ || (exports.CreateResourceResource$ = CreateResourceResource$ = {}));
function createResourceResourceToJSON(createResourceResource) {
    return JSON.stringify(exports.CreateResourceResource$outboundSchema.parse(createResourceResource));
}
function createResourceResourceFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateResourceResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateResourceResource' from JSON`);
}
/** @internal */
exports.CreateResourceRequest$inboundSchema = z.object({
    resource: z.lazy(() => exports.CreateResourceResource$inboundSchema),
});
/** @internal */
exports.CreateResourceRequest$outboundSchema = z.object({
    resource: z.lazy(() => exports.CreateResourceResource$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CreateResourceRequest$;
(function (CreateResourceRequest$) {
    /** @deprecated use `CreateResourceRequest$inboundSchema` instead. */
    CreateResourceRequest$.inboundSchema = exports.CreateResourceRequest$inboundSchema;
    /** @deprecated use `CreateResourceRequest$outboundSchema` instead. */
    CreateResourceRequest$.outboundSchema = exports.CreateResourceRequest$outboundSchema;
})(CreateResourceRequest$ || (exports.CreateResourceRequest$ = CreateResourceRequest$ = {}));
function createResourceRequestToJSON(createResourceRequest) {
    return JSON.stringify(exports.CreateResourceRequest$outboundSchema.parse(createResourceRequest));
}
function createResourceRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateResourceRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateResourceRequest' from JSON`);
}
/** @internal */
exports.CreateResourceSourcedIdPairs$inboundSchema = z.object({
    suppliedSourcedId: z.string(),
    allocatedSourcedId: z.string(),
});
/** @internal */
exports.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.
 */
var CreateResourceSourcedIdPairs$;
(function (CreateResourceSourcedIdPairs$) {
    /** @deprecated use `CreateResourceSourcedIdPairs$inboundSchema` instead. */
    CreateResourceSourcedIdPairs$.inboundSchema = exports.CreateResourceSourcedIdPairs$inboundSchema;
    /** @deprecated use `CreateResourceSourcedIdPairs$outboundSchema` instead. */
    CreateResourceSourcedIdPairs$.outboundSchema = exports.CreateResourceSourcedIdPairs$outboundSchema;
})(CreateResourceSourcedIdPairs$ || (exports.CreateResourceSourcedIdPairs$ = CreateResourceSourcedIdPairs$ = {}));
function createResourceSourcedIdPairsToJSON(createResourceSourcedIdPairs) {
    return JSON.stringify(exports.CreateResourceSourcedIdPairs$outboundSchema.parse(createResourceSourcedIdPairs));
}
function createResourceSourcedIdPairsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateResourceSourcedIdPairs$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateResourceSourcedIdPairs' from JSON`);
}
/** @internal */
exports.CreateResourceResponse$inboundSchema = z.object({
    sourcedIdPairs: z.lazy(() => exports.CreateResourceSourcedIdPairs$inboundSchema),
});
/** @internal */
exports.CreateResourceResponse$outboundSchema = z.object({
    sourcedIdPairs: z.lazy(() => exports.CreateResourceSourcedIdPairs$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CreateResourceResponse$;
(function (CreateResourceResponse$) {
    /** @deprecated use `CreateResourceResponse$inboundSchema` instead. */
    CreateResourceResponse$.inboundSchema = exports.CreateResourceResponse$inboundSchema;
    /** @deprecated use `CreateResourceResponse$outboundSchema` instead. */
    CreateResourceResponse$.outboundSchema = exports.CreateResourceResponse$outboundSchema;
})(CreateResourceResponse$ || (exports.CreateResourceResponse$ = CreateResourceResponse$ = {}));
function createResourceResponseToJSON(createResourceResponse) {
    return JSON.stringify(exports.CreateResourceResponse$outboundSchema.parse(createResourceResponse));
}
function createResourceResponseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateResourceResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateResourceResponse' from JSON`);
}
//# sourceMappingURL=createresource.js.map