"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.UpdateResourceRequest$ = exports.UpdateResourceRequest$outboundSchema = exports.UpdateResourceRequest$inboundSchema = exports.UpdateResourceRequestBody$ = exports.UpdateResourceRequestBody$outboundSchema = exports.UpdateResourceRequestBody$inboundSchema = exports.UpdateResourceResource$ = exports.UpdateResourceResource$outboundSchema = exports.UpdateResourceResource$inboundSchema = exports.UpdateResourceImportance$ = exports.UpdateResourceImportance$outboundSchema = exports.UpdateResourceImportance$inboundSchema = exports.UpdateResourceRole$ = exports.UpdateResourceRole$outboundSchema = exports.UpdateResourceRole$inboundSchema = exports.UpdateResourceStatus$ = exports.UpdateResourceStatus$outboundSchema = exports.UpdateResourceStatus$inboundSchema = exports.UpdateResourceImportance = exports.UpdateResourceRole = exports.UpdateResourceStatus = void 0;
exports.updateResourceResourceToJSON = updateResourceResourceToJSON;
exports.updateResourceResourceFromJSON = updateResourceResourceFromJSON;
exports.updateResourceRequestBodyToJSON = updateResourceRequestBodyToJSON;
exports.updateResourceRequestBodyFromJSON = updateResourceRequestBodyFromJSON;
exports.updateResourceRequestToJSON = updateResourceRequestToJSON;
exports.updateResourceRequestFromJSON = updateResourceRequestFromJSON;
const z = __importStar(require("zod"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
exports.UpdateResourceStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
exports.UpdateResourceRole = {
    Primary: "primary",
    Secondary: "secondary",
};
exports.UpdateResourceImportance = {
    Primary: "primary",
    Secondary: "secondary",
};
/** @internal */
exports.UpdateResourceStatus$inboundSchema = z.nativeEnum(exports.UpdateResourceStatus);
/** @internal */
exports.UpdateResourceStatus$outboundSchema = exports.UpdateResourceStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var UpdateResourceStatus$;
(function (UpdateResourceStatus$) {
    /** @deprecated use `UpdateResourceStatus$inboundSchema` instead. */
    UpdateResourceStatus$.inboundSchema = exports.UpdateResourceStatus$inboundSchema;
    /** @deprecated use `UpdateResourceStatus$outboundSchema` instead. */
    UpdateResourceStatus$.outboundSchema = exports.UpdateResourceStatus$outboundSchema;
})(UpdateResourceStatus$ || (exports.UpdateResourceStatus$ = UpdateResourceStatus$ = {}));
/** @internal */
exports.UpdateResourceRole$inboundSchema = z.nativeEnum(exports.UpdateResourceRole);
/** @internal */
exports.UpdateResourceRole$outboundSchema = exports.UpdateResourceRole$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var UpdateResourceRole$;
(function (UpdateResourceRole$) {
    /** @deprecated use `UpdateResourceRole$inboundSchema` instead. */
    UpdateResourceRole$.inboundSchema = exports.UpdateResourceRole$inboundSchema;
    /** @deprecated use `UpdateResourceRole$outboundSchema` instead. */
    UpdateResourceRole$.outboundSchema = exports.UpdateResourceRole$outboundSchema;
})(UpdateResourceRole$ || (exports.UpdateResourceRole$ = UpdateResourceRole$ = {}));
/** @internal */
exports.UpdateResourceImportance$inboundSchema = z.nativeEnum(exports.UpdateResourceImportance);
/** @internal */
exports.UpdateResourceImportance$outboundSchema = exports.UpdateResourceImportance$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var UpdateResourceImportance$;
(function (UpdateResourceImportance$) {
    /** @deprecated use `UpdateResourceImportance$inboundSchema` instead. */
    UpdateResourceImportance$.inboundSchema = exports.UpdateResourceImportance$inboundSchema;
    /** @deprecated use `UpdateResourceImportance$outboundSchema` instead. */
    UpdateResourceImportance$.outboundSchema = exports.UpdateResourceImportance$outboundSchema;
})(UpdateResourceImportance$ || (exports.UpdateResourceImportance$ = UpdateResourceImportance$ = {}));
/** @internal */
exports.UpdateResourceResource$inboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: exports.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(exports.UpdateResourceRole$inboundSchema).optional(),
    importance: exports.UpdateResourceImportance$inboundSchema.optional(),
    vendorResourceId: z.string(),
    vendorId: z.string().optional(),
    applicationId: z.string().optional(),
});
/** @internal */
exports.UpdateResourceResource$outboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: exports.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(exports.UpdateResourceRole$outboundSchema).optional(),
    importance: exports.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.
 */
