"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.ExplicitAssetRequest$ = exports.ExplicitAssetRequest$outboundSchema = exports.ExplicitAssetRequest$inboundSchema = exports.ExplicitAssetRequestBody$ = exports.ExplicitAssetRequestBody$outboundSchema = exports.ExplicitAssetRequestBody$inboundSchema = exports.QualityOverride$ = exports.QualityOverride$outboundSchema = exports.QualityOverride$inboundSchema = exports.ExplicitAssetType$ = exports.ExplicitAssetType$outboundSchema = exports.ExplicitAssetType$inboundSchema = exports.ResponsiveBreakpoint$ = exports.ResponsiveBreakpoint$outboundSchema = exports.ResponsiveBreakpoint$inboundSchema = exports.ExplicitAssetModeration$ = exports.ExplicitAssetModeration$outboundSchema = exports.ExplicitAssetModeration$inboundSchema = exports.ExplicitAssetResourceType$ = exports.ExplicitAssetResourceType$outboundSchema = exports.ExplicitAssetResourceType$inboundSchema = exports.ExplicitAssetGlobals$ = exports.ExplicitAssetGlobals$outboundSchema = exports.ExplicitAssetGlobals$inboundSchema = exports.ExplicitAssetType = exports.ExplicitAssetModeration = exports.ExplicitAssetResourceType = void 0;
exports.explicitAssetGlobalsToJSON = explicitAssetGlobalsToJSON;
exports.explicitAssetGlobalsFromJSON = explicitAssetGlobalsFromJSON;
exports.responsiveBreakpointToJSON = responsiveBreakpointToJSON;
exports.responsiveBreakpointFromJSON = responsiveBreakpointFromJSON;
exports.qualityOverrideToJSON = qualityOverrideToJSON;
exports.qualityOverrideFromJSON = qualityOverrideFromJSON;
exports.explicitAssetRequestBodyToJSON = explicitAssetRequestBodyToJSON;
exports.explicitAssetRequestBodyFromJSON = explicitAssetRequestBodyFromJSON;
exports.explicitAssetRequestToJSON = explicitAssetRequestToJSON;
exports.explicitAssetRequestFromJSON = explicitAssetRequestFromJSON;
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 apply operations on. "image" for images, "video" for videos, or "raw" for non-media files.
 */
exports.ExplicitAssetResourceType = {
    Image: "image",
    Video: "video",
    Raw: "raw",
};
/**
 * For all asset types, set to:
 *
 * @remarks
 * - manual to add the uploaded asset to a list of pending assets that can be moderated using the Admin API or the Cloudinary Console.
 * - perception_point to automatically moderate the uploaded asset using the Perception Point Malware Detection add-on.
 *
 * For images only, set to:
 * - webpurify to automatically moderate the uploaded image using the WebPurify Image Moderation add-on.
 * - aws_rek to automatically moderate the uploaded image using the Amazon Rekognition AI Moderation add-on.
 * - duplicate:<threshold> to detect if the same or a similar image already exists using the Cloudinary Duplicate Image Detection add-on. Set threshold to a float greater than 0 and less than or equal to 1.0 to specify how similar an image needs to be in order to be considered a duplicate. Set threshold to 0 to add an image to the index of images that are searched when duplicate detection is invoked for another image.
 *
 * For videos only, set to:
 * - aws_rek_video to automatically moderate the uploaded video using the Amazon Rekognition Video Moderation add-on.
 * - google_video_moderation automatically moderate the uploaded video using the Google AI Video Moderation add-on.
 *
 * To request multiple moderations in a single API call:
 * - Send the desired list of moderations as a pipe-separated string with manual moderation, if relevant, being last.
 *
 * Note: Rejected assets are automatically invalidated on the CDN within approximately ten minutes.
 */
exports.ExplicitAssetModeration = {
    Manual: "manual",
    Webpurify: "webpurify",
    Metascan: "metascan",
    AwsRek: "aws_rek",
    AwsRekVideo: "aws_rek_video",
    GoogleVideoModeration: "google_video_moderation",
    PerceptionPoint: "perception_point",
    Duplicate: "duplicate",
    Cld: "cld",
};
/**
 * The storage type of the asset. Defaults to 'upload'.
 */
