/*
 * 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 apply operations on. "image" for images, "video" for videos, or "raw" for non-media files.
 */
export const 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.
 */
export const 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'.
 */
export const ExplicitAssetType = {
    Upload: "upload",
    Private: "private",
    Authenticated: "authenticated",
    Fetch: "fetch",
};
/** @internal */
export const ExplicitAssetGlobals$inboundSchema = z.object({
    cloud_name: z.string().optional(),
}).transform((v) => {
    return remap$(v, {
        "cloud_name": "cloudName",
    });
});
/** @internal */
export const ExplicitAssetGlobals$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 ExplicitAssetGlobals$;
(function (ExplicitAssetGlobals$) {
    /** @deprecated use `ExplicitAssetGlobals$inboundSchema` instead. */
    ExplicitAssetGlobals$.inboundSchema = ExplicitAssetGlobals$inboundSchema;
    /** @deprecated use `ExplicitAssetGlobals$outboundSchema` instead. */
    ExplicitAssetGlobals$.outboundSchema = ExplicitAssetGlobals$outboundSchema;
})(ExplicitAssetGlobals$ || (ExplicitAssetGlobals$ = {}));
export function explicitAssetGlobalsToJSON(explicitAssetGlobals) {
    return JSON.stringify(ExplicitAssetGlobals$outboundSchema.parse(explicitAssetGlobals));
}
export function explicitAssetGlobalsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ExplicitAssetGlobals$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ExplicitAssetGlobals' from JSON`);
}
/** @internal */
export const ExplicitAssetResourceType$inboundSchema = z.nativeEnum(ExplicitAssetResourceType);
/** @internal */
export const ExplicitAssetResourceType$outboundSchema = ExplicitAssetResourceType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ExplicitAssetResourceType$;
(function (ExplicitAssetResourceType$) {
    /** @deprecated use `ExplicitAssetResourceType$inboundSchema` instead. */
    ExplicitAssetResourceType$.inboundSchema = ExplicitAssetResourceType$inboundSchema;
    /** @deprecated use `ExplicitAssetResourceType$outboundSchema` instead. */
    ExplicitAssetResourceType$.outboundSchema = ExplicitAssetResourceType$outboundSchema;
})(ExplicitAssetResourceType$ || (ExplicitAssetResourceType$ = {}));
/** @internal */
export const ExplicitAssetModeration$inboundSchema = z.nativeEnum(ExplicitAssetModeration);
/** @internal */
export const ExplicitAssetModeration$outboundSchema = ExplicitAssetModeration$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ExplicitAssetModeration$;
(function (ExplicitAssetModeration$) {
    /** @deprecated use `ExplicitAssetModeration$inboundSchema` instead. */
    ExplicitAssetModeration$.inboundSchema = ExplicitAssetModeration$inboundSchema;
    /** @deprecated use `ExplicitAssetModeration$outboundSchema` instead. */
    ExplicitAssetModeration$.outboundSchema = ExplicitAssetModeration$outboundSchema;
})(ExplicitAssetModeration$ || (ExplicitAssetModeration$ = {}));
/** @internal */
export const 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 remap$(v, {
        "create_derived": "createDerived",
        "max_width": "maxWidth",
        "min_width": "minWidth",
        "bytes_step": "bytesStep",
        "max_images": "maxImages",
    });
});
/** @internal */
export const 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 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.
 */
export var ResponsiveBreakpoint$;
(function (ResponsiveBreakpoint$) {
    /** @deprecated use `ResponsiveBreakpoint$inboundSchema` instead. */
    ResponsiveBreakpoint$.inboundSchema = ResponsiveBreakpoint$inboundSchema;
    /** @deprecated use `ResponsiveBreakpoint$outboundSchema` instead. */
    ResponsiveBreakpoint$.outboundSchema = ResponsiveBreakpoint$outboundSchema;
})(ResponsiveBreakpoint$ || (ResponsiveBreakpoint$ = {}));
export function responsiveBreakpointToJSON(responsiveBreakpoint) {
    return JSON.stringify(ResponsiveBreakpoint$outboundSchema.parse(responsiveBreakpoint));
}
export function responsiveBreakpointFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ResponsiveBreakpoint$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponsiveBreakpoint' from JSON`);
}
/** @internal */
export const ExplicitAssetType$inboundSchema = z.nativeEnum(ExplicitAssetType);
/** @internal */
export const ExplicitAssetType$outboundSchema = ExplicitAssetType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ExplicitAssetType$;
(function (ExplicitAssetType$) {
    /** @deprecated use `ExplicitAssetType$inboundSchema` instead. */
    ExplicitAssetType$.inboundSchema = ExplicitAssetType$inboundSchema;
    /** @deprecated use `ExplicitAssetType$outboundSchema` instead. */
    ExplicitAssetType$.outboundSchema = ExplicitAssetType$outboundSchema;
})(ExplicitAssetType$ || (ExplicitAssetType$ = {}));
/** @internal */
export const QualityOverride$inboundSchema = z.union([z.string(), z.number().int()]);
/** @internal */
export const 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.
 */
