/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: efcaf938985b
 */
import * as z from "zod";
import { AccessControlItem$zodSchema, } from "./accesscontrolitem.js";
import { ExplicitDeliveryType$zodSchema, } from "./explicitdeliverytype.js";
import { ResponsiveBreakpoint$zodSchema, } from "./responsivebreakpoint.js";
import { StructuredMetadataParam$zodSchema, } from "./structuredmetadataparam.js";
import { TagsParam$zodSchema } from "./tagsparam.js";
export const ExplicitRequestAutoTranscription$zodSchema = z.object({
    translate: z.array(z.string()).optional().describe("Array of target language codes for transcription translation."),
}).describe("Configuration object for automatic video transcription with translation options.");
export const ExplicitRequestAutoTranscriptionUnion$zodSchema = z.union([
    z.boolean(),
    z.lazy(() => ExplicitRequestAutoTranscription$zodSchema),
]);
/**
 * Deprecated. Use access_control instead. Allows the asset to behave as if it's of the authenticated delivery type while still using the default 'upload' type in delivery URLs. The asset can later be made public by changing its access_mode via the Admin API, without having to update any delivery URLs.
 *
 * @remarks
 *
 * @deprecated enum: The access_mode parameter is no longer supported. To restrict access to assets, you can use the access_control parameter.. Use access_control instead.
 */
