/*
 * 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 storage type of the asset. Defaults to 'upload'.
 */
export const Kind = {
    Upload: "upload",
    Private: "private",
    Authenticated: "authenticated",
};
/** @internal */
export const Kind$inboundSchema = z.nativeEnum(Kind);
/** @internal */
export const Kind$outboundSchema = Kind$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var Kind$;
(function (Kind$) {
    /** @deprecated use `Kind$inboundSchema` instead. */
    Kind$.inboundSchema = Kind$inboundSchema;
    /** @deprecated use `Kind$outboundSchema` instead. */
    Kind$.outboundSchema = Kind$outboundSchema;
})(Kind$ || (Kind$ = {}));
/** @internal */
export const NonFinalChunkUploadResponse$inboundSchema = z.object({
    done: z.boolean(),
    bytes: z.number().int(),
    kind: Kind$inboundSchema.optional(),
    resource_type: z.string().optional(),
    public_id: z.string().optional(),
}).transform((v) => {
    return remap$(v, {
        "resource_type": "resourceType",
        "public_id": "publicId",
    });
});
/** @internal */
export const NonFinalChunkUploadResponse$outboundSchema = z.object({
    done: z.boolean(),
    bytes: z.number().int(),
    kind: Kind$outboundSchema.optional(),
    resourceType: z.string().optional(),
    publicId: z.string().optional(),
}).transform((v) => {
    return remap$(v, {
        resourceType: "resource_type",
        publicId: "public_id",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var NonFinalChunkUploadResponse$;
(function (NonFinalChunkUploadResponse$) {
    /** @deprecated use `NonFinalChunkUploadResponse$inboundSchema` instead. */
    NonFinalChunkUploadResponse$.inboundSchema = NonFinalChunkUploadResponse$inboundSchema;
    /** @deprecated use `NonFinalChunkUploadResponse$outboundSchema` instead. */
    NonFinalChunkUploadResponse$.outboundSchema = NonFinalChunkUploadResponse$outboundSchema;
})(NonFinalChunkUploadResponse$ || (NonFinalChunkUploadResponse$ = {}));
export function nonFinalChunkUploadResponseToJSON(nonFinalChunkUploadResponse) {
    return JSON.stringify(NonFinalChunkUploadResponse$outboundSchema.parse(nonFinalChunkUploadResponse));
}
export function nonFinalChunkUploadResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => NonFinalChunkUploadResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'NonFinalChunkUploadResponse' from JSON`);
}
//# sourceMappingURL=nonfinalchunkuploadresponse.js.map