/* * 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 UnsuspendClusterOrgRequest = { id: string; /** * Optional external end-user identifier forwarded by the API gateway. */ xOnBehalfOf?: string | undefined; }; /** * OK */ export type UnsuspendClusterOrgResponseBody = { message: string; }; /** @internal */ export const UnsuspendClusterOrgRequest$inboundSchema: z.ZodType< UnsuspendClusterOrgRequest, z.ZodTypeDef, unknown > = z.object({ id: z.string(), "X-On-Behalf-Of": z.string().optional(), }).transform((v) => { return remap$(v, { "X-On-Behalf-Of": "xOnBehalfOf", }); }); /** @internal */ export type UnsuspendClusterOrgRequest$Outbound = { id: string; "X-On-Behalf-Of"?: string | undefined; }; /** @internal */ export const UnsuspendClusterOrgRequest$outboundSchema: z.ZodType< UnsuspendClusterOrgRequest$Outbound, z.ZodTypeDef, UnsuspendClusterOrgRequest > = z.object({ id: z.string(), xOnBehalfOf: z.string().optional(), }).transform((v) => { return remap$(v, { xOnBehalfOf: "X-On-Behalf-Of", }); }); export function unsuspendClusterOrgRequestToJSON( unsuspendClusterOrgRequest: UnsuspendClusterOrgRequest, ): string { return JSON.stringify( UnsuspendClusterOrgRequest$outboundSchema.parse(unsuspendClusterOrgRequest), ); } export function unsuspendClusterOrgRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => UnsuspendClusterOrgRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UnsuspendClusterOrgRequest' from JSON`, ); } /** @internal */ export const UnsuspendClusterOrgResponseBody$inboundSchema: z.ZodType< UnsuspendClusterOrgResponseBody, z.ZodTypeDef, unknown > = z.object({ message: z.string(), }); /** @internal */ export type UnsuspendClusterOrgResponseBody$Outbound = { message: string; }; /** @internal */ export const UnsuspendClusterOrgResponseBody$outboundSchema: z.ZodType< UnsuspendClusterOrgResponseBody$Outbound, z.ZodTypeDef, UnsuspendClusterOrgResponseBody > = z.object({ message: z.string(), }); export function unsuspendClusterOrgResponseBodyToJSON( unsuspendClusterOrgResponseBody: UnsuspendClusterOrgResponseBody, ): string { return JSON.stringify( UnsuspendClusterOrgResponseBody$outboundSchema.parse( unsuspendClusterOrgResponseBody, ), ); } export function unsuspendClusterOrgResponseBodyFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => UnsuspendClusterOrgResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UnsuspendClusterOrgResponseBody' from JSON`, ); }