/* * 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 { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type DeleteMcpServerRequest = { serverId: string; /** * Optional external end-user identifier forwarded by the API gateway. */ xOnBehalfOf?: string | undefined; }; /** @internal */ export const DeleteMcpServerRequest$inboundSchema: z.ZodType< DeleteMcpServerRequest, z.ZodTypeDef, unknown > = z.object({ server_id: z.string(), "X-On-Behalf-Of": z.string().optional(), }).transform((v) => { return remap$(v, { "server_id": "serverId", "X-On-Behalf-Of": "xOnBehalfOf", }); }); /** @internal */ export type DeleteMcpServerRequest$Outbound = { server_id: string; "X-On-Behalf-Of"?: string | undefined; }; /** @internal */ export const DeleteMcpServerRequest$outboundSchema: z.ZodType< DeleteMcpServerRequest$Outbound, z.ZodTypeDef, DeleteMcpServerRequest > = z.object({ serverId: z.string(), xOnBehalfOf: z.string().optional(), }).transform((v) => { return remap$(v, { serverId: "server_id", xOnBehalfOf: "X-On-Behalf-Of", }); }); export function deleteMcpServerRequestToJSON( deleteMcpServerRequest: DeleteMcpServerRequest, ): string { return JSON.stringify( DeleteMcpServerRequest$outboundSchema.parse(deleteMcpServerRequest), ); } export function deleteMcpServerRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeleteMcpServerRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeleteMcpServerRequest' from JSON`, ); }