"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.RestoreResponseUnion$ = exports.RestoreResponseUnion$outboundSchema = exports.RestoreResponseUnion$inboundSchema = exports.RestoreResponse$ = exports.RestoreResponse$outboundSchema = exports.RestoreResponse$inboundSchema = exports.ErrorEnum$ = exports.ErrorEnum$outboundSchema = exports.ErrorEnum$inboundSchema = exports.ErrorEnum = void 0;
exports.restoreResponseToJSON = restoreResponseToJSON;
exports.restoreResponseFromJSON = restoreResponseFromJSON;
exports.restoreResponseUnionToJSON = restoreResponseUnionToJSON;
exports.restoreResponseUnionFromJSON = restoreResponseUnionFromJSON;
const z = __importStar(require("zod"));
const schemas_js_1 = require("../../lib/schemas.js");
const info_js_1 = require("./info.js");
/**
 * The error message if restore failed for a specific asset.
 */
exports.ErrorEnum = {
    NoBackup: "no_backup",
    Failed: "failed",
    Unauthorized: "unauthorized",
};
/** @internal */
exports.ErrorEnum$inboundSchema = z
    .nativeEnum(exports.ErrorEnum);
/** @internal */
exports.ErrorEnum$outboundSchema = exports.ErrorEnum$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var ErrorEnum$;
(function (ErrorEnum$) {
    /** @deprecated use `ErrorEnum$inboundSchema` instead. */
    ErrorEnum$.inboundSchema = exports.ErrorEnum$inboundSchema;
    /** @deprecated use `ErrorEnum$outboundSchema` instead. */
    ErrorEnum$.outboundSchema = exports.ErrorEnum$outboundSchema;
})(ErrorEnum$ || (exports.ErrorEnum$ = ErrorEnum$ = {}));
/** @internal */
exports.RestoreResponse$inboundSchema = z.object({
    error: exports.ErrorEnum$inboundSchema.optional(),
});
/** @internal */
exports.RestoreResponse$outboundSchema = z.object({
    error: exports.ErrorEnum$outboundSchema.optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var RestoreResponse$;
(function (RestoreResponse$) {
    /** @deprecated use `RestoreResponse$inboundSchema` instead. */
    RestoreResponse$.inboundSchema = exports.RestoreResponse$inboundSchema;
    /** @deprecated use `RestoreResponse$outboundSchema` instead. */
    RestoreResponse$.outboundSchema = exports.RestoreResponse$outboundSchema;
})(RestoreResponse$ || (exports.RestoreResponse$ = RestoreResponse$ = {}));
function restoreResponseToJSON(restoreResponse) {
    return JSON.stringify(exports.RestoreResponse$outboundSchema.parse(restoreResponse));
}
function restoreResponseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RestoreResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RestoreResponse' from JSON`);
}
/** @internal */
exports.RestoreResponseUnion$inboundSchema = z.union([info_js_1.Info$inboundSchema, z.lazy(() => exports.RestoreResponse$inboundSchema)]);
/** @internal */
exports.RestoreResponseUnion$outboundSchema = z.union([
    info_js_1.Info$outboundSchema,
    z.lazy(() => exports.RestoreResponse$outboundSchema),
]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var RestoreResponseUnion$;
(function (RestoreResponseUnion$) {
    /** @deprecated use `RestoreResponseUnion$inboundSchema` instead. */
    RestoreResponseUnion$.inboundSchema = exports.RestoreResponseUnion$inboundSchema;
    /** @deprecated use `RestoreResponseUnion$outboundSchema` instead. */
    RestoreResponseUnion$.outboundSchema = exports.RestoreResponseUnion$outboundSchema;
})(RestoreResponseUnion$ || (exports.RestoreResponseUnion$ = RestoreResponseUnion$ = {}));
function restoreResponseUnionToJSON(restoreResponseUnion) {
    return JSON.stringify(exports.RestoreResponseUnion$outboundSchema.parse(restoreResponseUnion));
}
function restoreResponseUnionFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RestoreResponseUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RestoreResponseUnion' from JSON`);
}
//# sourceMappingURL=restoreresponseunion.js.map