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