/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../../lib/schemas.js";
export const Deleted = {
    Deleted: "deleted",
    NotFound: "not_found",
};
/** @internal */
export const Deleted$inboundSchema = z
    .nativeEnum(Deleted);
/** @internal */
export const Deleted$outboundSchema = Deleted$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var Deleted$;
(function (Deleted$) {
    /** @deprecated use `Deleted$inboundSchema` instead. */
    Deleted$.inboundSchema = Deleted$inboundSchema;
    /** @deprecated use `Deleted$outboundSchema` instead. */
    Deleted$.outboundSchema = Deleted$outboundSchema;
})(Deleted$ || (Deleted$ = {}));
/** @internal */
export const Invalidation$inboundSchema = z.object({
    took: z.number().optional(),
    urls: z.array(z.string()).optional(),
});
/** @internal */
export const Invalidation$outboundSchema = z.object({
    took: z.number().optional(),
    urls: z.array(z.string()).optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var Invalidation$;
(function (Invalidation$) {
    /** @deprecated use `Invalidation$inboundSchema` instead. */
    Invalidation$.inboundSchema = Invalidation$inboundSchema;
    /** @deprecated use `Invalidation$outboundSchema` instead. */
    Invalidation$.outboundSchema = Invalidation$outboundSchema;
})(Invalidation$ || (Invalidation$ = {}));
export function invalidationToJSON(invalidation) {
    return JSON.stringify(Invalidation$outboundSchema.parse(invalidation));
}
export function invalidationFromJSON(jsonString) {
    return safeParse(jsonString, (x) => Invalidation$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Invalidation' from JSON`);
}
/** @internal */
export const DerivedDestroyResponse$inboundSchema = z.object({
    deleted: z.record(Deleted$inboundSchema).optional(),
    unauthorized: z.array(z.string()).optional(),
    invalidation: z.lazy(() => Invalidation$inboundSchema).optional(),
});
/** @internal */
export const DerivedDestroyResponse$outboundSchema = z.object({
    deleted: z.record(Deleted$outboundSchema).optional(),
    unauthorized: z.array(z.string()).optional(),
    invalidation: z.lazy(() => Invalidation$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 DerivedDestroyResponse$;
(function (DerivedDestroyResponse$) {
    /** @deprecated use `DerivedDestroyResponse$inboundSchema` instead. */
    DerivedDestroyResponse$.inboundSchema = DerivedDestroyResponse$inboundSchema;
    /** @deprecated use `DerivedDestroyResponse$outboundSchema` instead. */
    DerivedDestroyResponse$.outboundSchema = DerivedDestroyResponse$outboundSchema;
})(DerivedDestroyResponse$ || (DerivedDestroyResponse$ = {}));
export function derivedDestroyResponseToJSON(derivedDestroyResponse) {
    return JSON.stringify(DerivedDestroyResponse$outboundSchema.parse(derivedDestroyResponse));
}
export function derivedDestroyResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => DerivedDestroyResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DerivedDestroyResponse' from JSON`);
}
//# sourceMappingURL=deriveddestroyresponse.js.map