/* * 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"; import { ServiceOnHostRange, ServiceOnHostRange$inboundSchema, } from "./serviceonhostrange.js"; export type ServicesOnHostResponse = { /** * A token that can be used to retrieve the next page of ranges. */ nextPageToken: string; /** * The list of requested services. */ ranges: Array | null; }; /** @internal */ export const ServicesOnHostResponse$inboundSchema: z.ZodType< ServicesOnHostResponse, z.ZodTypeDef, unknown > = z.object({ next_page_token: z.string(), ranges: z.nullable(z.array(ServiceOnHostRange$inboundSchema)), }).transform((v) => { return remap$(v, { "next_page_token": "nextPageToken", }); }); export function servicesOnHostResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ServicesOnHostResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ServicesOnHostResponse' from JSON`, ); }