/* * 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 { User, User$inboundSchema } from "./user.js"; export type Steam = { broadcastingActive?: boolean | undefined; connectPort?: number | undefined; contentCachePort?: number | undefined; downloadLanPeerGroup?: number | undefined; enabledServices?: number | undefined; euniverse?: number | undefined; gamesRunning?: boolean | undefined; hostname?: string | undefined; ipAddresses?: Array | null | undefined; is64bit?: boolean | undefined; macAddresses?: Array | null | undefined; minVersion?: number | undefined; ostype?: number | undefined; publicIpAddress?: string | undefined; remoteplayActive?: boolean | undefined; screenLocked?: boolean | undefined; steamDeck?: boolean | undefined; steamVersion?: string | undefined; supportedServices?: number | undefined; users?: Array | null | undefined; version?: number | undefined; vrActive?: boolean | undefined; vrLinkCaps?: string | undefined; }; /** @internal */ export const Steam$inboundSchema: z.ZodType = z .object({ broadcasting_active: z.boolean().optional(), connect_port: z.number().int().optional(), content_cache_port: z.number().int().optional(), download_lan_peer_group: z.number().int().optional(), enabled_services: z.number().int().optional(), euniverse: z.number().int().optional(), games_running: z.boolean().optional(), hostname: z.string().optional(), ip_addresses: z.nullable(z.array(z.string())).optional(), is64bit: z.boolean().optional(), mac_addresses: z.nullable(z.array(z.string())).optional(), min_version: z.number().int().optional(), ostype: z.number().int().optional(), public_ip_address: z.string().optional(), remoteplay_active: z.boolean().optional(), screen_locked: z.boolean().optional(), steam_deck: z.boolean().optional(), steam_version: z.string().optional(), supported_services: z.number().int().optional(), users: z.nullable(z.array(User$inboundSchema)).optional(), version: z.number().int().optional(), vr_active: z.boolean().optional(), vr_link_caps: z.string().optional(), }).transform((v) => { return remap$(v, { "broadcasting_active": "broadcastingActive", "connect_port": "connectPort", "content_cache_port": "contentCachePort", "download_lan_peer_group": "downloadLanPeerGroup", "enabled_services": "enabledServices", "games_running": "gamesRunning", "ip_addresses": "ipAddresses", "mac_addresses": "macAddresses", "min_version": "minVersion", "public_ip_address": "publicIpAddress", "remoteplay_active": "remoteplayActive", "screen_locked": "screenLocked", "steam_deck": "steamDeck", "steam_version": "steamVersion", "supported_services": "supportedServices", "vr_active": "vrActive", "vr_link_caps": "vrLinkCaps", }); }); export function steamFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => Steam$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Steam' from JSON`, ); }