/* * 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 MultistreamTargetInput = { name?: string | undefined; /** * Livepeer-compatible multistream target URL (RTMP(S) or SRT) */ url: string; /** * If true then this multistream target will not be used for pushing * * @remarks * even if it is configured in a stream object. */ disabled?: boolean | undefined; }; /** @internal */ export const MultistreamTargetInput$inboundSchema: z.ZodType< MultistreamTargetInput, z.ZodTypeDef, unknown > = z.object({ name: z.string().optional(), url: z.string(), disabled: z.boolean().optional(), }); /** @internal */ export type MultistreamTargetInput$Outbound = { name?: string | undefined; url: string; disabled?: boolean | undefined; }; /** @internal */ export const MultistreamTargetInput$outboundSchema: z.ZodType< MultistreamTargetInput$Outbound, z.ZodTypeDef, MultistreamTargetInput > = z.object({ name: z.string().optional(), url: z.string(), disabled: z.boolean().optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace MultistreamTargetInput$ { /** @deprecated use `MultistreamTargetInput$inboundSchema` instead. */ export const inboundSchema = MultistreamTargetInput$inboundSchema; /** @deprecated use `MultistreamTargetInput$outboundSchema` instead. */ export const outboundSchema = MultistreamTargetInput$outboundSchema; /** @deprecated use `MultistreamTargetInput$Outbound` instead. */ export type Outbound = MultistreamTargetInput$Outbound; } export function multistreamTargetInputToJSON( multistreamTargetInput: MultistreamTargetInput, ): string { return JSON.stringify( MultistreamTargetInput$outboundSchema.parse(multistreamTargetInput), ); } export function multistreamTargetInputFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => MultistreamTargetInput$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'MultistreamTargetInput' from JSON`, ); }