/* * 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 { NetworkMobileInfo, NetworkMobileInfo$inboundSchema, } from "./networkmobileinfo.js"; export type NetworkClassification = { /** * Whether the host belongs to an Internet hosting service provider. */ hosting?: boolean | undefined; /** * Whether the host belongs to a mobile network. */ mobile?: boolean | undefined; mobileInfo?: NetworkMobileInfo | undefined; /** * Whether the host belongs to a statellite network. */ satellite?: boolean | undefined; /** * The source of the data. */ source?: string | undefined; }; /** @internal */ export const NetworkClassification$inboundSchema: z.ZodType< NetworkClassification, z.ZodTypeDef, unknown > = z.object({ hosting: z.boolean().optional(), mobile: z.boolean().optional(), mobile_info: NetworkMobileInfo$inboundSchema.optional(), satellite: z.boolean().optional(), source: z.string().optional(), }).transform((v) => { return remap$(v, { "mobile_info": "mobileInfo", }); }); export function networkClassificationFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => NetworkClassification$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'NetworkClassification' from JSON`, ); }