/*
 * 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 DeleteBackupVersionsGlobals$inboundSchema = z.object({
    cloud_name: z.string().optional(),
}).transform((v) => {
    return remap$(v, {
        "cloud_name": "cloudName",
    });
});
/** @internal */
export const DeleteBackupVersionsGlobals$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 DeleteBackupVersionsGlobals$;
(function (DeleteBackupVersionsGlobals$) {
    /** @deprecated use `DeleteBackupVersionsGlobals$inboundSchema` instead. */
    DeleteBackupVersionsGlobals$.inboundSchema = DeleteBackupVersionsGlobals$inboundSchema;
    /** @deprecated use `DeleteBackupVersionsGlobals$outboundSchema` instead. */
    DeleteBackupVersionsGlobals$.outboundSchema = DeleteBackupVersionsGlobals$outboundSchema;
})(DeleteBackupVersionsGlobals$ || (DeleteBackupVersionsGlobals$ = {}));
export function deleteBackupVersionsGlobalsToJSON(deleteBackupVersionsGlobals) {
    return JSON.stringify(DeleteBackupVersionsGlobals$outboundSchema.parse(deleteBackupVersionsGlobals));
}
export function deleteBackupVersionsGlobalsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => DeleteBackupVersionsGlobals$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeleteBackupVersionsGlobals' from JSON`);
}
/** @internal */
export const DeleteBackupVersionsRequestBody$inboundSchema = z.object({
    version_ids: z.array(z.string()),
}).transform((v) => {
    return remap$(v, {
        "version_ids": "versionIds",
    });
});
/** @internal */
export const DeleteBackupVersionsRequestBody$outboundSchema = z.object({
    versionIds: z.array(z.string()),
}).transform((v) => {
    return remap$(v, {
        versionIds: "version_ids",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var DeleteBackupVersionsRequestBody$;
(function (DeleteBackupVersionsRequestBody$) {
    /** @deprecated use `DeleteBackupVersionsRequestBody$inboundSchema` instead. */
    DeleteBackupVersionsRequestBody$.inboundSchema = DeleteBackupVersionsRequestBody$inboundSchema;
    /** @deprecated use `DeleteBackupVersionsRequestBody$outboundSchema` instead. */
    DeleteBackupVersionsRequestBody$.outboundSchema = DeleteBackupVersionsRequestBody$outboundSchema;
})(DeleteBackupVersionsRequestBody$ || (DeleteBackupVersionsRequestBody$ = {}));
export function deleteBackupVersionsRequestBodyToJSON(deleteBackupVersionsRequestBody) {
    return JSON.stringify(DeleteBackupVersionsRequestBody$outboundSchema.parse(deleteBackupVersionsRequestBody));
}
export function deleteBackupVersionsRequestBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => DeleteBackupVersionsRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeleteBackupVersionsRequestBody' from JSON`);
}
/** @internal */
export const DeleteBackupVersionsRequest$inboundSchema = z.object({
    asset_id: z.string(),
    RequestBody: z.lazy(() => DeleteBackupVersionsRequestBody$inboundSchema),
}).transform((v) => {
    return remap$(v, {
        "asset_id": "assetId",
        "RequestBody": "requestBody",
    });
});
/** @internal */
export const DeleteBackupVersionsRequest$outboundSchema = z.object({
    assetId: z.string(),
    requestBody: z.lazy(() => DeleteBackupVersionsRequestBody$outboundSchema),
}).transform((v) => {
    return remap$(v, {
        assetId: "asset_id",
        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 DeleteBackupVersionsRequest$;
(function (DeleteBackupVersionsRequest$) {
    /** @deprecated use `DeleteBackupVersionsRequest$inboundSchema` instead. */
    DeleteBackupVersionsRequest$.inboundSchema = DeleteBackupVersionsRequest$inboundSchema;
    /** @deprecated use `DeleteBackupVersionsRequest$outboundSchema` instead. */
    DeleteBackupVersionsRequest$.outboundSchema = DeleteBackupVersionsRequest$outboundSchema;
})(DeleteBackupVersionsRequest$ || (DeleteBackupVersionsRequest$ = {}));
export function deleteBackupVersionsRequestToJSON(deleteBackupVersionsRequest) {
    return JSON.stringify(DeleteBackupVersionsRequest$outboundSchema.parse(deleteBackupVersionsRequest));
}
export function deleteBackupVersionsRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => DeleteBackupVersionsRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeleteBackupVersionsRequest' from JSON`);
}
/** @internal */
export const Failure$inboundSchema = z.object({
    version_id: z.string().optional(),
    error: z.string().optional(),
}).transform((v) => {
    return remap$(v, {
        "version_id": "versionId",
    });
});
/** @internal */
export const Failure$outboundSchema = z.object({
    versionId: z.string().optional(),
    error: z.string().optional(),
}).transform((v) => {
    return remap$(v, {
        versionId: "version_id",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var Failure$;
(function (Failure$) {
    /** @deprecated use `Failure$inboundSchema` instead. */
    Failure$.inboundSchema = Failure$inboundSchema;
    /** @deprecated use `Failure$outboundSchema` instead. */
    Failure$.outboundSchema = Failure$outboundSchema;
})(Failure$ || (Failure$ = {}));
export function failureToJSON(failure) {
    return JSON.stringify(Failure$outboundSchema.parse(failure));
}
export function failureFromJSON(jsonString) {
    return safeParse(jsonString, (x) => Failure$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Failure' from JSON`);
}
/** @internal */
export const DeleteBackupVersionsResponseBody2$inboundSchema = z.object({
    asset_id: z.string(),
    deleted_version_ids: z.array(z.string()),
    failures: z.array(z.lazy(() => Failure$inboundSchema)).optional(),
}).transform((v) => {
    return remap$(v, {
        "asset_id": "assetId",
        "deleted_version_ids": "deletedVersionIds",
    });
});
/** @internal */
export const DeleteBackupVersionsResponseBody2$outboundSchema = z.object({
    assetId: z.string(),
    deletedVersionIds: z.array(z.string()),
    failures: z.array(z.lazy(() => Failure$outboundSchema)).optional(),
}).transform((v) => {
    return remap$(v, {
        assetId: "asset_id",
        deletedVersionIds: "deleted_version_ids",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var DeleteBackupVersionsResponseBody2$;
(function (DeleteBackupVersionsResponseBody2$) {
    /** @deprecated use `DeleteBackupVersionsResponseBody2$inboundSchema` instead. */
    DeleteBackupVersionsResponseBody2$.inboundSchema = DeleteBackupVersionsResponseBody2$inboundSchema;
    /** @deprecated use `DeleteBackupVersionsResponseBody2$outboundSchema` instead. */
    DeleteBackupVersionsResponseBody2$.outboundSchema = DeleteBackupVersionsResponseBody2$outboundSchema;
})(DeleteBackupVersionsResponseBody2$ || (DeleteBackupVersionsResponseBody2$ = {}));
export function deleteBackupVersionsResponseBody2ToJSON(deleteBackupVersionsResponseBody2) {
    return JSON.stringify(DeleteBackupVersionsResponseBody2$outboundSchema.parse(deleteBackupVersionsResponseBody2));
}
export function deleteBackupVersionsResponseBody2FromJSON(jsonString) {
    return safeParse(jsonString, (x) => DeleteBackupVersionsResponseBody2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeleteBackupVersionsResponseBody2' from JSON`);
}
/** @internal */
export const DeleteBackupVersionsResponseBody1$inboundSchema = z.object({
    asset_id: z.string(),
    deleted_version_ids: z.array(z.string()),
}).transform((v) => {
    return remap$(v, {
        "asset_id": "assetId",
        "deleted_version_ids": "deletedVersionIds",
    });
});
/** @internal */
export const DeleteBackupVersionsResponseBody1$outboundSchema = z.object({
    assetId: z.string(),
    deletedVersionIds: z.array(z.string()),
}).transform((v) => {
    return remap$(v, {
        assetId: "asset_id",
        deletedVersionIds: "deleted_version_ids",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var DeleteBackupVersionsResponseBody1$;
(function (DeleteBackupVersionsResponseBody1$) {
    /** @deprecated use `DeleteBackupVersionsResponseBody1$inboundSchema` instead. */
    DeleteBackupVersionsResponseBody1$.inboundSchema = DeleteBackupVersionsResponseBody1$inboundSchema;
    /** @deprecated use `DeleteBackupVersionsResponseBody1$outboundSchema` instead. */
    DeleteBackupVersionsResponseBody1$.outboundSchema = DeleteBackupVersionsResponseBody1$outboundSchema;
})(DeleteBackupVersionsResponseBody1$ || (DeleteBackupVersionsResponseBody1$ = {}));
export function deleteBackupVersionsResponseBody1ToJSON(deleteBackupVersionsResponseBody1) {
    return JSON.stringify(DeleteBackupVersionsResponseBody1$outboundSchema.parse(deleteBackupVersionsResponseBody1));
}
export function deleteBackupVersionsResponseBody1FromJSON(jsonString) {
    return safeParse(jsonString, (x) => DeleteBackupVersionsResponseBody1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeleteBackupVersionsResponseBody1' from JSON`);
}
/** @internal */
export const DeleteBackupVersionsResponse$inboundSchema = z.union([
    z.lazy(() => DeleteBackupVersionsResponseBody1$inboundSchema),
    z.lazy(() => DeleteBackupVersionsResponseBody2$inboundSchema),
]);
/** @internal */
export const DeleteBackupVersionsResponse$outboundSchema = z.union([
    z.lazy(() => DeleteBackupVersionsResponseBody1$outboundSchema),
    z.lazy(() => DeleteBackupVersionsResponseBody2$outboundSchema),
]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var DeleteBackupVersionsResponse$;
(function (DeleteBackupVersionsResponse$) {
    /** @deprecated use `DeleteBackupVersionsResponse$inboundSchema` instead. */
    DeleteBackupVersionsResponse$.inboundSchema = DeleteBackupVersionsResponse$inboundSchema;
    /** @deprecated use `DeleteBackupVersionsResponse$outboundSchema` instead. */
    DeleteBackupVersionsResponse$.outboundSchema = DeleteBackupVersionsResponse$outboundSchema;
})(DeleteBackupVersionsResponse$ || (DeleteBackupVersionsResponse$ = {}));
export function deleteBackupVersionsResponseToJSON(deleteBackupVersionsResponse) {
    return JSON.stringify(DeleteBackupVersionsResponse$outboundSchema.parse(deleteBackupVersionsResponse));
}
export function deleteBackupVersionsResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => DeleteBackupVersionsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeleteBackupVersionsResponse' from JSON`);
}
//# sourceMappingURL=deletebackupversions.js.map