/*
 * 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 explode. only "image"
 */
export const ExplodeResourceResourceType = {
    Image: "image",
};
/**
 * description: The delivery type of the asset. Default: upload
 */
export const ExplodeResourceType = {
    Upload: "upload",
    Private: "private",
    Authenticated: "authenticated",
};
/**
 * The status of the explode operation.
 */
export const Status = {
    Processing: "processing",
};
/** @internal */
export const ExplodeResourceGlobals$inboundSchema = z.object({
    cloud_name: z.string().optional(),
}).transform((v) => {
    return remap$(v, {
        "cloud_name": "cloudName",
    });
});
/** @internal */
export const ExplodeResourceGlobals$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 ExplodeResourceGlobals$;
(function (ExplodeResourceGlobals$) {
    /** @deprecated use `ExplodeResourceGlobals$inboundSchema` instead. */
    ExplodeResourceGlobals$.inboundSchema = ExplodeResourceGlobals$inboundSchema;
    /** @deprecated use `ExplodeResourceGlobals$outboundSchema` instead. */
    ExplodeResourceGlobals$.outboundSchema = ExplodeResourceGlobals$outboundSchema;
})(ExplodeResourceGlobals$ || (ExplodeResourceGlobals$ = {}));
export function explodeResourceGlobalsToJSON(explodeResourceGlobals) {
    return JSON.stringify(ExplodeResourceGlobals$outboundSchema.parse(explodeResourceGlobals));
}
export function explodeResourceGlobalsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ExplodeResourceGlobals$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ExplodeResourceGlobals' from JSON`);
}
/** @internal */
export const ExplodeResourceResourceType$inboundSchema = z.nativeEnum(ExplodeResourceResourceType);
/** @internal */
export const ExplodeResourceResourceType$outboundSchema = ExplodeResourceResourceType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ExplodeResourceResourceType$;
(function (ExplodeResourceResourceType$) {
    /** @deprecated use `ExplodeResourceResourceType$inboundSchema` instead. */
    ExplodeResourceResourceType$.inboundSchema = ExplodeResourceResourceType$inboundSchema;
    /** @deprecated use `ExplodeResourceResourceType$outboundSchema` instead. */
    ExplodeResourceResourceType$.outboundSchema = ExplodeResourceResourceType$outboundSchema;
})(ExplodeResourceResourceType$ || (ExplodeResourceResourceType$ = {}));
/** @internal */
export const ExplodeResourceType$inboundSchema = z.nativeEnum(ExplodeResourceType);
/** @internal */
export const ExplodeResourceType$outboundSchema = ExplodeResourceType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ExplodeResourceType$;
(function (ExplodeResourceType$) {
    /** @deprecated use `ExplodeResourceType$inboundSchema` instead. */
    ExplodeResourceType$.inboundSchema = ExplodeResourceType$inboundSchema;
    /** @deprecated use `ExplodeResourceType$outboundSchema` instead. */
    ExplodeResourceType$.outboundSchema = ExplodeResourceType$outboundSchema;
})(ExplodeResourceType$ || (ExplodeResourceType$ = {}));
/** @internal */
export const ExplodeResourceRequestBody$inboundSchema = z.object({
    public_id: z.string(),
    format: z.string().optional(),
    transformation: z.string(),
    signature: z.string(),
    notification_url: z.string().optional(),
    type: ExplodeResourceType$inboundSchema.optional(),
}).transform((v) => {
    return remap$(v, {
        "public_id": "publicId",
        "notification_url": "notificationUrl",
    });
});
/** @internal */
export const ExplodeResourceRequestBody$outboundSchema = z.object({
    publicId: z.string(),
    format: z.string().optional(),
    transformation: z.string(),
    signature: z.string(),
    notificationUrl: z.string().optional(),
    type: ExplodeResourceType$outboundSchema.optional(),
}).transform((v) => {
    return remap$(v, {
        publicId: "public_id",
        notificationUrl: "notification_url",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ExplodeResourceRequestBody$;
(function (ExplodeResourceRequestBody$) {
    /** @deprecated use `ExplodeResourceRequestBody$inboundSchema` instead. */
    ExplodeResourceRequestBody$.inboundSchema = ExplodeResourceRequestBody$inboundSchema;
    /** @deprecated use `ExplodeResourceRequestBody$outboundSchema` instead. */
    ExplodeResourceRequestBody$.outboundSchema = ExplodeResourceRequestBody$outboundSchema;
})(ExplodeResourceRequestBody$ || (ExplodeResourceRequestBody$ = {}));
export function explodeResourceRequestBodyToJSON(explodeResourceRequestBody) {
    return JSON.stringify(ExplodeResourceRequestBody$outboundSchema.parse(explodeResourceRequestBody));
}
export function explodeResourceRequestBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ExplodeResourceRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ExplodeResourceRequestBody' from JSON`);
}
/** @internal */
export const ExplodeResourceRequest$inboundSchema = z.object({
    resource_type: ExplodeResourceResourceType$inboundSchema,
    RequestBody: z.lazy(() => ExplodeResourceRequestBody$inboundSchema),
}).transform((v) => {
    return remap$(v, {
        "resource_type": "resourceType",
        "RequestBody": "requestBody",
    });
});
/** @internal */
export const ExplodeResourceRequest$outboundSchema = z.object({
    resourceType: ExplodeResourceResourceType$outboundSchema,
    requestBody: z.lazy(() => ExplodeResourceRequestBody$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 ExplodeResourceRequest$;
(function (ExplodeResourceRequest$) {
    /** @deprecated use `ExplodeResourceRequest$inboundSchema` instead. */
    ExplodeResourceRequest$.inboundSchema = ExplodeResourceRequest$inboundSchema;
    /** @deprecated use `ExplodeResourceRequest$outboundSchema` instead. */
    ExplodeResourceRequest$.outboundSchema = ExplodeResourceRequest$outboundSchema;
})(ExplodeResourceRequest$ || (ExplodeResourceRequest$ = {}));
export function explodeResourceRequestToJSON(explodeResourceRequest) {
    return JSON.stringify(ExplodeResourceRequest$outboundSchema.parse(explodeResourceRequest));
}
export function explodeResourceRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ExplodeResourceRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ExplodeResourceRequest' from JSON`);
}
/** @internal */
export const Status$inboundSchema = z
    .nativeEnum(Status);
/** @internal */
export const Status$outboundSchema = Status$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var Status$;
(function (Status$) {
    /** @deprecated use `Status$inboundSchema` instead. */
    Status$.inboundSchema = Status$inboundSchema;
    /** @deprecated use `Status$outboundSchema` instead. */
    Status$.outboundSchema = Status$outboundSchema;
})(Status$ || (Status$ = {}));
/** @internal */
export const ExplodeResourceResponse$inboundSchema = z.object({
    status: Status$inboundSchema.optional(),
    batch_id: z.string().optional(),
}).transform((v) => {
    return remap$(v, {
        "batch_id": "batchId",
    });
});
/** @internal */
export const ExplodeResourceResponse$outboundSchema = z.object({
    status: Status$outboundSchema.optional(),
    batchId: z.string().optional(),
}).transform((v) => {
    return remap$(v, {
        batchId: "batch_id",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ExplodeResourceResponse$;
(function (ExplodeResourceResponse$) {
    /** @deprecated use `ExplodeResourceResponse$inboundSchema` instead. */
    ExplodeResourceResponse$.inboundSchema = ExplodeResourceResponse$inboundSchema;
    /** @deprecated use `ExplodeResourceResponse$outboundSchema` instead. */
    ExplodeResourceResponse$.outboundSchema = ExplodeResourceResponse$outboundSchema;
})(ExplodeResourceResponse$ || (ExplodeResourceResponse$ = {}));
export function explodeResourceResponseToJSON(explodeResourceResponse) {
    return JSON.stringify(ExplodeResourceResponse$outboundSchema.parse(explodeResourceResponse));
}
export function explodeResourceResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ExplodeResourceResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ExplodeResourceResponse' from JSON`);
}
//# sourceMappingURL=exploderesource.js.map