"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.RenameAssetRequest$ = exports.RenameAssetRequest$outboundSchema = exports.RenameAssetRequest$inboundSchema = exports.RenameAssetRequestBody$ = exports.RenameAssetRequestBody$outboundSchema = exports.RenameAssetRequestBody$inboundSchema = exports.ToType$ = exports.ToType$outboundSchema = exports.ToType$inboundSchema = exports.RenameAssetType$ = exports.RenameAssetType$outboundSchema = exports.RenameAssetType$inboundSchema = exports.RenameAssetResourceType$ = exports.RenameAssetResourceType$outboundSchema = exports.RenameAssetResourceType$inboundSchema = exports.RenameAssetGlobals$ = exports.RenameAssetGlobals$outboundSchema = exports.RenameAssetGlobals$inboundSchema = exports.ToType = exports.RenameAssetType = exports.RenameAssetResourceType = void 0;
exports.renameAssetGlobalsToJSON = renameAssetGlobalsToJSON;
exports.renameAssetGlobalsFromJSON = renameAssetGlobalsFromJSON;
exports.renameAssetRequestBodyToJSON = renameAssetRequestBodyToJSON;
exports.renameAssetRequestBodyFromJSON = renameAssetRequestBodyFromJSON;
exports.renameAssetRequestToJSON = renameAssetRequestToJSON;
exports.renameAssetRequestFromJSON = renameAssetRequestFromJSON;
const z = __importStar(require("zod"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
/**
 * The type of resource to rename. "image", "video", or "raw".
 */
exports.RenameAssetResourceType = {
    Image: "image",
    Video: "video",
    Raw: "raw",
};
/**
 * The storage type of the asset. Defaults to 'upload'.
 */
exports.RenameAssetType = {
    Upload: "upload",
    Private: "private",
    Authenticated: "authenticated",
};
/**
 * The new storage type for the asset.
 */
exports.ToType = {
    Upload: "upload",
    Private: "private",
    Authenticated: "authenticated",
};
/** @internal */
exports.RenameAssetGlobals$inboundSchema = z.object({
    cloud_name: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "cloud_name": "cloudName",
    });
});
/** @internal */
exports.RenameAssetGlobals$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 RenameAssetGlobals$;
(function (RenameAssetGlobals$) {
    /** @deprecated use `RenameAssetGlobals$inboundSchema` instead. */
    RenameAssetGlobals$.inboundSchema = exports.RenameAssetGlobals$inboundSchema;
    /** @deprecated use `RenameAssetGlobals$outboundSchema` instead. */
    RenameAssetGlobals$.outboundSchema = exports.RenameAssetGlobals$outboundSchema;
})(RenameAssetGlobals$ || (exports.RenameAssetGlobals$ = RenameAssetGlobals$ = {}));
function renameAssetGlobalsToJSON(renameAssetGlobals) {
    return JSON.stringify(exports.RenameAssetGlobals$outboundSchema.parse(renameAssetGlobals));
}
function renameAssetGlobalsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RenameAssetGlobals$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RenameAssetGlobals' from JSON`);
}
/** @internal */
exports.RenameAssetResourceType$inboundSchema = z.nativeEnum(exports.RenameAssetResourceType);
/** @internal */
exports.RenameAssetResourceType$outboundSchema = exports.RenameAssetResourceType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var RenameAssetResourceType$;
(function (RenameAssetResourceType$) {
    /** @deprecated use `RenameAssetResourceType$inboundSchema` instead. */
    RenameAssetResourceType$.inboundSchema = exports.RenameAssetResourceType$inboundSchema;
    /** @deprecated use `RenameAssetResourceType$outboundSchema` instead. */
    RenameAssetResourceType$.outboundSchema = exports.RenameAssetResourceType$outboundSchema;
})(RenameAssetResourceType$ || (exports.RenameAssetResourceType$ = RenameAssetResourceType$ = {}));
/** @internal */
exports.RenameAssetType$inboundSchema = z.nativeEnum(exports.RenameAssetType);
/** @internal */
exports.RenameAssetType$outboundSchema = exports.RenameAssetType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var RenameAssetType$;
(function (RenameAssetType$) {
    /** @deprecated use `RenameAssetType$inboundSchema` instead. */
    RenameAssetType$.inboundSchema = exports.RenameAssetType$inboundSchema;
    /** @deprecated use `RenameAssetType$outboundSchema` instead. */
    RenameAssetType$.outboundSchema = exports.RenameAssetType$outboundSchema;
})(RenameAssetType$ || (exports.RenameAssetType$ = RenameAssetType$ = {}));
/** @internal */
exports.ToType$inboundSchema = z
    .nativeEnum(exports.ToType);
