/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as components from "../components/index.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type UpdateMcpServerRequest = { serverId: string; /** * Optional external end-user identifier forwarded by the API gateway. */ xOnBehalfOf?: string | undefined; updateMcpServerRequest: components.UpdateMcpServerRequest; }; /** @internal */ export const UpdateMcpServerRequest$inboundSchema: z.ZodType< UpdateMcpServerRequest, z.ZodTypeDef, unknown > = z.object({ server_id: z.string(), "X-On-Behalf-Of": z.string().optional(), UpdateMcpServerRequest: components.UpdateMcpServerRequest$inboundSchema, }).transform((v) => { return remap$(v, { "server_id": "serverId", "X-On-Behalf-Of": "xOnBehalfOf", "UpdateMcpServerRequest": "updateMcpServerRequest", }); }); /** @internal */ export type UpdateMcpServerRequest$Outbound = { server_id: string; "X-On-Behalf-Of"?: string | undefined; UpdateMcpServerRequest: components.UpdateMcpServerRequest$Outbound; }; /** @internal */ export const UpdateMcpServerRequest$outboundSchema: z.ZodType< UpdateMcpServerRequest$Outbound, z.ZodTypeDef, UpdateMcpServerRequest > = z.object({ serverId: z.string(), xOnBehalfOf: z.string().optional(), updateMcpServerRequest: components.UpdateMcpServerRequest$outboundSchema, }).transform((v) => { return remap$(v, { serverId: "server_id", xOnBehalfOf: "X-On-Behalf-Of", updateMcpServerRequest: "UpdateMcpServerRequest", }); }); export function updateMcpServerRequestToJSON( updateMcpServerRequest: UpdateMcpServerRequest, ): string { return JSON.stringify( UpdateMcpServerRequest$outboundSchema.parse(updateMcpServerRequest), ); } export function updateMcpServerRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => UpdateMcpServerRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateMcpServerRequest' from JSON`, ); }