/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: aa05b4aa9186
 */
import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
import { EncodedPayloadOptions$inboundSchema, } from "./encodedpayloadoptions.js";
import { JSONPatchPayloadValueResponse$inboundSchema, } from "./jsonpatchpayloadvalueresponse.js";
/** @internal */
export const JSONPatchPayloadResponse$inboundSchema = z.object({
    type: z.literal("json_patch"),
    value: JSONPatchPayloadValueResponse$inboundSchema,
    encoding_options: z.nullable(z.array(EncodedPayloadOptions$inboundSchema))
        .optional(),
}).transform((v) => {
    return remap$(v, {
        "encoding_options": "encodingOptions",
    });
});
export function jsonPatchPayloadResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => JSONPatchPayloadResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'JSONPatchPayloadResponse' from JSON`);
}
//# sourceMappingURL=jsonpatchpayloadresponse.js.map