/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../../lib/schemas.js";
import { Info$inboundSchema, Info$outboundSchema, } from "./info.js";
/**
 * The error message if restore failed for a specific asset.
 */
export const ErrorEnum = {
    NoBackup: "no_backup",
    Failed: "failed",
    Unauthorized: "unauthorized",
};
/** @internal */
export const ErrorEnum$inboundSchema = z
    .nativeEnum(ErrorEnum);
/** @internal */
export const ErrorEnum$outboundSchema = ErrorEnum$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ErrorEnum$;
(function (ErrorEnum$) {
    /** @deprecated use `ErrorEnum$inboundSchema` instead. */
    ErrorEnum$.inboundSchema = ErrorEnum$inboundSchema;
    /** @deprecated use `ErrorEnum$outboundSchema` instead. */
    ErrorEnum$.outboundSchema = ErrorEnum$outboundSchema;
})(ErrorEnum$ || (ErrorEnum$ = {}));
/** @internal */
export const RestoreResponse$inboundSchema = z.object({
    error: ErrorEnum$inboundSchema.optional(),
});
/** @internal */
export const RestoreResponse$outboundSchema = z.object({
    error: ErrorEnum$outboundSchema.optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var RestoreResponse$;
(function (RestoreResponse$) {
    /** @deprecated use `RestoreResponse$inboundSchema` instead. */
    RestoreResponse$.inboundSchema = RestoreResponse$inboundSchema;
    /** @deprecated use `RestoreResponse$outboundSchema` instead. */
    RestoreResponse$.outboundSchema = RestoreResponse$outboundSchema;
})(RestoreResponse$ || (RestoreResponse$ = {}));
export function restoreResponseToJSON(restoreResponse) {
    return JSON.stringify(RestoreResponse$outboundSchema.parse(restoreResponse));
}
export function restoreResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => RestoreResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RestoreResponse' from JSON`);
}
/** @internal */
export const RestoreResponseUnion$inboundSchema = z.union([Info$inboundSchema, z.lazy(() => RestoreResponse$inboundSchema)]);
/** @internal */
export const RestoreResponseUnion$outboundSchema = z.union([
    Info$outboundSchema,
    z.lazy(() => RestoreResponse$outboundSchema),
]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var RestoreResponseUnion$;
(function (RestoreResponseUnion$) {
    /** @deprecated use `RestoreResponseUnion$inboundSchema` instead. */
    RestoreResponseUnion$.inboundSchema = RestoreResponseUnion$inboundSchema;
    /** @deprecated use `RestoreResponseUnion$outboundSchema` instead. */
    RestoreResponseUnion$.outboundSchema = RestoreResponseUnion$outboundSchema;
})(RestoreResponseUnion$ || (RestoreResponseUnion$ = {}));
export function restoreResponseUnionToJSON(restoreResponseUnion) {
    return JSON.stringify(RestoreResponseUnion$outboundSchema.parse(restoreResponseUnion));
}
export function restoreResponseUnionFromJSON(jsonString) {
    return safeParse(jsonString, (x) => RestoreResponseUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RestoreResponseUnion' from JSON`);
}
//# sourceMappingURL=restoreresponseunion.js.map