"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.DeleteBackupVersionsResponse$ = exports.DeleteBackupVersionsResponse$outboundSchema = exports.DeleteBackupVersionsResponse$inboundSchema = exports.DeleteBackupVersionsResponseBody1$ = exports.DeleteBackupVersionsResponseBody1$outboundSchema = exports.DeleteBackupVersionsResponseBody1$inboundSchema = exports.DeleteBackupVersionsResponseBody2$ = exports.DeleteBackupVersionsResponseBody2$outboundSchema = exports.DeleteBackupVersionsResponseBody2$inboundSchema = exports.Failure$ = exports.Failure$outboundSchema = exports.Failure$inboundSchema = exports.DeleteBackupVersionsRequest$ = exports.DeleteBackupVersionsRequest$outboundSchema = exports.DeleteBackupVersionsRequest$inboundSchema = exports.DeleteBackupVersionsRequestBody$ = exports.DeleteBackupVersionsRequestBody$outboundSchema = exports.DeleteBackupVersionsRequestBody$inboundSchema = exports.DeleteBackupVersionsGlobals$ = exports.DeleteBackupVersionsGlobals$outboundSchema = exports.DeleteBackupVersionsGlobals$inboundSchema = void 0;
exports.deleteBackupVersionsGlobalsToJSON = deleteBackupVersionsGlobalsToJSON;
exports.deleteBackupVersionsGlobalsFromJSON = deleteBackupVersionsGlobalsFromJSON;
exports.deleteBackupVersionsRequestBodyToJSON = deleteBackupVersionsRequestBodyToJSON;
exports.deleteBackupVersionsRequestBodyFromJSON = deleteBackupVersionsRequestBodyFromJSON;
exports.deleteBackupVersionsRequestToJSON = deleteBackupVersionsRequestToJSON;
exports.deleteBackupVersionsRequestFromJSON = deleteBackupVersionsRequestFromJSON;
exports.failureToJSON = failureToJSON;
exports.failureFromJSON = failureFromJSON;
exports.deleteBackupVersionsResponseBody2ToJSON = deleteBackupVersionsResponseBody2ToJSON;
exports.deleteBackupVersionsResponseBody2FromJSON = deleteBackupVersionsResponseBody2FromJSON;
exports.deleteBackupVersionsResponseBody1ToJSON = deleteBackupVersionsResponseBody1ToJSON;
exports.deleteBackupVersionsResponseBody1FromJSON = deleteBackupVersionsResponseBody1FromJSON;
exports.deleteBackupVersionsResponseToJSON = deleteBackupVersionsResponseToJSON;
exports.deleteBackupVersionsResponseFromJSON = deleteBackupVersionsResponseFromJSON;
const z = __importStar(require("zod"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
/** @internal */
exports.DeleteBackupVersionsGlobals$inboundSchema = z.object({
    cloud_name: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "cloud_name": "cloudName",
    });
});
/** @internal */
exports.DeleteBackupVersionsGlobals$outboundSchema = z.object({
    cloudName: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.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.
 */
var DeleteBackupVersionsGlobals$;
(function (DeleteBackupVersionsGlobals$) {
    /** @deprecated use `DeleteBackupVersionsGlobals$inboundSchema` instead. */
    DeleteBackupVersionsGlobals$.inboundSchema = exports.DeleteBackupVersionsGlobals$inboundSchema;
    /** @deprecated use `DeleteBackupVersionsGlobals$outboundSchema` instead. */
    DeleteBackupVersionsGlobals$.outboundSchema = exports.DeleteBackupVersionsGlobals$outboundSchema;
})(DeleteBackupVersionsGlobals$ || (exports.DeleteBackupVersionsGlobals$ = DeleteBackupVersionsGlobals$ = {}));
function deleteBackupVersionsGlobalsToJSON(deleteBackupVersionsGlobals) {
    return JSON.stringify(exports.DeleteBackupVersionsGlobals$outboundSchema.parse(deleteBackupVersionsGlobals));
}
function deleteBackupVersionsGlobalsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.DeleteBackupVersionsGlobals$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeleteBackupVersionsGlobals' from JSON`);
}
/** @internal */
exports.DeleteBackupVersionsRequestBody$inboundSchema = z.object({
    version_ids: z.array(z.string()),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "version_ids": "versionIds",
    });
});
/** @internal */
exports.DeleteBackupVersionsRequestBody$outboundSchema = z.object({
    versionIds: z.array(z.string()),
}).transform((v) => {
    return (0, primitives_js_1.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.
 */
var DeleteBackupVersionsRequestBody$;
(function (DeleteBackupVersionsRequestBody$) {
    /** @deprecated use `DeleteBackupVersionsRequestBody$inboundSchema` instead. */
    DeleteBackupVersionsRequestBody$.inboundSchema = exports.DeleteBackupVersionsRequestBody$inboundSchema;
    /** @deprecated use `DeleteBackupVersionsRequestBody$outboundSchema` instead. */
    DeleteBackupVersionsRequestBody$.outboundSchema = exports.DeleteBackupVersionsRequestBody$outboundSchema;
})(DeleteBackupVersionsRequestBody$ || (exports.DeleteBackupVersionsRequestBody$ = DeleteBackupVersionsRequestBody$ = {}));
function deleteBackupVersionsRequestBodyToJSON(deleteBackupVersionsRequestBody) {
    return JSON.stringify(exports.DeleteBackupVersionsRequestBody$outboundSchema.parse(deleteBackupVersionsRequestBody));
}
function deleteBackupVersionsRequestBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.DeleteBackupVersionsRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeleteBackupVersionsRequestBody' from JSON`);
}
/** @internal */
exports.DeleteBackupVersionsRequest$inboundSchema = z.object({
    asset_id: z.string(),
    RequestBody: z.lazy(() => exports.DeleteBackupVersionsRequestBody$inboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "asset_id": "assetId",
        "RequestBody": "requestBody",
    });
});
/** @internal */
exports.DeleteBackupVersionsRequest$outboundSchema = z.object({
    assetId: z.string(),
    requestBody: z.lazy(() => exports.DeleteBackupVersionsRequestBody$outboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.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.
 */
var DeleteBackupVersionsRequest$;
(function (DeleteBackupVersionsRequest$) {
    /** @deprecated use `DeleteBackupVersionsRequest$inboundSchema` instead. */
    DeleteBackupVersionsRequest$.inboundSchema = exports.DeleteBackupVersionsRequest$inboundSchema;
    /** @deprecated use `DeleteBackupVersionsRequest$outboundSchema` instead. */
    DeleteBackupVersionsRequest$.outboundSchema = exports.DeleteBackupVersionsRequest$outboundSchema;
})(DeleteBackupVersionsRequest$ || (exports.DeleteBackupVersionsRequest$ = DeleteBackupVersionsRequest$ = {}));
function deleteBackupVersionsRequestToJSON(deleteBackupVersionsRequest) {
    return JSON.stringify(exports.DeleteBackupVersionsRequest$outboundSchema.parse(deleteBackupVersionsRequest));
}
function deleteBackupVersionsRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.DeleteBackupVersionsRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeleteBackupVersionsRequest' from JSON`);
}
/** @internal */
exports.Failure$inboundSchema = z.object({
    version_id: z.string().optional(),
    error: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "version_id": "versionId",
    });
});
/** @internal */
exports.Failure$outboundSchema = z.object({
    versionId: z.string().optional(),
    error: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.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.
 */
var Failure$;
(function (Failure$) {
    /** @deprecated use `Failure$inboundSchema` instead. */
    Failure$.inboundSchema = exports.Failure$inboundSchema;
    /** @deprecated use `Failure$outboundSchema` instead. */
    Failure$.outboundSchema = exports.Failure$outboundSchema;
})(Failure$ || (exports.Failure$ = Failure$ = {}));
function failureToJSON(failure) {
    return JSON.stringify(exports.Failure$outboundSchema.parse(failure));
}
function failureFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Failure$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Failure' from JSON`);
}
/** @internal */
exports.DeleteBackupVersionsResponseBody2$inboundSchema = z.object({
    asset_id: z.string(),
    deleted_version_ids: z.array(z.string()),
    failures: z.array(z.lazy(() => exports.Failure$inboundSchema)).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "asset_id": "assetId",
        "deleted_version_ids": "deletedVersionIds",
    });
});
/** @internal */
exports.DeleteBackupVersionsResponseBody2$outboundSchema = z.object({
    assetId: z.string(),
    deletedVersionIds: z.array(z.string()),
    failures: z.array(z.lazy(() => exports.Failure$outboundSchema)).optional(),
}).transform((v) => {
    return (0, primitives_js_1.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.
 */
var DeleteBackupVersionsResponseBody2$;
(function (DeleteBackupVersionsResponseBody2$) {
    /** @deprecated use `DeleteBackupVersionsResponseBody2$inboundSchema` instead. */
    DeleteBackupVersionsResponseBody2$.inboundSchema = exports.DeleteBackupVersionsResponseBody2$inboundSchema;
    /** @deprecated use `DeleteBackupVersionsResponseBody2$outboundSchema` instead. */
    DeleteBackupVersionsResponseBody2$.outboundSchema = exports.DeleteBackupVersionsResponseBody2$outboundSchema;
})(DeleteBackupVersionsResponseBody2$ || (exports.DeleteBackupVersionsResponseBody2$ = DeleteBackupVersionsResponseBody2$ = {}));
function deleteBackupVersionsResponseBody2ToJSON(deleteBackupVersionsResponseBody2) {
    return JSON.stringify(exports.DeleteBackupVersionsResponseBody2$outboundSchema.parse(deleteBackupVersionsResponseBody2));
}
function deleteBackupVersionsResponseBody2FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.DeleteBackupVersionsResponseBody2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeleteBackupVersionsResponseBody2' from JSON`);
}
/** @internal */
exports.DeleteBackupVersionsResponseBody1$inboundSchema = z.object({
    asset_id: z.string(),
    deleted_version_ids: z.array(z.string()),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "asset_id": "assetId",
        "deleted_version_ids": "deletedVersionIds",
    });
});
/** @internal */
exports.DeleteBackupVersionsResponseBody1$outboundSchema = z.object({
    assetId: z.string(),
    deletedVersionIds: z.array(z.string()),
}).transform((v) => {
    return (0, primitives_js_1.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.
 */
var DeleteBackupVersionsResponseBody1$;
(function (DeleteBackupVersionsResponseBody1$) {
    /** @deprecated use `DeleteBackupVersionsResponseBody1$inboundSchema` instead. */
    DeleteBackupVersionsResponseBody1$.inboundSchema = exports.DeleteBackupVersionsResponseBody1$inboundSchema;
    /** @deprecated use `DeleteBackupVersionsResponseBody1$outboundSchema` instead. */
    DeleteBackupVersionsResponseBody1$.outboundSchema = exports.DeleteBackupVersionsResponseBody1$outboundSchema;
})(DeleteBackupVersionsResponseBody1$ || (exports.DeleteBackupVersionsResponseBody1$ = DeleteBackupVersionsResponseBody1$ = {}));
function deleteBackupVersionsResponseBody1ToJSON(deleteBackupVersionsResponseBody1) {
    return JSON.stringify(exports.DeleteBackupVersionsResponseBody1$outboundSchema.parse(deleteBackupVersionsResponseBody1));
}
function deleteBackupVersionsResponseBody1FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.DeleteBackupVersionsResponseBody1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeleteBackupVersionsResponseBody1' from JSON`);
}
/** @internal */
exports.DeleteBackupVersionsResponse$inboundSchema = z.union([
    z.lazy(() => exports.DeleteBackupVersionsResponseBody1$inboundSchema),
    z.lazy(() => exports.DeleteBackupVersionsResponseBody2$inboundSchema),
]);
/** @internal */
exports.DeleteBackupVersionsResponse$outboundSchema = z.union([
    z.lazy(() => exports.DeleteBackupVersionsResponseBody1$outboundSchema),
    z.lazy(() => exports.DeleteBackupVersionsResponseBody2$outboundSchema),
]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var DeleteBackupVersionsResponse$;
(function (DeleteBackupVersionsResponse$) {
    /** @deprecated use `DeleteBackupVersionsResponse$inboundSchema` instead. */
    DeleteBackupVersionsResponse$.inboundSchema = exports.DeleteBackupVersionsResponse$inboundSchema;
    /** @deprecated use `DeleteBackupVersionsResponse$outboundSchema` instead. */
    DeleteBackupVersionsResponse$.outboundSchema = exports.DeleteBackupVersionsResponse$outboundSchema;
})(DeleteBackupVersionsResponse$ || (exports.DeleteBackupVersionsResponse$ = DeleteBackupVersionsResponse$ = {}));
function deleteBackupVersionsResponseToJSON(deleteBackupVersionsResponse) {
    return JSON.stringify(exports.DeleteBackupVersionsResponse$outboundSchema.parse(deleteBackupVersionsResponse));
}
function deleteBackupVersionsResponseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.DeleteBackupVersionsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeleteBackupVersionsResponse' from JSON`);
}
//# sourceMappingURL=deletebackupversions.js.map