/*
 * 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";
/** @internal */
export const UploadResponseImageMetadata$inboundSchema = z.object({});
/** @internal */
export const UploadResponseImageMetadata$outboundSchema = z.object({});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var UploadResponseImageMetadata$;
(function (UploadResponseImageMetadata$) {
    /** @deprecated use `UploadResponseImageMetadata$inboundSchema` instead. */
    UploadResponseImageMetadata$.inboundSchema = UploadResponseImageMetadata$inboundSchema;
    /** @deprecated use `UploadResponseImageMetadata$outboundSchema` instead. */
    UploadResponseImageMetadata$.outboundSchema = UploadResponseImageMetadata$outboundSchema;
})(UploadResponseImageMetadata$ || (UploadResponseImageMetadata$ = {}));
export function uploadResponseImageMetadataToJSON(uploadResponseImageMetadata) {
    return JSON.stringify(UploadResponseImageMetadata$outboundSchema.parse(uploadResponseImageMetadata));
}
export function uploadResponseImageMetadataFromJSON(jsonString) {
    return safeParse(jsonString, (x) => UploadResponseImageMetadata$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UploadResponseImageMetadata' from JSON`);
}
/** @internal */
export const Eager$inboundSchema = z
    .object({
    transformation: z.string().optional(),
    width: z.number().int().optional(),
    height: z.number().int().optional(),
    bytes: z.number().int().optional(),
    format: z.string().optional(),
    url: z.string().optional(),
    secure_url: z.string().optional(),
}).transform((v) => {
    return remap$(v, {
        "secure_url": "secureUrl",
    });
});
/** @internal */
export const Eager$outboundSchema = z.object({
    transformation: z.string().optional(),
    width: z.number().int().optional(),
    height: z.number().int().optional(),
    bytes: z.number().int().optional(),
    format: z.string().optional(),
    url: z.string().optional(),
    secureUrl: z.string().optional(),
}).transform((v) => {
    return remap$(v, {
        secureUrl: "secure_url",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var Eager$;
(function (Eager$) {
    /** @deprecated use `Eager$inboundSchema` instead. */
    Eager$.inboundSchema = Eager$inboundSchema;
    /** @deprecated use `Eager$outboundSchema` instead. */
    Eager$.outboundSchema = Eager$outboundSchema;
})(Eager$ || (Eager$ = {}));
export function eagerToJSON(eager) {
    return JSON.stringify(Eager$outboundSchema.parse(eager));
}
export function eagerFromJSON(jsonString) {
    return safeParse(jsonString, (x) => Eager$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Eager' from JSON`);
}
/** @internal */
export const UploadResponse$inboundSchema = z.object({
    url: z.string().optional(),
    secure_url: z.string().optional(),
    public_id: z.string().optional(),
    version: z.number().int().optional(),
    version_id: z.string().optional(),
    signature: z.string().optional(),
    width: z.number().int().optional(),
    height: z.number().int().optional(),
    asset_id: z.string().optional(),
    format: z.string().optional(),
    resource_type: z.string().optional(),
    created_at: z.string().optional(),
    tags: z.array(z.string()).optional(),
    pages: z.number().int().optional(),
    bytes: z.number().int().optional(),
    type: z.string().optional(),
    etag: z.string().optional(),
    placeholder: z.boolean().optional(),
    original_filename: z.string().optional(),
    image_metadata: z.lazy(() => UploadResponseImageMetadata$inboundSchema)
        .optional(),
    illustration_score: z.number().optional(),
    semi_transparent: z.boolean().optional(),
    grayscale: z.boolean().optional(),
    eager: z.array(z.lazy(() => Eager$inboundSchema)).optional(),
    api_key: z.string().optional(),
}).transform((v) => {
    return remap$(v, {
        "secure_url": "secureUrl",
        "public_id": "publicId",
        "version_id": "versionId",
        "asset_id": "assetId",
        "resource_type": "resourceType",
        "created_at": "createdAt",
        "original_filename": "originalFilename",
        "image_metadata": "imageMetadata",
        "illustration_score": "illustrationScore",
        "semi_transparent": "semiTransparent",
        "api_key": "apiKey",
    });
});
/** @internal */
export const UploadResponse$outboundSchema = z.object({
    url: z.string().optional(),
    secureUrl: z.string().optional(),
    publicId: z.string().optional(),
    version: z.number().int().optional(),
    versionId: z.string().optional(),
    signature: z.string().optional(),
    width: z.number().int().optional(),
    height: z.number().int().optional(),
    assetId: z.string().optional(),
    format: z.string().optional(),
    resourceType: z.string().optional(),
    createdAt: z.string().optional(),
    tags: z.array(z.string()).optional(),
    pages: z.number().int().optional(),
    bytes: z.number().int().optional(),
    type: z.string().optional(),
    etag: z.string().optional(),
    placeholder: z.boolean().optional(),
    originalFilename: z.string().optional(),
    imageMetadata: z.lazy(() => UploadResponseImageMetadata$outboundSchema)
        .optional(),
    illustrationScore: z.number().optional(),
    semiTransparent: z.boolean().optional(),
    grayscale: z.boolean().optional(),
    eager: z.array(z.lazy(() => Eager$outboundSchema)).optional(),
    apiKey: z.string().optional(),
}).transform((v) => {
    return remap$(v, {
        secureUrl: "secure_url",
        publicId: "public_id",
        versionId: "version_id",
        assetId: "asset_id",
        resourceType: "resource_type",
        createdAt: "created_at",
        originalFilename: "original_filename",
        imageMetadata: "image_metadata",
        illustrationScore: "illustration_score",
        semiTransparent: "semi_transparent",
        apiKey: "api_key",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var UploadResponse$;
(function (UploadResponse$) {
    /** @deprecated use `UploadResponse$inboundSchema` instead. */
    UploadResponse$.inboundSchema = UploadResponse$inboundSchema;
    /** @deprecated use `UploadResponse$outboundSchema` instead. */
    UploadResponse$.outboundSchema = UploadResponse$outboundSchema;
})(UploadResponse$ || (UploadResponse$ = {}));
export function uploadResponseToJSON(uploadResponse) {
    return JSON.stringify(UploadResponse$outboundSchema.parse(uploadResponse));
}
export function uploadResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => UploadResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UploadResponse' from JSON`);
}
//# sourceMappingURL=uploadresponse.js.map