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