/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type TargetOutput = { /** * Name of transcoding profile that should be sent. Use * * @remarks * "source" for pushing source stream data */ profile: string; /** * If true, the stream audio will be muted and only silent * * @remarks * video will be pushed to the target. */ videoOnly?: boolean | undefined; /** * ID of multistream target object where to push this stream */ id?: string | undefined; }; /** @internal */ export const TargetOutput$inboundSchema: z.ZodType< TargetOutput, z.ZodTypeDef, unknown > = z.object({ profile: z.string(), videoOnly: z.boolean().default(false), id: z.string().optional(), }); /** @internal */ export type TargetOutput$Outbound = { profile: string; videoOnly: boolean; id?: string | undefined; }; /** @internal */ export const TargetOutput$outboundSchema: z.ZodType< TargetOutput$Outbound, z.ZodTypeDef, TargetOutput > = z.object({ profile: z.string(), videoOnly: z.boolean().default(false), id: z.string().optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TargetOutput$ { /** @deprecated use `TargetOutput$inboundSchema` instead. */ export const inboundSchema = TargetOutput$inboundSchema; /** @deprecated use `TargetOutput$outboundSchema` instead. */ export const outboundSchema = TargetOutput$outboundSchema; /** @deprecated use `TargetOutput$Outbound` instead. */ export type Outbound = TargetOutput$Outbound; } export function targetOutputToJSON(targetOutput: TargetOutput): string { return JSON.stringify(TargetOutput$outboundSchema.parse(targetOutput)); } export function targetOutputFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetOutput$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetOutput' from JSON`, ); }