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