export var QualityOverride$;
(function (QualityOverride$) {
    /** @deprecated use `QualityOverride$inboundSchema` instead. */
    QualityOverride$.inboundSchema = QualityOverride$inboundSchema;
    /** @deprecated use `QualityOverride$outboundSchema` instead. */
    QualityOverride$.outboundSchema = QualityOverride$outboundSchema;
})(QualityOverride$ || (QualityOverride$ = {}));
export function qualityOverrideToJSON(qualityOverride) {
    return JSON.stringify(QualityOverride$outboundSchema.parse(qualityOverride));
}
export function qualityOverrideFromJSON(jsonString) {
    return safeParse(jsonString, (x) => QualityOverride$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'QualityOverride' from JSON`);
}
/** @internal */
export const 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: 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(() => ResponsiveBreakpoint$inboundSchema)).optional(),
    tags: z.string().optional(),
    callback: z.string().optional(),
    public_id: z.string(),
    type: ExplicitAssetType$inboundSchema.optional(),
    overwrite: z.boolean().optional(),
    quality_override: z.union([z.string(), z.number().int()]).optional(),
}).transform((v) => {
    return 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 */
export const 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: ExplicitAssetModeration$outboundSchema.optional(),
    notificationUrl: z.string().optional(),
    phash: z.boolean().optional(),
    qualityAnalysis: z.boolean().optional(),
    regions: z.string().optional(),
    responsiveBreakpoints: z.array(z.lazy(() => ResponsiveBreakpoint$outboundSchema)).optional(),
    tags: z.string().optional(),
    callback: z.string().optional(),
    publicId: z.string(),
    type: ExplicitAssetType$outboundSchema.optional(),
    overwrite: z.boolean().optional(),
    qualityOverride: z.union([z.string(), z.number().int()]).optional(),
}).transform((v) => {
    return 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.
 */
export var ExplicitAssetRequestBody$;
(function (ExplicitAssetRequestBody$) {
    /** @deprecated use `ExplicitAssetRequestBody$inboundSchema` instead. */
    ExplicitAssetRequestBody$.inboundSchema = ExplicitAssetRequestBody$inboundSchema;
    /** @deprecated use `ExplicitAssetRequestBody$outboundSchema` instead. */
    ExplicitAssetRequestBody$.outboundSchema = ExplicitAssetRequestBody$outboundSchema;
})(ExplicitAssetRequestBody$ || (ExplicitAssetRequestBody$ = {}));
export function explicitAssetRequestBodyToJSON(explicitAssetRequestBody) {
    return JSON.stringify(ExplicitAssetRequestBody$outboundSchema.parse(explicitAssetRequestBody));
}
export function explicitAssetRequestBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ExplicitAssetRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ExplicitAssetRequestBody' from JSON`);
}
/** @internal */
export const ExplicitAssetRequest$inboundSchema = z.object({
    resource_type: ExplicitAssetResourceType$inboundSchema,
    RequestBody: z.lazy(() => ExplicitAssetRequestBody$inboundSchema),
}).transform((v) => {
    return remap$(v, {
        "resource_type": "resourceType",
        "RequestBody": "requestBody",
    });
});
/** @internal */
export const ExplicitAssetRequest$outboundSchema = z.object({
    resourceType: ExplicitAssetResourceType$outboundSchema,
    requestBody: z.lazy(() => ExplicitAssetRequestBody$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 ExplicitAssetRequest$;
(function (ExplicitAssetRequest$) {
    /** @deprecated use `ExplicitAssetRequest$inboundSchema` instead. */
    ExplicitAssetRequest$.inboundSchema = ExplicitAssetRequest$inboundSchema;
    /** @deprecated use `ExplicitAssetRequest$outboundSchema` instead. */
    ExplicitAssetRequest$.outboundSchema = ExplicitAssetRequest$outboundSchema;
})(ExplicitAssetRequest$ || (ExplicitAssetRequest$ = {}));
export function explicitAssetRequestToJSON(explicitAssetRequest) {
    return JSON.stringify(ExplicitAssetRequest$outboundSchema.parse(explicitAssetRequest));
}
export function explicitAssetRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ExplicitAssetRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ExplicitAssetRequest' from JSON`);
}
//# sourceMappingURL=explicitasset.js.map