export const ExplicitRequestAccessMode = {
    Public: "public",
    Authenticated: "authenticated",
};
export const ExplicitRequestAccessMode$zodSchema = z.enum([
    "public",
    "authenticated",
]).describe("Deprecated. Use access_control instead. Allows the asset to behave as if it's of the authenticated delivery type while still using the default 'upload' type in delivery URLs. The asset can later be made public by changing its access_mode via the Admin API, without having to update any delivery URLs.\n");
export const ExplicitRequestRegions$zodSchema = z.union([
    z.string(),
    z.record(z.string(), z.array(z.array(z.int()))),
]).describe("Named region coordinate groups for cropping with region gravity.\nCan be a JSON-encoded string or an object. Each region name may contain\nonly letters, numbers, or hyphens, and must have at least two coordinate pairs.\n");
export const ExplicitRequestResponsiveBreakpoints$zodSchema = z.union([
    z.array(ResponsiveBreakpoint$zodSchema),
    ResponsiveBreakpoint$zodSchema,
]).describe("Settings to automatically generate breakpoints for responsive images.");
export const QualityOverride$zodSchema = z.union([
    z.string(),
    z.int(),
]).describe("Override the quality setting for this asset.");
export const ExplicitRequest$zodSchema = z.object({
    access_control: z.array(AccessControlItem$zodSchema).optional().describe("Restricts access to the asset by specifying one or more access types.\nThe asset is restricted unless at least one listed access type is valid.\n"),
    access_mode: ExplicitRequestAccessMode$zodSchema.optional().describe("Deprecated. Use access_control instead. Allows the asset to behave as if it's of the authenticated delivery type while still using the default 'upload' type in delivery URLs. The asset can later be made public by changing its access_mode via the Admin API, without having to update any delivery URLs.\n"),
    accessibility_analysis: z.boolean().optional().describe("Whether to return accessibility analysis values for the image."),
    allowed_formats: z.string().optional().describe("A comma-separated list of file formats that are allowed for uploading. Files of other types will be rejected. The formats can be any combination of image types, video formats or raw file extensions.\nNote: You can also add the `format` parameter to convert other file types instead of rejecting them. In this case, only files that would normally be rejected are converted, any file format allowed for upload won't be converted.\n"),
    asset_folder: z.string().optional().describe("The asset folder to assign to the asset."),
    async: z.boolean().optional().describe("When set to true, returns the uploaded asset's public_id immediately in the response, before the upload is completed (asynchronously). Default: false.\n"),
    auto_chaptering: z.boolean().optional().describe("Whether to trigger automatic generation of video chapters. Chapters will be generated and saved as a .vtt file with -chapters appended to the public ID of the video. You can enable chapters as part of the Cloudinary Video Player. Relevant for videos only."),
    auto_tagging: z.number().optional().describe("Automatically assigns tags to an asset according to detected objects or categories with a confidence score higher than the specified value.\nUse together with the detection parameter for:\n- Cloudinary AI Content Analysis\n- Amazon Rekognition Celebrity Detection\nUse together with the categorization parameter for:\n- Google Automatic Video Tagging\n- Google Auto Tagging\n- Imagga Auto Tagging\n- Amazon Rekognition Auto Tagging\n"),
    auto_transcription: z.union([
        z.boolean(),
        z.lazy(() => ExplicitRequestAutoTranscription$zodSchema),
    ]).optional(),
    background_removal: z.string().optional().describe("Automatically remove the background of an image using an add-on.\n- Set to cloudinary_ai to use the deep-learning based Cloudinary AI Background Removal add-on.\n  Optionally append a template suffix (e.g., cloudinary_ai:fine_edges).\n- Note: this feature has been superseded by background removal on the fly.\n- Set to pixelz to use the human-powered Pixelz Remove-The-Background Editing add-on service.\nRelevant for images only.\n"),
    backup: z.boolean().optional().describe("Whether to backup the uploaded asset. When set to true, backs up uploaded assets to a secondary storage bucket."),
    callback: z.string().optional().describe("A URL to redirect to after the upload/explicit is completed instead of returning the upload response.\nSigned upload result parameters are added to the callback URL. This parameter is ignored for XHR (Ajax XMLHttpRequest) or JavaScript Fetch API upload requests.\nNote: This parameter is relevant for direct uploads from a form in the browser. It is automatically set if you perform direct upload from the browser using Cloudinary's SDKs and the jQuery plugin.\n"),
    categorization: z.string().optional().describe("A comma-separated list of the categorization add-ons to run on the asset.\nSet to google_tagging, google_video_tagging, imagga_tagging and/or aws_rek_tagging\nto automatically classify the scenes of the uploaded asset.\nOptionally append a language code suffix (e.g., google_tagging:fr).\n"),
    cinemagraph_analysis: z.boolean().optional().describe("Whether to return a cinemagraph analysis value for the media asset between 0 and 1, where 0 means the asset is not a cinemagraph and 1 means the asset is a cinemagraph. Relevant for animated images and video only. A static image will return 0."),
    clear_invalid: z.boolean().default(false).describe("Whether to clear metadata field values that have become invalid due to a change in metadata rules. If false, the API returns an error if any existing metadata value is no longer valid. Default: false."),
    colors: z.boolean().default(false).describe("Whether to retrieve predominant colors & color histogram of the uploaded image. Note: If all returned colors are opaque, then 6-digit RGB hex values are returned. If one or more colors contain an alpha channel, then 8-digit RGBA hex quadruplet values are returned."),
    context: z.string().optional().describe("A pipe-separated list of key-value pairs of general textual context metadata to attach to the asset (e.g., \"alt=My image|caption=Nice photo\"). The =, \", and | characters can be escaped with a prepending backslash (\\)."),
    custom_coordinates: z.string().optional().describe("Custom coordinates as comma-separated values, with multiple coordinates separated by pipes."),
    detection: z.string().optional().describe("Invokes the relevant add-on to return a list of detected content.\nSet to:\n- <content-aware model>_[<version>] (e.g. coco_v2) to return a list of detected content using the Cloudinary AI Content Analysis add-on. Can be used together with the auto_tagging parameter to apply tags automatically.\n- captioning to analyze an image and suggest a caption based on the image's contents.\n- iqa to analyze the quality of an image.\n- watermark-detection to detect watermarks in an image.\n- adv_face to return a list of facial attributes using the Advanced Facial Attribute Detection add-on.\n- aws_rek_face to return a list of detected celebrities and facial attributes using the Amazon Rekognition Celebrity Detection add-on. Can be used together with the auto_tagging parameter to apply tags automatically.\n"),
    discard_original_filename: z.boolean().optional().describe("Whether to discard the name of the original uploaded file. Relevant when delivering assets as attachments (setting the flag disposition:attachment in delivery URLs)."),
    display_name: z.string().optional().describe("A display name for the asset."),
    eager: z.string().optional().describe("A list of transformations to eagerly generate for the asset. Accepts either a single transformation or a pipe-separated list of transformations."),
    eager_async: z.boolean().optional().describe("Whether to generate the eager transformations asynchronously in the background after the upload request is completed rather than before the upload is completed."),
    eager_notification_url: z.string().optional().describe("A URL to notify when eager transformations are completed."),
    eval: z.string().optional().describe("Allows you to modify upload parameters by specifying custom logic with JavaScript. This can be useful for conditionally adding tags, contextual metadata, structured metadata or eager transformations depending on specific criteria of the uploaded file."),
    face_coordinates: z.string().optional().describe("Face coordinates as comma-separated values, with multiple faces separated by pipes."),
    faces: z.boolean().optional().describe("Whether to detect faces in the asset."),
    filename_override: z.string().optional().describe("Overrides the originally uploaded asset's file name in downloads that use flags like fl_attachment or fl_force_original."),
    folder: z.string().optional().describe("Folder name where the uploaded asset will be stored. This parameter applies when using the Admin API, or when specifying the upload preset for unsigned uploading with the Upload API."),
    format: z.string().optional().describe("An optional format to convert the uploaded asset to before saving in the cloud."),
    headers: z.string().optional().describe("An HTTP header or a list of headers lines for adding as response HTTP headers when delivering the asset to your users. Supported headers: Link, Authorization, X-Robots-Tag.\n"),
    invalidate: z.boolean().optional().describe("Whether to invalidate CDN cache copies of a previously uploaded asset that shares the same public ID. Default: false.\n"),
    media_metadata: z.boolean().optional().describe("Whether to return IPTC, XMP, and detailed Exif metadata of the uploaded asset in the response.\nSupported for images, video, and audio.\n- Returned metadata for images includes: PixelsPerUnitX, PixelsPerUnitY, PixelUnits, Colorspace, and DPI.\n- Returned metadata for audio and video includes: audio_codec, audio_bit_rate, audio_frequency, channels, channel_layout.\n- Additional metadata for video includes: pix_format, codec, level, profile, video_bit_rate, dar.\n"),
    metadata: StructuredMetadataParam$zodSchema.optional().describe("A pipe-separated list or a map of custom metadata fields (by external_id) and the values to assign to each of them. The = \" and | characters can be supported as values when escaped with a prepended backslash (\\). For a multi-select field, you can set a maximum of 3000 different metadata values on an asset.\n"),
    moderation: z.string().optional().describe("For all asset types, set to:\n- manual to add the uploaded asset to a list of pending assets that can be moderated using the Admin API or the Cloudinary Console.\n- perception_point to automatically moderate the uploaded asset using the Perception Point Malware Detection add-on.\n\nFor images only, set to:\n- webpurify to automatically moderate the uploaded image using the WebPurify Image Moderation add-on.\n- aws_rek to automatically moderate the uploaded image using the Amazon Rekognition AI Moderation add-on.\n- 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.\n\nFor videos only, set to:\n- aws_rek_video to automatically moderate the uploaded video using the Amazon Rekognition Video Moderation add-on.\n- google_video_moderation automatically moderate the uploaded video using the Google AI Video Moderation add-on.\n\nTo request multiple moderations in a single API call:\n- Send the desired list of moderations as a pipe-separated string with manual moderation, if relevant, being last.\n\nNote: Rejected assets are automatically invalidated on the CDN within approximately ten minutes.\n"),
    notification_url: z.string().optional().describe("A URL to notify when the asset is ready."),
    ocr: z.string().optional().describe("Set to adv_ocr to extract all text elements in an image as well as the bounding box\ncoordinates of each detected element using the OCR text detection and extraction add-on.\nOptionally append options (e.g., adv_ocr:document).\n"),
    on_success: z.string().optional().describe("Allows you to update an asset by specifying custom logic with JavaScript that is executed after the upload to Cloudinary is completed successfully. This can be useful for conditionally adding tags, contextual metadata, and structured metadata, depending on the results of using the detection parameter on upload."),
    overwrite: z.boolean().optional().describe("When applying eager for already existing video transformations, this setting indicates whether to force the existing derived video resources to be regenerated. Default for videos: false.\nNote: When specifying existing eager transformations for images, corresponding derived images are always regenerated.\n"),
    phash: z.boolean().optional().describe("Whether to return the perceptual hash (pHash) on the uploaded image for image similarity detection.\n"),
    proxy: z.string().optional().describe("A proxy to use for fetching remote URLs. The format should be http://hostname:port."),
    public_id: z.string().describe("The public ID of the existing asset to apply operations on."),
    public_id_prefix: z.string().optional().describe("A string or path that's automatically prepended to the public_id with a forward slash. The value can contain the same characters as the public_id including additional forward slashes. This prefix can be useful to provide context and improve the SEO of an asset's filename in the delivery URL, but the value does not impact the location where the asset is stored."),
    quality_analysis: z.boolean().optional().describe("Whether to return a quality analysis value for the image between 0 and 1, where 0 means the image is blurry and out of focus and 1 means the image is sharp and in focus. Relevant for images only."),
    quality_override: z.union([
        z.string(),
        z.int(),
    ]).optional().describe("Override the quality setting for this asset."),
    raw_convert: z.string().optional().describe("Generates a related file based on the uploaded file.\n- Set to aspose to automatically create a PDF or other image format from a raw Office document using the Aspose Document Conversion add-on. (Asynchronous)\n- Set to google_speech to instruct the Google AI Video Transcription add-on to generate an automatic transcript raw file from an uploaded video. (Asynchronous)\n- Set to extract_text to extract all the text from a PDF file and store it in a raw JSON file with a public ID in the format: [pdf_public_id].extract_text.json. The full URL of the generated JSON file is included in the API response. Unlike the above raw_convert options, this option doesn't require registering for an add-on.(Synchronous)\n- Set to azure_video_indexer to generate AI-powered video insights from Microsoft Azure. (Asynchronous)\n"),
    regions: z.union([
        z.string(),
        z.record(z.string(), z.array(z.array(z.int()))),
    ]).optional().describe("Named region coordinate groups for cropping with region gravity.\nCan be a JSON-encoded string or an object. Each region name may contain\nonly letters, numbers, or hyphens, and must have at least two coordinate pairs.\n"),
    responsive_breakpoints: z.union([
        z.array(ResponsiveBreakpoint$zodSchema),
        ResponsiveBreakpoint$zodSchema,
    ]).optional().describe("Settings to automatically generate breakpoints for responsive images."),
    return_delete_token: z.boolean().optional().describe("Whether to return a deletion token in the upload response. The token can be used to delete the uploaded asset within approximately 10 minutes using an unauthenticated API call."),
    tags: TagsParam$zodSchema.optional().describe("A comma-separated list of tag names, or an array of tag names."),
    transformation: z.string().optional().describe("An incoming transformation to run on the uploaded asset before its storage. In contrast to eager, this parameter is applied before the file is stored."),
    type: ExplicitDeliveryType$zodSchema.optional().describe("Delivery types accepted by the explicit operation."),
    unique_display_name: z.boolean().optional().describe("Whether the display name should be unique."),
    unique_filename: z.boolean().optional().describe("When set to false and used together with use_filename, if an asset with the same file name already exists, no random characters are appended to the file name. Instead, the asset is overwritten. Default: true (random characters are added to the file name if needed).\n"),
    upload_preset: z.string().optional().describe("Name of an upload preset that you defined for your Cloudinary product environment. An upload preset consists of upload parameters centrally managed using the Admin API or from the Upload Presets page of the Console Settings."),
    use_asset_folder_as_public_id_prefix: z.boolean().optional().describe("Whether to add the asset_folder value as a prefix to the public_id value (prepended with a forward slash). This ensures that the public ID path will always match the initial asset folder, and can help to retain the behavior that previously existed in fixed folder mode. However, keep in mind that even when this option is used during upload, an asset with a certain public ID path can later be moved to a completely different asset folder hierarchy without impacting the public ID. This option only ensures path matching for the initial upload. Relevant only when public_id_prefix (or folder) has not been separately specified."),
    use_filename: z.boolean().optional().describe("Whether to use the original file name of the uploaded asset if available for the public ID. The file name is normalized and random characters are appended to ensure uniqueness if the file name already exists. Default: false.\n"),
    use_filename_as_display_name: z.boolean().optional().describe("Whether to automatically assign the original filename of the uploaded asset as the asset's display name. Relevant only if the display_name parameter isn't set."),
    visual_search: z.boolean().optional().describe("Whether to index the image for use with visual searches. Relevant for images only."),
}).describe("Common parameters for configuring an asset, including transformation, tagging, metadata, and moderation options.");
//# sourceMappingURL=explicitrequest.js.map