/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { safeParse } from "../lib/schemas.js"; import * as openEnums from "../types/enums.js"; import { OpenEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import * as types from "../types/primitives.js"; import { SDKValidationError } from "./errors/sdk-validation-error.js"; export const ContainerDecision = { Directplay: "directplay", Copy: "copy", Transcode: "transcode", } as const; export type ContainerDecision = OpenEnum; export type TranscodeInfo = { containerDecision?: ContainerDecision | undefined; sourceContainer?: string | undefined; streamContainer?: string | undefined; hwRequested?: boolean | undefined; hwDecoding?: string | undefined; hwEncoding?: string | undefined; /** * Transcode speed multiplier */ speed?: number | undefined; throttled?: boolean | undefined; reasons?: Array | undefined; }; /** @internal */ export const ContainerDecision$inboundSchema: z.ZodMiniType< ContainerDecision, unknown > = openEnums.inboundSchema(ContainerDecision); /** @internal */ export const TranscodeInfo$inboundSchema: z.ZodMiniType< TranscodeInfo, unknown > = z.object({ containerDecision: types.optional(ContainerDecision$inboundSchema), sourceContainer: types.optional(types.string()), streamContainer: types.optional(types.string()), hwRequested: types.optional(types.boolean()), hwDecoding: types.optional(types.string()), hwEncoding: types.optional(types.string()), speed: types.optional(types.number()), throttled: types.optional(types.boolean()), reasons: types.optional(z.array(types.string())), }); export function transcodeInfoFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TranscodeInfo$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TranscodeInfo' from JSON`, ); }