exports.ExplicitAssetType = {
    Upload: "upload",
    Private: "private",
    Authenticated: "authenticated",
    Fetch: "fetch",
};
/** @internal */
exports.ExplicitAssetGlobals$inboundSchema = z.object({
    cloud_name: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "cloud_name": "cloudName",
    });
});
/** @internal */
exports.ExplicitAssetGlobals$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 ExplicitAssetGlobals$;
(function (ExplicitAssetGlobals$) {
    /** @deprecated use `ExplicitAssetGlobals$inboundSchema` instead. */
    ExplicitAssetGlobals$.inboundSchema = exports.ExplicitAssetGlobals$inboundSchema;
    /** @deprecated use `ExplicitAssetGlobals$outboundSchema` instead. */
    ExplicitAssetGlobals$.outboundSchema = exports.ExplicitAssetGlobals$outboundSchema;
})(ExplicitAssetGlobals$ || (exports.ExplicitAssetGlobals$ = ExplicitAssetGlobals$ = {}));
function explicitAssetGlobalsToJSON(explicitAssetGlobals) {
    return JSON.stringify(exports.ExplicitAssetGlobals$outboundSchema.parse(explicitAssetGlobals));
}
function explicitAssetGlobalsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ExplicitAssetGlobals$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ExplicitAssetGlobals' from JSON`);
}
/** @internal */
exports.ExplicitAssetResourceType$inboundSchema = z.nativeEnum(exports.ExplicitAssetResourceType);
/** @internal */
exports.ExplicitAssetResourceType$outboundSchema = exports.ExplicitAssetResourceType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var ExplicitAssetResourceType$;
(function (ExplicitAssetResourceType$) {
    /** @deprecated use `ExplicitAssetResourceType$inboundSchema` instead. */
    ExplicitAssetResourceType$.inboundSchema = exports.ExplicitAssetResourceType$inboundSchema;
    /** @deprecated use `ExplicitAssetResourceType$outboundSchema` instead. */
    ExplicitAssetResourceType$.outboundSchema = exports.ExplicitAssetResourceType$outboundSchema;
})(ExplicitAssetResourceType$ || (exports.ExplicitAssetResourceType$ = ExplicitAssetResourceType$ = {}));
/** @internal */
exports.ExplicitAssetModeration$inboundSchema = z.nativeEnum(exports.ExplicitAssetModeration);
/** @internal */
exports.ExplicitAssetModeration$outboundSchema = exports.ExplicitAssetModeration$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var ExplicitAssetModeration$;
(function (ExplicitAssetModeration$) {
    /** @deprecated use `ExplicitAssetModeration$inboundSchema` instead. */
    ExplicitAssetModeration$.inboundSchema = exports.ExplicitAssetModeration$inboundSchema;
    /** @deprecated use `ExplicitAssetModeration$outboundSchema` instead. */
    ExplicitAssetModeration$.outboundSchema = exports.ExplicitAssetModeration$outboundSchema;
})(ExplicitAssetModeration$ || (exports.ExplicitAssetModeration$ = ExplicitAssetModeration$ = {}));
/** @internal */
exports.ResponsiveBreakpoint$inboundSchema = z.object({
    create_derived: z.boolean().optional(),
    max_width: z.number().int().optional(),
    min_width: z.number().int().optional(),
    bytes_step: z.number().int().optional(),
    max_images: z.number().int().optional(),
    transformation: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "create_derived": "createDerived",
        "max_width": "maxWidth",
        "min_width": "minWidth",
        "bytes_step": "bytesStep",
        "max_images": "maxImages",
    });
});
/** @internal */
exports.ResponsiveBreakpoint$outboundSchema = z.object({
    createDerived: z.boolean().optional(),
    maxWidth: z.number().int().optional(),
    minWidth: z.number().int().optional(),
    bytesStep: z.number().int().optional(),
    maxImages: z.number().int().optional(),
    transformation: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        createDerived: "create_derived",
        maxWidth: "max_width",
        minWidth: "min_width",
        bytesStep: "bytes_step",
        maxImages: "max_images",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var ResponsiveBreakpoint$;
(function (ResponsiveBreakpoint$) {
    /** @deprecated use `ResponsiveBreakpoint$inboundSchema` instead. */
    ResponsiveBreakpoint$.inboundSchema = exports.ResponsiveBreakpoint$inboundSchema;
    /** @deprecated use `ResponsiveBreakpoint$outboundSchema` instead. */
    ResponsiveBreakpoint$.outboundSchema = exports.ResponsiveBreakpoint$outboundSchema;
})(ResponsiveBreakpoint$ || (exports.ResponsiveBreakpoint$ = ResponsiveBreakpoint$ = {}));
function responsiveBreakpointToJSON(responsiveBreakpoint) {
    return JSON.stringify(exports.ResponsiveBreakpoint$outboundSchema.parse(responsiveBreakpoint));
}
function responsiveBreakpointFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ResponsiveBreakpoint$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponsiveBreakpoint' from JSON`);
}
/** @internal */
exports.ExplicitAssetType$inboundSchema = z.nativeEnum(exports.ExplicitAssetType);
/** @internal */
exports.ExplicitAssetType$outboundSchema = exports.ExplicitAssetType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var ExplicitAssetType$;
(function (ExplicitAssetType$) {
    /** @deprecated use `ExplicitAssetType$inboundSchema` instead. */
    ExplicitAssetType$.inboundSchema = exports.ExplicitAssetType$inboundSchema;
    /** @deprecated use `ExplicitAssetType$outboundSchema` instead. */
    ExplicitAssetType$.outboundSchema = exports.ExplicitAssetType$outboundSchema;
})(ExplicitAssetType$ || (exports.ExplicitAssetType$ = ExplicitAssetType$ = {}));
/** @internal */
exports.QualityOverride$inboundSchema = z.union([z.string(), z.number().int()]);
/** @internal */
exports.QualityOverride$outboundSchema = z.union([z.string(), z.number().int()]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var QualityOverride$;
(function (QualityOverride$) {
    /** @deprecated use `QualityOverride$inboundSchema` instead. */
    QualityOverride$.inboundSchema = exports.QualityOverride$inboundSchema;
    /** @deprecated use `QualityOverride$outboundSchema` instead. */
    QualityOverride$.outboundSchema = exports.QualityOverride$outboundSchema;
})(QualityOverride$ || (exports.QualityOverride$ = QualityOverride$ = {}));
function qualityOverrideToJSON(qualityOverride) {
    return JSON.stringify(exports.QualityOverride$outboundSchema.parse(qualityOverride));
}
function qualityOverrideFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.QualityOverride$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'QualityOverride' from JSON`);
}
/** @internal */
exports.ExplicitAssetRequestBody$inboundSchema = z.object({
    signature: z.string().optional(),
    timestamp: z.number().int().optional(),
    api_key: z.string().optional(),
    accessibility_analysis: z.boolean().optional(),
    asset_folder: z.string().optional(),
    async: z.boolean().optional(),
    auto_chaptering: z.boolean().optional(),
    auto_transcription: z.boolean().optional(),
    cinemagraph_analysis: z.boolean().optional(),
    colors: z.boolean().default(false),
    context: z.string().optional(),
    custom_coordinates: z.string().optional(),
    display_name: z.string().optional(),
    eager: z.string().optional(),
    eager_async: z.boolean().optional(),
    eager_notification_url: z.string().optional(),
    face_coordinates: z.string().optional(),
    faces: z.boolean().optional(),
    headers: z.string().optional(),
    invalidate: z.boolean().optional(),
    media_metadata: z.boolean().optional(),
    metadata: z.string().optional(),
    moderation: exports.ExplicitAssetModeration$inboundSchema.optional(),
    notification_url: z.string().optional(),
    phash: z.boolean().optional(),
    quality_analysis: z.boolean().optional(),
    regions: z.string().optional(),
    responsive_breakpoints: z.array(z.lazy(() => exports.ResponsiveBreakpoint$inboundSchema)).optional(),
    tags: z.string().optional(),
    callback: z.string().optional(),
    public_id: z.string(),
    type: exports.ExplicitAssetType$inboundSchema.optional(),
    overwrite: z.boolean().optional(),
    quality_override: z.union([z.string(), z.number().int()]).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "api_key": "apiKey",
        "accessibility_analysis": "accessibilityAnalysis",
        "asset_folder": "assetFolder",
        "auto_chaptering": "autoChaptering",
        "auto_transcription": "autoTranscription",
        "cinemagraph_analysis": "cinemagraphAnalysis",
        "custom_coordinates": "customCoordinates",
        "display_name": "displayName",
        "eager_async": "eagerAsync",
        "eager_notification_url": "eagerNotificationUrl",
        "face_coordinates": "faceCoordinates",
        "media_metadata": "mediaMetadata",
        "notification_url": "notificationUrl",
        "quality_analysis": "qualityAnalysis",
        "responsive_breakpoints": "responsiveBreakpoints",
        "public_id": "publicId",
        "quality_override": "qualityOverride",
    });
});
/** @internal */
exports.ExplicitAssetRequestBody$outboundSchema = z.object({
    signature: z.string().optional(),
    timestamp: z.number().int().optional(),
    apiKey: z.string().optional(),
    accessibilityAnalysis: z.boolean().optional(),
    assetFolder: z.string().optional(),
    async: z.boolean().optional(),
    autoChaptering: z.boolean().optional(),
    autoTranscription: z.boolean().optional(),
    cinemagraphAnalysis: z.boolean().optional(),
    colors: z.boolean().default(false),
    context: z.string().optional(),
    customCoordinates: z.string().optional(),
    displayName: z.string().optional(),
    eager: z.string().optional(),
    eagerAsync: z.boolean().optional(),
    eagerNotificationUrl: z.string().optional(),
    faceCoordinates: z.string().optional(),
    faces: z.boolean().optional(),
    headers: z.string().optional(),
    invalidate: z.boolean().optional(),
    mediaMetadata: z.boolean().optional(),
    metadata: z.string().optional(),
    moderation: exports.ExplicitAssetModeration$outboundSchema.optional(),
    notificationUrl: z.string().optional(),
    phash: z.boolean().optional(),
    qualityAnalysis: z.boolean().optional(),
    regions: z.string().optional(),
    responsiveBreakpoints: z.array(z.lazy(() => exports.ResponsiveBreakpoint$outboundSchema)).optional(),
    tags: z.string().optional(),
    callback: z.string().optional(),
    publicId: z.string(),
    type: exports.ExplicitAssetType$outboundSchema.optional(),
    overwrite: z.boolean().optional(),
    qualityOverride: z.union([z.string(), z.number().int()]).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        apiKey: "api_key",
        accessibilityAnalysis: "accessibility_analysis",
        assetFolder: "asset_folder",
        autoChaptering: "auto_chaptering",
        autoTranscription: "auto_transcription",
        cinemagraphAnalysis: "cinemagraph_analysis",
        customCoordinates: "custom_coordinates",
        displayName: "display_name",
        eagerAsync: "eager_async",
        eagerNotificationUrl: "eager_notification_url",
        faceCoordinates: "face_coordinates",
        mediaMetadata: "media_metadata",
        notificationUrl: "notification_url",
        qualityAnalysis: "quality_analysis",
        responsiveBreakpoints: "responsive_breakpoints",
        publicId: "public_id",
        qualityOverride: "quality_override",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var ExplicitAssetRequestBody$;
(function (ExplicitAssetRequestBody$) {
    /** @deprecated use `ExplicitAssetRequestBody$inboundSchema` instead. */
    ExplicitAssetRequestBody$.inboundSchema = exports.ExplicitAssetRequestBody$inboundSchema;
    /** @deprecated use `ExplicitAssetRequestBody$outboundSchema` instead. */
    ExplicitAssetRequestBody$.outboundSchema = exports.ExplicitAssetRequestBody$outboundSchema;
})(ExplicitAssetRequestBody$ || (exports.ExplicitAssetRequestBody$ = ExplicitAssetRequestBody$ = {}));
function explicitAssetRequestBodyToJSON(explicitAssetRequestBody) {
    return JSON.stringify(exports.ExplicitAssetRequestBody$outboundSchema.parse(explicitAssetRequestBody));
}
function explicitAssetRequestBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ExplicitAssetRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ExplicitAssetRequestBody' from JSON`);
}
/** @internal */
exports.ExplicitAssetRequest$inboundSchema = z.object({
    resource_type: exports.ExplicitAssetResourceType$inboundSchema,
    RequestBody: z.lazy(() => exports.ExplicitAssetRequestBody$inboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "resource_type": "resourceType",
        "RequestBody": "requestBody",
    });
});
/** @internal */
exports.ExplicitAssetRequest$outboundSchema = z.object({
    resourceType: exports.ExplicitAssetResourceType$outboundSchema,
    requestBody: z.lazy(() => exports.ExplicitAssetRequestBody$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 ExplicitAssetRequest$;
(function (ExplicitAssetRequest$) {
    /** @deprecated use `ExplicitAssetRequest$inboundSchema` instead. */
    ExplicitAssetRequest$.inboundSchema = exports.ExplicitAssetRequest$inboundSchema;
    /** @deprecated use `ExplicitAssetRequest$outboundSchema` instead. */
    ExplicitAssetRequest$.outboundSchema = exports.ExplicitAssetRequest$outboundSchema;
})(ExplicitAssetRequest$ || (exports.ExplicitAssetRequest$ = ExplicitAssetRequest$ = {}));
function explicitAssetRequestToJSON(explicitAssetRequest) {
    return JSON.stringify(exports.ExplicitAssetRequest$outboundSchema.parse(explicitAssetRequest));
}
function explicitAssetRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ExplicitAssetRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ExplicitAssetRequest' from JSON`);
}
//# sourceMappingURL=explicitasset.js.map