/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; 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 Static = { HiRes: "hi_res", Fast: "fast", } as const; export type Static = ClosedEnum; export const Video = { AudioOnly: "audio_only", VideoOnly: "video_only", AudioVideo: "audio_video", } as const; export type Video = ClosedEnum; export type MediaModeParam = { static?: Static | null | undefined; audio?: boolean | null | undefined; video?: Video | null | undefined; }; /** @internal */ export const Static$inboundSchema: z.ZodNativeEnum = z .nativeEnum(Static); /** @internal */ export const Static$outboundSchema: z.ZodNativeEnum = Static$inboundSchema; /** @internal */ export const Video$inboundSchema: z.ZodNativeEnum = z.nativeEnum( Video, ); /** @internal */ export const Video$outboundSchema: z.ZodNativeEnum = Video$inboundSchema; /** @internal */ export const MediaModeParam$inboundSchema: z.ZodType< MediaModeParam, z.ZodTypeDef, unknown > = z.object({ static: z.nullable(Static$inboundSchema).optional(), audio: z.nullable(z.boolean()).optional(), video: z.nullable(Video$inboundSchema).optional(), }); /** @internal */ export type MediaModeParam$Outbound = { static?: string | null | undefined; audio?: boolean | null | undefined; video?: string | null | undefined; }; /** @internal */ export const MediaModeParam$outboundSchema: z.ZodType< MediaModeParam$Outbound, z.ZodTypeDef, MediaModeParam > = z.object({ static: z.nullable(Static$outboundSchema).optional(), audio: z.nullable(z.boolean()).optional(), video: z.nullable(Video$outboundSchema).optional(), }); export function mediaModeParamToJSON(mediaModeParam: MediaModeParam): string { return JSON.stringify(MediaModeParam$outboundSchema.parse(mediaModeParam)); } export function mediaModeParamFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => MediaModeParam$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'MediaModeParam' from JSON`, ); }