/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
/** @internal */
export const Representation$inboundSchema = z.object({
    transformation: z.array(z.record(z.any())).optional(),
});
/** @internal */
export const Representation$outboundSchema = z.object({
    transformation: z.array(z.record(z.any())).optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var Representation$;
(function (Representation$) {
    /** @deprecated use `Representation$inboundSchema` instead. */
    Representation$.inboundSchema = Representation$inboundSchema;
    /** @deprecated use `Representation$outboundSchema` instead. */
    Representation$.outboundSchema = Representation$outboundSchema;
})(Representation$ || (Representation$ = {}));
export function representationToJSON(representation) {
    return JSON.stringify(Representation$outboundSchema.parse(representation));
}
export function representationFromJSON(jsonString) {
    return safeParse(jsonString, (x) => Representation$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Representation' from JSON`);
}
/** @internal */
export const StreamingProfile$inboundSchema = z.object({
    external_id: z.string(),
    name: z.string(),
    display_name: z.string().optional(),
    predefined: z.boolean(),
    representations: z.array(z.lazy(() => Representation$inboundSchema))
        .optional(),
}).transform((v) => {
    return remap$(v, {
        "external_id": "externalId",
        "display_name": "displayName",
    });
});
/** @internal */
export const StreamingProfile$outboundSchema = z.object({
    externalId: z.string(),
    name: z.string(),
    displayName: z.string().optional(),
    predefined: z.boolean(),
    representations: z.array(z.lazy(() => Representation$outboundSchema))
        .optional(),
}).transform((v) => {
    return remap$(v, {
        externalId: "external_id",
        displayName: "display_name",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var StreamingProfile$;
(function (StreamingProfile$) {
    /** @deprecated use `StreamingProfile$inboundSchema` instead. */
    StreamingProfile$.inboundSchema = StreamingProfile$inboundSchema;
    /** @deprecated use `StreamingProfile$outboundSchema` instead. */
    StreamingProfile$.outboundSchema = StreamingProfile$outboundSchema;
})(StreamingProfile$ || (StreamingProfile$ = {}));
export function streamingProfileToJSON(streamingProfile) {
    return JSON.stringify(StreamingProfile$outboundSchema.parse(streamingProfile));
}
export function streamingProfileFromJSON(jsonString) {
    return safeParse(jsonString, (x) => StreamingProfile$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'StreamingProfile' from JSON`);
}
//# sourceMappingURL=streamingprofile.js.map