/** @internal */
exports.ToType$outboundSchema = exports.ToType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var ToType$;
(function (ToType$) {
    /** @deprecated use `ToType$inboundSchema` instead. */
    ToType$.inboundSchema = exports.ToType$inboundSchema;
    /** @deprecated use `ToType$outboundSchema` instead. */
    ToType$.outboundSchema = exports.ToType$outboundSchema;
})(ToType$ || (exports.ToType$ = ToType$ = {}));
/** @internal */
exports.RenameAssetRequestBody$inboundSchema = z.object({
    signature: z.string().optional(),
    timestamp: z.number().int().optional(),
    api_key: z.string().optional(),
    from_public_id: z.string(),
    to_public_id: z.string(),
    type: exports.RenameAssetType$inboundSchema.optional(),
    to_type: exports.ToType$inboundSchema.optional(),
    overwrite: z.boolean().optional(),
    invalidate: z.boolean().optional(),
    context: z.string().optional(),
    metadata: z.string().optional(),
    notification_url: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "api_key": "apiKey",
        "from_public_id": "fromPublicId",
        "to_public_id": "toPublicId",
        "to_type": "toType",
        "notification_url": "notificationUrl",
    });
});
/** @internal */
exports.RenameAssetRequestBody$outboundSchema = z.object({
    signature: z.string().optional(),
    timestamp: z.number().int().optional(),
    apiKey: z.string().optional(),
    fromPublicId: z.string(),
    toPublicId: z.string(),
    type: exports.RenameAssetType$outboundSchema.optional(),
    toType: exports.ToType$outboundSchema.optional(),
    overwrite: z.boolean().optional(),
    invalidate: z.boolean().optional(),
    context: z.string().optional(),
    metadata: z.string().optional(),
    notificationUrl: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        apiKey: "api_key",
        fromPublicId: "from_public_id",
        toPublicId: "to_public_id",
        toType: "to_type",
        notificationUrl: "notification_url",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var RenameAssetRequestBody$;
(function (RenameAssetRequestBody$) {
    /** @deprecated use `RenameAssetRequestBody$inboundSchema` instead. */
    RenameAssetRequestBody$.inboundSchema = exports.RenameAssetRequestBody$inboundSchema;
    /** @deprecated use `RenameAssetRequestBody$outboundSchema` instead. */
    RenameAssetRequestBody$.outboundSchema = exports.RenameAssetRequestBody$outboundSchema;
})(RenameAssetRequestBody$ || (exports.RenameAssetRequestBody$ = RenameAssetRequestBody$ = {}));
function renameAssetRequestBodyToJSON(renameAssetRequestBody) {
    return JSON.stringify(exports.RenameAssetRequestBody$outboundSchema.parse(renameAssetRequestBody));
}
function renameAssetRequestBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RenameAssetRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RenameAssetRequestBody' from JSON`);
}
/** @internal */
exports.RenameAssetRequest$inboundSchema = z.object({
    resource_type: exports.RenameAssetResourceType$inboundSchema,
    RequestBody: z.lazy(() => exports.RenameAssetRequestBody$inboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "resource_type": "resourceType",
        "RequestBody": "requestBody",
    });
});
/** @internal */
exports.RenameAssetRequest$outboundSchema = z.object({
    resourceType: exports.RenameAssetResourceType$outboundSchema,
    requestBody: z.lazy(() => exports.RenameAssetRequestBody$outboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        resourceType: "resource_type",
        requestBody: "RequestBody",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var RenameAssetRequest$;
(function (RenameAssetRequest$) {
    /** @deprecated use `RenameAssetRequest$inboundSchema` instead. */
    RenameAssetRequest$.inboundSchema = exports.RenameAssetRequest$inboundSchema;
    /** @deprecated use `RenameAssetRequest$outboundSchema` instead. */
    RenameAssetRequest$.outboundSchema = exports.RenameAssetRequest$outboundSchema;
})(RenameAssetRequest$ || (exports.RenameAssetRequest$ = RenameAssetRequest$ = {}));
function renameAssetRequestToJSON(renameAssetRequest) {
    return JSON.stringify(exports.RenameAssetRequest$outboundSchema.parse(renameAssetRequest));
}
function renameAssetRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RenameAssetRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RenameAssetRequest' from JSON`);
}
//# sourceMappingURL=renameasset.js.map