/*
 * 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";
import * as components from "../components/index.js";
/**
 * The delivery type of the asset.
 */
export const UpdateResourceByPublicIdType = {
    Upload: "upload",
    Private: "private",
    Authenticated: "authenticated",
    Facebook: "facebook",
    Twitter: "twitter",
    Gravatar: "gravatar",
    Youtube: "youtube",
    Hulu: "hulu",
    Vimeo: "vimeo",
    Animoto: "animoto",
    Worldstarhiphop: "worldstarhiphop",
    Dailymotion: "dailymotion",
};
/** @internal */
export const UpdateResourceByPublicIdGlobals$inboundSchema = z.object({
    cloud_name: z.string().optional(),
}).transform((v) => {
    return remap$(v, {
        "cloud_name": "cloudName",
    });
});
/** @internal */
export const UpdateResourceByPublicIdGlobals$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 UpdateResourceByPublicIdGlobals$;
(function (UpdateResourceByPublicIdGlobals$) {
    /** @deprecated use `UpdateResourceByPublicIdGlobals$inboundSchema` instead. */
    UpdateResourceByPublicIdGlobals$.inboundSchema = UpdateResourceByPublicIdGlobals$inboundSchema;
    /** @deprecated use `UpdateResourceByPublicIdGlobals$outboundSchema` instead. */
    UpdateResourceByPublicIdGlobals$.outboundSchema = UpdateResourceByPublicIdGlobals$outboundSchema;
})(UpdateResourceByPublicIdGlobals$ || (UpdateResourceByPublicIdGlobals$ = {}));
export function updateResourceByPublicIdGlobalsToJSON(updateResourceByPublicIdGlobals) {
    return JSON.stringify(UpdateResourceByPublicIdGlobals$outboundSchema.parse(updateResourceByPublicIdGlobals));
}
export function updateResourceByPublicIdGlobalsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => UpdateResourceByPublicIdGlobals$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateResourceByPublicIdGlobals' from JSON`);
}
/** @internal */
export const UpdateResourceByPublicIdType$inboundSchema = z.nativeEnum(UpdateResourceByPublicIdType);
/** @internal */
export const UpdateResourceByPublicIdType$outboundSchema = UpdateResourceByPublicIdType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var UpdateResourceByPublicIdType$;
(function (UpdateResourceByPublicIdType$) {
    /** @deprecated use `UpdateResourceByPublicIdType$inboundSchema` instead. */
    UpdateResourceByPublicIdType$.inboundSchema = UpdateResourceByPublicIdType$inboundSchema;
    /** @deprecated use `UpdateResourceByPublicIdType$outboundSchema` instead. */
    UpdateResourceByPublicIdType$.outboundSchema = UpdateResourceByPublicIdType$outboundSchema;
})(UpdateResourceByPublicIdType$ || (UpdateResourceByPublicIdType$ = {}));
/** @internal */
export const UpdateResourceByPublicIdRequest$inboundSchema = z.object({
    resource_type: components.ResourceTypeParameter$inboundSchema,
    type: UpdateResourceByPublicIdType$inboundSchema,
    public_id: z.string(),
    ResourceUpdateRequest: components.ResourceUpdateRequest$inboundSchema,
}).transform((v) => {
    return remap$(v, {
        "resource_type": "resourceType",
        "public_id": "publicId",
        "ResourceUpdateRequest": "resourceUpdateRequest",
    });
});
/** @internal */
export const UpdateResourceByPublicIdRequest$outboundSchema = z.object({
    resourceType: components.ResourceTypeParameter$outboundSchema,
    type: UpdateResourceByPublicIdType$outboundSchema,
    publicId: z.string(),
    resourceUpdateRequest: components.ResourceUpdateRequest$outboundSchema,
}).transform((v) => {
    return remap$(v, {
        resourceType: "resource_type",
        publicId: "public_id",
        resourceUpdateRequest: "ResourceUpdateRequest",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var UpdateResourceByPublicIdRequest$;
(function (UpdateResourceByPublicIdRequest$) {
    /** @deprecated use `UpdateResourceByPublicIdRequest$inboundSchema` instead. */
    UpdateResourceByPublicIdRequest$.inboundSchema = UpdateResourceByPublicIdRequest$inboundSchema;
    /** @deprecated use `UpdateResourceByPublicIdRequest$outboundSchema` instead. */
    UpdateResourceByPublicIdRequest$.outboundSchema = UpdateResourceByPublicIdRequest$outboundSchema;
})(UpdateResourceByPublicIdRequest$ || (UpdateResourceByPublicIdRequest$ = {}));
export function updateResourceByPublicIdRequestToJSON(updateResourceByPublicIdRequest) {
    return JSON.stringify(UpdateResourceByPublicIdRequest$outboundSchema.parse(updateResourceByPublicIdRequest));
}
export function updateResourceByPublicIdRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => UpdateResourceByPublicIdRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateResourceByPublicIdRequest' from JSON`);
}
//# sourceMappingURL=updateresourcebypublicid.js.map