/* * 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 { FloatValue, FloatValue$inboundSchema } from "./floatvalue.js"; export type ChromecastVolume = { controlType?: string | undefined; level?: number | undefined; muted?: boolean | undefined; stepInterval?: FloatValue | undefined; }; /** @internal */ export const ChromecastVolume$inboundSchema: z.ZodType< ChromecastVolume, z.ZodTypeDef, unknown > = z.object({ control_type: z.string().optional(), level: z.number().optional(), muted: z.boolean().optional(), step_interval: FloatValue$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "control_type": "controlType", "step_interval": "stepInterval", }); }); export function chromecastVolumeFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ChromecastVolume$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ChromecastVolume' from JSON`, ); }