/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export const GetApiV3BoundaryNodeLocationsFormat = { Json: "json", Csv: "csv", } as const; export type GetApiV3BoundaryNodeLocationsFormat = ClosedEnum< typeof GetApiV3BoundaryNodeLocationsFormat >; export type GetApiV3BoundaryNodeLocationsRequest = { format?: GetApiV3BoundaryNodeLocationsFormat | undefined; }; /** @internal */ export const GetApiV3BoundaryNodeLocationsFormat$inboundSchema: z.ZodNativeEnum< typeof GetApiV3BoundaryNodeLocationsFormat > = z.nativeEnum(GetApiV3BoundaryNodeLocationsFormat); /** @internal */ export const GetApiV3BoundaryNodeLocationsFormat$outboundSchema: z.ZodNativeEnum = GetApiV3BoundaryNodeLocationsFormat$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetApiV3BoundaryNodeLocationsFormat$ { /** @deprecated use `GetApiV3BoundaryNodeLocationsFormat$inboundSchema` instead. */ export const inboundSchema = GetApiV3BoundaryNodeLocationsFormat$inboundSchema; /** @deprecated use `GetApiV3BoundaryNodeLocationsFormat$outboundSchema` instead. */ export const outboundSchema = GetApiV3BoundaryNodeLocationsFormat$outboundSchema; } /** @internal */ export const GetApiV3BoundaryNodeLocationsRequest$inboundSchema: z.ZodType< GetApiV3BoundaryNodeLocationsRequest, z.ZodTypeDef, unknown > = z.object({ format: GetApiV3BoundaryNodeLocationsFormat$inboundSchema.default("json"), }); /** @internal */ export type GetApiV3BoundaryNodeLocationsRequest$Outbound = { format: string; }; /** @internal */ export const GetApiV3BoundaryNodeLocationsRequest$outboundSchema: z.ZodType< GetApiV3BoundaryNodeLocationsRequest$Outbound, z.ZodTypeDef, GetApiV3BoundaryNodeLocationsRequest > = z.object({ format: GetApiV3BoundaryNodeLocationsFormat$outboundSchema.default("json"), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetApiV3BoundaryNodeLocationsRequest$ { /** @deprecated use `GetApiV3BoundaryNodeLocationsRequest$inboundSchema` instead. */ export const inboundSchema = GetApiV3BoundaryNodeLocationsRequest$inboundSchema; /** @deprecated use `GetApiV3BoundaryNodeLocationsRequest$outboundSchema` instead. */ export const outboundSchema = GetApiV3BoundaryNodeLocationsRequest$outboundSchema; /** @deprecated use `GetApiV3BoundaryNodeLocationsRequest$Outbound` instead. */ export type Outbound = GetApiV3BoundaryNodeLocationsRequest$Outbound; } export function getApiV3BoundaryNodeLocationsRequestToJSON( getApiV3BoundaryNodeLocationsRequest: GetApiV3BoundaryNodeLocationsRequest, ): string { return JSON.stringify( GetApiV3BoundaryNodeLocationsRequest$outboundSchema.parse( getApiV3BoundaryNodeLocationsRequest, ), ); } export function getApiV3BoundaryNodeLocationsRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => GetApiV3BoundaryNodeLocationsRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetApiV3BoundaryNodeLocationsRequest' from JSON`, ); }