/*
 * 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 UpdateRequest$inboundSchema = z.object({
    unsafe_update: z.string().optional(),
    allowed_for_strict: z.boolean().optional(),
}).transform((v) => {
    return remap$(v, {
        "unsafe_update": "unsafeUpdate",
        "allowed_for_strict": "allowedForStrict",
    });
});
/** @internal */
export const UpdateRequest$outboundSchema = z.object({
    unsafeUpdate: z.string().optional(),
    allowedForStrict: z.boolean().optional(),
}).transform((v) => {
    return remap$(v, {
        unsafeUpdate: "unsafe_update",
        allowedForStrict: "allowed_for_strict",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var UpdateRequest$;
(function (UpdateRequest$) {
    /** @deprecated use `UpdateRequest$inboundSchema` instead. */
    UpdateRequest$.inboundSchema = UpdateRequest$inboundSchema;
    /** @deprecated use `UpdateRequest$outboundSchema` instead. */
    UpdateRequest$.outboundSchema = UpdateRequest$outboundSchema;
})(UpdateRequest$ || (UpdateRequest$ = {}));
export function updateRequestToJSON(updateRequest) {
    return JSON.stringify(UpdateRequest$outboundSchema.parse(updateRequest));
}
export function updateRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => UpdateRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateRequest' from JSON`);
}
//# sourceMappingURL=updaterequest.js.map