var UpdateResourceResource$;
(function (UpdateResourceResource$) {
    /** @deprecated use `UpdateResourceResource$inboundSchema` instead. */
    UpdateResourceResource$.inboundSchema = exports.UpdateResourceResource$inboundSchema;
    /** @deprecated use `UpdateResourceResource$outboundSchema` instead. */
    UpdateResourceResource$.outboundSchema = exports.UpdateResourceResource$outboundSchema;
})(UpdateResourceResource$ || (exports.UpdateResourceResource$ = UpdateResourceResource$ = {}));
function updateResourceResourceToJSON(updateResourceResource) {
    return JSON.stringify(exports.UpdateResourceResource$outboundSchema.parse(updateResourceResource));
}
function updateResourceResourceFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.UpdateResourceResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateResourceResource' from JSON`);
}
/** @internal */
exports.UpdateResourceRequestBody$inboundSchema = z.object({
    resource: z.lazy(() => exports.UpdateResourceResource$inboundSchema),
});
/** @internal */
exports.UpdateResourceRequestBody$outboundSchema = z.object({
    resource: z.lazy(() => exports.UpdateResourceResource$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var UpdateResourceRequestBody$;
(function (UpdateResourceRequestBody$) {
    /** @deprecated use `UpdateResourceRequestBody$inboundSchema` instead. */
    UpdateResourceRequestBody$.inboundSchema = exports.UpdateResourceRequestBody$inboundSchema;
    /** @deprecated use `UpdateResourceRequestBody$outboundSchema` instead. */
    UpdateResourceRequestBody$.outboundSchema = exports.UpdateResourceRequestBody$outboundSchema;
})(UpdateResourceRequestBody$ || (exports.UpdateResourceRequestBody$ = UpdateResourceRequestBody$ = {}));
function updateResourceRequestBodyToJSON(updateResourceRequestBody) {
    return JSON.stringify(exports.UpdateResourceRequestBody$outboundSchema.parse(updateResourceRequestBody));
}
function updateResourceRequestBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.UpdateResourceRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateResourceRequestBody' from JSON`);
}
/** @internal */
exports.UpdateResourceRequest$inboundSchema = z.object({
    sourcedId: z.string(),
    RequestBody: z.lazy(() => exports.UpdateResourceRequestBody$inboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "RequestBody": "requestBody",
    });
});
/** @internal */
exports.UpdateResourceRequest$outboundSchema = z.object({
    sourcedId: z.string(),
    requestBody: z.lazy(() => exports.UpdateResourceRequestBody$outboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.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.
 */
var UpdateResourceRequest$;
(function (UpdateResourceRequest$) {
    /** @deprecated use `UpdateResourceRequest$inboundSchema` instead. */
    UpdateResourceRequest$.inboundSchema = exports.UpdateResourceRequest$inboundSchema;
    /** @deprecated use `UpdateResourceRequest$outboundSchema` instead. */
    UpdateResourceRequest$.outboundSchema = exports.UpdateResourceRequest$outboundSchema;
})(UpdateResourceRequest$ || (exports.UpdateResourceRequest$ = UpdateResourceRequest$ = {}));
function updateResourceRequestToJSON(updateResourceRequest) {
    return JSON.stringify(exports.UpdateResourceRequest$outboundSchema.parse(updateResourceRequest));
}
function updateResourceRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.UpdateResourceRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateResourceRequest' from JSON`);
}
//# sourceMappingURL=updateresource.js.map