/*
 * 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 asset/resource to destroy
 */
export const DestroyAssetResourceType = {
    Image: "image",
    Video: "video",
    Raw: "raw",
};
/**
 * Indicates successful deletion
 */
export const Result = {
    Ok: "ok",
};
/** @internal */
export const DestroyAssetGlobals$inboundSchema = z.object({
    cloud_name: z.string().optional(),
}).transform((v) => {
    return remap$(v, {
        "cloud_name": "cloudName",
    });
});
/** @internal */
export const DestroyAssetGlobals$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 DestroyAssetGlobals$;
(function (DestroyAssetGlobals$) {
    /** @deprecated use `DestroyAssetGlobals$inboundSchema` instead. */
    DestroyAssetGlobals$.inboundSchema = DestroyAssetGlobals$inboundSchema;
    /** @deprecated use `DestroyAssetGlobals$outboundSchema` instead. */
    DestroyAssetGlobals$.outboundSchema = DestroyAssetGlobals$outboundSchema;
})(DestroyAssetGlobals$ || (DestroyAssetGlobals$ = {}));
export function destroyAssetGlobalsToJSON(destroyAssetGlobals) {
    return JSON.stringify(DestroyAssetGlobals$outboundSchema.parse(destroyAssetGlobals));
}
export function destroyAssetGlobalsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => DestroyAssetGlobals$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DestroyAssetGlobals' from JSON`);
}
/** @internal */
export const DestroyAssetResourceType$inboundSchema = z.nativeEnum(DestroyAssetResourceType);
/** @internal */
export const DestroyAssetResourceType$outboundSchema = DestroyAssetResourceType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var DestroyAssetResourceType$;
(function (DestroyAssetResourceType$) {
    /** @deprecated use `DestroyAssetResourceType$inboundSchema` instead. */
    DestroyAssetResourceType$.inboundSchema = DestroyAssetResourceType$inboundSchema;
    /** @deprecated use `DestroyAssetResourceType$outboundSchema` instead. */
    DestroyAssetResourceType$.outboundSchema = DestroyAssetResourceType$outboundSchema;
})(DestroyAssetResourceType$ || (DestroyAssetResourceType$ = {}));
/** @internal */
export const DestroyAssetRequest$inboundSchema = z.object({
    resource_type: DestroyAssetResourceType$inboundSchema,
    public_id: z.string(),
    invalidate: z.boolean().default(false),
}).transform((v) => {
    return remap$(v, {
        "resource_type": "resourceType",
        "public_id": "publicId",
    });
});
/** @internal */
export const DestroyAssetRequest$outboundSchema = z.object({
    resourceType: DestroyAssetResourceType$outboundSchema,
    publicId: z.string(),
    invalidate: z.boolean().default(false),
}).transform((v) => {
    return remap$(v, {
        resourceType: "resource_type",
        publicId: "public_id",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var DestroyAssetRequest$;
(function (DestroyAssetRequest$) {
    /** @deprecated use `DestroyAssetRequest$inboundSchema` instead. */
    DestroyAssetRequest$.inboundSchema = DestroyAssetRequest$inboundSchema;
    /** @deprecated use `DestroyAssetRequest$outboundSchema` instead. */
    DestroyAssetRequest$.outboundSchema = DestroyAssetRequest$outboundSchema;
})(DestroyAssetRequest$ || (DestroyAssetRequest$ = {}));
export function destroyAssetRequestToJSON(destroyAssetRequest) {
    return JSON.stringify(DestroyAssetRequest$outboundSchema.parse(destroyAssetRequest));
}
export function destroyAssetRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => DestroyAssetRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DestroyAssetRequest' from JSON`);
}
/** @internal */
export const Result$inboundSchema = z
    .nativeEnum(Result);
/** @internal */
export const Result$outboundSchema = Result$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var Result$;
(function (Result$) {
    /** @deprecated use `Result$inboundSchema` instead. */
    Result$.inboundSchema = Result$inboundSchema;
    /** @deprecated use `Result$outboundSchema` instead. */
    Result$.outboundSchema = Result$outboundSchema;
})(Result$ || (Result$ = {}));
/** @internal */
export const DestroyAssetResponse$inboundSchema = z.object({
    result: Result$inboundSchema.optional(),
});
/** @internal */
export const DestroyAssetResponse$outboundSchema = z.object({
    result: Result$outboundSchema.optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var DestroyAssetResponse$;
(function (DestroyAssetResponse$) {
    /** @deprecated use `DestroyAssetResponse$inboundSchema` instead. */
    DestroyAssetResponse$.inboundSchema = DestroyAssetResponse$inboundSchema;
    /** @deprecated use `DestroyAssetResponse$outboundSchema` instead. */
    DestroyAssetResponse$.outboundSchema = DestroyAssetResponse$outboundSchema;
})(DestroyAssetResponse$ || (DestroyAssetResponse$ = {}));
export function destroyAssetResponseToJSON(destroyAssetResponse) {
    return JSON.stringify(DestroyAssetResponse$outboundSchema.parse(destroyAssetResponse));
}
export function destroyAssetResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => DestroyAssetResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DestroyAssetResponse' from JSON`);
}
//# sourceMappingURL=destroyasset.js.map