"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.CreateAssetRelationsByPublicIdRequest$ = exports.CreateAssetRelationsByPublicIdRequest$outboundSchema = exports.CreateAssetRelationsByPublicIdRequest$inboundSchema = exports.CreateAssetRelationsByPublicIdRequestBody$ = exports.CreateAssetRelationsByPublicIdRequestBody$outboundSchema = exports.CreateAssetRelationsByPublicIdRequestBody$inboundSchema = exports.CreateAssetRelationsByPublicIdType$ = exports.CreateAssetRelationsByPublicIdType$outboundSchema = exports.CreateAssetRelationsByPublicIdType$inboundSchema = exports.CreateAssetRelationsByPublicIdGlobals$ = exports.CreateAssetRelationsByPublicIdGlobals$outboundSchema = exports.CreateAssetRelationsByPublicIdGlobals$inboundSchema = exports.CreateAssetRelationsByPublicIdType = void 0;
exports.createAssetRelationsByPublicIdGlobalsToJSON = createAssetRelationsByPublicIdGlobalsToJSON;
exports.createAssetRelationsByPublicIdGlobalsFromJSON = createAssetRelationsByPublicIdGlobalsFromJSON;
exports.createAssetRelationsByPublicIdRequestBodyToJSON = createAssetRelationsByPublicIdRequestBodyToJSON;
exports.createAssetRelationsByPublicIdRequestBodyFromJSON = createAssetRelationsByPublicIdRequestBodyFromJSON;
exports.createAssetRelationsByPublicIdRequestToJSON = createAssetRelationsByPublicIdRequestToJSON;
exports.createAssetRelationsByPublicIdRequestFromJSON = createAssetRelationsByPublicIdRequestFromJSON;
const z = __importStar(require("zod"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
const components = __importStar(require("../components/index.js"));
/**
 * The delivery type of the asset.
 */
exports.CreateAssetRelationsByPublicIdType = {
    Upload: "upload",
    Private: "private",
    Authenticated: "authenticated",
};
/** @internal */
exports.CreateAssetRelationsByPublicIdGlobals$inboundSchema = z.object({
    cloud_name: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "cloud_name": "cloudName",
    });
});
/** @internal */
exports.CreateAssetRelationsByPublicIdGlobals$outboundSchema = z.object({
    cloudName: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        cloudName: "cloud_name",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CreateAssetRelationsByPublicIdGlobals$;
(function (CreateAssetRelationsByPublicIdGlobals$) {
    /** @deprecated use `CreateAssetRelationsByPublicIdGlobals$inboundSchema` instead. */
    CreateAssetRelationsByPublicIdGlobals$.inboundSchema = exports.CreateAssetRelationsByPublicIdGlobals$inboundSchema;
    /** @deprecated use `CreateAssetRelationsByPublicIdGlobals$outboundSchema` instead. */
    CreateAssetRelationsByPublicIdGlobals$.outboundSchema = exports.CreateAssetRelationsByPublicIdGlobals$outboundSchema;
})(CreateAssetRelationsByPublicIdGlobals$ || (exports.CreateAssetRelationsByPublicIdGlobals$ = CreateAssetRelationsByPublicIdGlobals$ = {}));
function createAssetRelationsByPublicIdGlobalsToJSON(createAssetRelationsByPublicIdGlobals) {
    return JSON.stringify(exports.CreateAssetRelationsByPublicIdGlobals$outboundSchema.parse(createAssetRelationsByPublicIdGlobals));
}
function createAssetRelationsByPublicIdGlobalsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateAssetRelationsByPublicIdGlobals$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateAssetRelationsByPublicIdGlobals' from JSON`);
}
/** @internal */
exports.CreateAssetRelationsByPublicIdType$inboundSchema = z.nativeEnum(exports.CreateAssetRelationsByPublicIdType);
/** @internal */
exports.CreateAssetRelationsByPublicIdType$outboundSchema = exports.CreateAssetRelationsByPublicIdType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CreateAssetRelationsByPublicIdType$;
(function (CreateAssetRelationsByPublicIdType$) {
    /** @deprecated use `CreateAssetRelationsByPublicIdType$inboundSchema` instead. */
    CreateAssetRelationsByPublicIdType$.inboundSchema = exports.CreateAssetRelationsByPublicIdType$inboundSchema;
    /** @deprecated use `CreateAssetRelationsByPublicIdType$outboundSchema` instead. */
    CreateAssetRelationsByPublicIdType$.outboundSchema = exports.CreateAssetRelationsByPublicIdType$outboundSchema;
})(CreateAssetRelationsByPublicIdType$ || (exports.CreateAssetRelationsByPublicIdType$ = CreateAssetRelationsByPublicIdType$ = {}));
/** @internal */
exports.CreateAssetRelationsByPublicIdRequestBody$inboundSchema = z.object({
    assets_to_relate: z.array(z.string()),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "assets_to_relate": "assetsToRelate",
    });
});
/** @internal */
exports.CreateAssetRelationsByPublicIdRequestBody$outboundSchema = z.object({
    assetsToRelate: z.array(z.string()),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        assetsToRelate: "assets_to_relate",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CreateAssetRelationsByPublicIdRequestBody$;
(function (CreateAssetRelationsByPublicIdRequestBody$) {
    /** @deprecated use `CreateAssetRelationsByPublicIdRequestBody$inboundSchema` instead. */
    CreateAssetRelationsByPublicIdRequestBody$.inboundSchema = exports.CreateAssetRelationsByPublicIdRequestBody$inboundSchema;
    /** @deprecated use `CreateAssetRelationsByPublicIdRequestBody$outboundSchema` instead. */
    CreateAssetRelationsByPublicIdRequestBody$.outboundSchema = exports.CreateAssetRelationsByPublicIdRequestBody$outboundSchema;
})(CreateAssetRelationsByPublicIdRequestBody$ || (exports.CreateAssetRelationsByPublicIdRequestBody$ = CreateAssetRelationsByPublicIdRequestBody$ = {}));
function createAssetRelationsByPublicIdRequestBodyToJSON(createAssetRelationsByPublicIdRequestBody) {
    return JSON.stringify(exports.CreateAssetRelationsByPublicIdRequestBody$outboundSchema.parse(createAssetRelationsByPublicIdRequestBody));
}
function createAssetRelationsByPublicIdRequestBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateAssetRelationsByPublicIdRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateAssetRelationsByPublicIdRequestBody' from JSON`);
}
/** @internal */
exports.CreateAssetRelationsByPublicIdRequest$inboundSchema = z.object({
    resource_type: components.ResourceTypeParameter$inboundSchema,
    type: exports.CreateAssetRelationsByPublicIdType$inboundSchema.default("upload"),
    public_id: z.string(),
    RequestBody: z.lazy(() => exports.CreateAssetRelationsByPublicIdRequestBody$inboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "resource_type": "resourceType",
        "public_id": "publicId",
        "RequestBody": "requestBody",
    });
});
/** @internal */
exports.CreateAssetRelationsByPublicIdRequest$outboundSchema = z.object({
    resourceType: components.ResourceTypeParameter$outboundSchema,
    type: exports.CreateAssetRelationsByPublicIdType$outboundSchema.default("upload"),
    publicId: z.string(),
    requestBody: z.lazy(() => exports.CreateAssetRelationsByPublicIdRequestBody$outboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        resourceType: "resource_type",
        publicId: "public_id",
        requestBody: "RequestBody",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CreateAssetRelationsByPublicIdRequest$;
(function (CreateAssetRelationsByPublicIdRequest$) {
    /** @deprecated use `CreateAssetRelationsByPublicIdRequest$inboundSchema` instead. */
    CreateAssetRelationsByPublicIdRequest$.inboundSchema = exports.CreateAssetRelationsByPublicIdRequest$inboundSchema;
    /** @deprecated use `CreateAssetRelationsByPublicIdRequest$outboundSchema` instead. */
    CreateAssetRelationsByPublicIdRequest$.outboundSchema = exports.CreateAssetRelationsByPublicIdRequest$outboundSchema;
})(CreateAssetRelationsByPublicIdRequest$ || (exports.CreateAssetRelationsByPublicIdRequest$ = CreateAssetRelationsByPublicIdRequest$ = {}));
function createAssetRelationsByPublicIdRequestToJSON(createAssetRelationsByPublicIdRequest) {
    return JSON.stringify(exports.CreateAssetRelationsByPublicIdRequest$outboundSchema.parse(createAssetRelationsByPublicIdRequest));
}
function createAssetRelationsByPublicIdRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateAssetRelationsByPublicIdRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateAssetRelationsByPublicIdRequest' from JSON`);
}
//# sourceMappingURL=createassetrelationsbypublicid.js.map