Files
plexjs/src/models/operations/getmetadata.ts

1530 lines
63 KiB
TypeScript

/*
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { RFCDate } from "../../types";
import * as z from "zod";
export type GetMetadataRequest = {
/**
* the id of the library item to return the children of.
*/
ratingKey: number;
};
export type Stream = {
id?: number | undefined;
streamType?: number | undefined;
default?: boolean | undefined;
codec?: string | undefined;
index?: number | undefined;
bitrate?: number | undefined;
bitDepth?: number | undefined;
chromaLocation?: string | undefined;
chromaSubsampling?: string | undefined;
codedHeight?: number | undefined;
codedWidth?: number | undefined;
colorPrimaries?: string | undefined;
colorRange?: string | undefined;
colorSpace?: string | undefined;
colorTrc?: string | undefined;
frameRate?: number | undefined;
hasScalingMatrix?: boolean | undefined;
height?: number | undefined;
level?: number | undefined;
profile?: string | undefined;
refFrames?: number | undefined;
scanType?: string | undefined;
streamIdentifier?: string | undefined;
width?: number | undefined;
displayTitle?: string | undefined;
extendedDisplayTitle?: string | undefined;
selected?: boolean | undefined;
channels?: number | undefined;
language?: string | undefined;
languageTag?: string | undefined;
languageCode?: string | undefined;
samplingRate?: number | undefined;
};
export type GetMetadataPart = {
id?: number | undefined;
key?: string | undefined;
duration?: number | undefined;
file?: string | undefined;
size?: number | undefined;
audioProfile?: string | undefined;
container?: string | undefined;
has64bitOffsets?: boolean | undefined;
optimizedForStreaming?: boolean | undefined;
videoProfile?: string | undefined;
stream?: Array<Stream> | undefined;
};
export type GetMetadataMedia = {
id?: number | undefined;
duration?: number | undefined;
bitrate?: number | undefined;
width?: number | undefined;
height?: number | undefined;
aspectRatio?: number | undefined;
audioChannels?: number | undefined;
audioCodec?: string | undefined;
videoCodec?: string | undefined;
videoResolution?: string | undefined;
container?: string | undefined;
videoFrameRate?: string | undefined;
optimizedForStreaming?: number | undefined;
audioProfile?: string | undefined;
has64bitOffsets?: boolean | undefined;
videoProfile?: string | undefined;
part?: Array<GetMetadataPart> | undefined;
};
export type GetMetadataGenre = {
id?: number | undefined;
filter?: string | undefined;
tag?: string | undefined;
};
export type GetMetadataCountry = {
id?: number | undefined;
filter?: string | undefined;
tag?: string | undefined;
};
export type Guids = {
id?: string | undefined;
};
export type Ratings = {
image?: string | undefined;
value?: number | undefined;
type?: string | undefined;
};
export type GetMetadataDirector = {
id?: number | undefined;
filter?: string | undefined;
tag?: string | undefined;
tagKey?: string | undefined;
thumb?: string | undefined;
};
export type GetMetadataWriter = {
id?: number | undefined;
filter?: string | undefined;
tag?: string | undefined;
tagKey?: string | undefined;
thumb?: string | undefined;
};
export type GetMetadataRole = {
id?: number | undefined;
filter?: string | undefined;
tag?: string | undefined;
tagKey?: string | undefined;
role?: string | undefined;
thumb?: string | undefined;
};
export type Producer = {
id?: number | undefined;
filter?: string | undefined;
tag?: string | undefined;
tagKey?: string | undefined;
thumb?: string | undefined;
};
export type GetMetadataMetadata = {
ratingKey?: string | undefined;
key?: string | undefined;
guid?: string | undefined;
studio?: string | undefined;
type?: string | undefined;
title?: string | undefined;
librarySectionTitle?: string | undefined;
librarySectionID?: number | undefined;
librarySectionKey?: string | undefined;
contentRating?: string | undefined;
summary?: string | undefined;
rating?: number | undefined;
audienceRating?: number | undefined;
year?: number | undefined;
tagline?: string | undefined;
thumb?: string | undefined;
art?: string | undefined;
duration?: number | undefined;
originallyAvailableAt?: RFCDate | undefined;
addedAt?: number | undefined;
updatedAt?: number | undefined;
audienceRatingImage?: string | undefined;
hasPremiumPrimaryExtra?: string | undefined;
ratingImage?: string | undefined;
media?: Array<GetMetadataMedia> | undefined;
genre?: Array<GetMetadataGenre> | undefined;
country?: Array<GetMetadataCountry> | undefined;
guids?: Array<Guids> | undefined;
ratings?: Array<Ratings> | undefined;
director?: Array<GetMetadataDirector> | undefined;
writer?: Array<GetMetadataWriter> | undefined;
role?: Array<GetMetadataRole> | undefined;
producer?: Array<Producer> | undefined;
};
export type GetMetadataMediaContainer = {
size?: number | undefined;
allowSync?: boolean | undefined;
identifier?: string | undefined;
librarySectionID?: number | undefined;
librarySectionTitle?: string | undefined;
librarySectionUUID?: string | undefined;
mediaTagPrefix?: string | undefined;
mediaTagVersion?: number | undefined;
metadata?: Array<GetMetadataMetadata> | undefined;
};
/**
* The metadata of the library item.
*/
export type GetMetadataResponseBody = {
mediaContainer?: GetMetadataMediaContainer | undefined;
};
export type GetMetadataResponse = {
/**
* HTTP response content type for this operation
*/
contentType: string;
/**
* HTTP response status code for this operation
*/
statusCode: number;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse: Response;
/**
* The metadata of the library item.
*/
object?: GetMetadataResponseBody | undefined;
};
/** @internal */
export namespace GetMetadataRequest$ {
export type Inbound = {
ratingKey: number;
};
export const inboundSchema: z.ZodType<GetMetadataRequest, z.ZodTypeDef, Inbound> = z
.object({
ratingKey: z.number(),
})
.transform((v) => {
return {
ratingKey: v.ratingKey,
};
});
export type Outbound = {
ratingKey: number;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetMetadataRequest> = z
.object({
ratingKey: z.number(),
})
.transform((v) => {
return {
ratingKey: v.ratingKey,
};
});
}
/** @internal */
export namespace Stream$ {
export type Inbound = {
id?: number | undefined;
streamType?: number | undefined;
default?: boolean | undefined;
codec?: string | undefined;
index?: number | undefined;
bitrate?: number | undefined;
bitDepth?: number | undefined;
chromaLocation?: string | undefined;
chromaSubsampling?: string | undefined;
codedHeight?: number | undefined;
codedWidth?: number | undefined;
colorPrimaries?: string | undefined;
colorRange?: string | undefined;
colorSpace?: string | undefined;
colorTrc?: string | undefined;
frameRate?: number | undefined;
hasScalingMatrix?: boolean | undefined;
height?: number | undefined;
level?: number | undefined;
profile?: string | undefined;
refFrames?: number | undefined;
scanType?: string | undefined;
streamIdentifier?: string | undefined;
width?: number | undefined;
displayTitle?: string | undefined;
extendedDisplayTitle?: string | undefined;
selected?: boolean | undefined;
channels?: number | undefined;
language?: string | undefined;
languageTag?: string | undefined;
languageCode?: string | undefined;
samplingRate?: number | undefined;
};
export const inboundSchema: z.ZodType<Stream, z.ZodTypeDef, Inbound> = z
.object({
id: z.number().int().optional(),
streamType: z.number().int().optional(),
default: z.boolean().optional(),
codec: z.string().optional(),
index: z.number().int().optional(),
bitrate: z.number().int().optional(),
bitDepth: z.number().int().optional(),
chromaLocation: z.string().optional(),
chromaSubsampling: z.string().optional(),
codedHeight: z.number().int().optional(),
codedWidth: z.number().int().optional(),
colorPrimaries: z.string().optional(),
colorRange: z.string().optional(),
colorSpace: z.string().optional(),
colorTrc: z.string().optional(),
frameRate: z.number().int().optional(),
hasScalingMatrix: z.boolean().optional(),
height: z.number().int().optional(),
level: z.number().int().optional(),
profile: z.string().optional(),
refFrames: z.number().int().optional(),
scanType: z.string().optional(),
streamIdentifier: z.string().optional(),
width: z.number().int().optional(),
displayTitle: z.string().optional(),
extendedDisplayTitle: z.string().optional(),
selected: z.boolean().optional(),
channels: z.number().int().optional(),
language: z.string().optional(),
languageTag: z.string().optional(),
languageCode: z.string().optional(),
samplingRate: z.number().int().optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.streamType === undefined ? null : { streamType: v.streamType }),
...(v.default === undefined ? null : { default: v.default }),
...(v.codec === undefined ? null : { codec: v.codec }),
...(v.index === undefined ? null : { index: v.index }),
...(v.bitrate === undefined ? null : { bitrate: v.bitrate }),
...(v.bitDepth === undefined ? null : { bitDepth: v.bitDepth }),
...(v.chromaLocation === undefined ? null : { chromaLocation: v.chromaLocation }),
...(v.chromaSubsampling === undefined
? null
: { chromaSubsampling: v.chromaSubsampling }),
...(v.codedHeight === undefined ? null : { codedHeight: v.codedHeight }),
...(v.codedWidth === undefined ? null : { codedWidth: v.codedWidth }),
...(v.colorPrimaries === undefined ? null : { colorPrimaries: v.colorPrimaries }),
...(v.colorRange === undefined ? null : { colorRange: v.colorRange }),
...(v.colorSpace === undefined ? null : { colorSpace: v.colorSpace }),
...(v.colorTrc === undefined ? null : { colorTrc: v.colorTrc }),
...(v.frameRate === undefined ? null : { frameRate: v.frameRate }),
...(v.hasScalingMatrix === undefined
? null
: { hasScalingMatrix: v.hasScalingMatrix }),
...(v.height === undefined ? null : { height: v.height }),
...(v.level === undefined ? null : { level: v.level }),
...(v.profile === undefined ? null : { profile: v.profile }),
...(v.refFrames === undefined ? null : { refFrames: v.refFrames }),
...(v.scanType === undefined ? null : { scanType: v.scanType }),
...(v.streamIdentifier === undefined
? null
: { streamIdentifier: v.streamIdentifier }),
...(v.width === undefined ? null : { width: v.width }),
...(v.displayTitle === undefined ? null : { displayTitle: v.displayTitle }),
...(v.extendedDisplayTitle === undefined
? null
: { extendedDisplayTitle: v.extendedDisplayTitle }),
...(v.selected === undefined ? null : { selected: v.selected }),
...(v.channels === undefined ? null : { channels: v.channels }),
...(v.language === undefined ? null : { language: v.language }),
...(v.languageTag === undefined ? null : { languageTag: v.languageTag }),
...(v.languageCode === undefined ? null : { languageCode: v.languageCode }),
...(v.samplingRate === undefined ? null : { samplingRate: v.samplingRate }),
};
});
export type Outbound = {
id?: number | undefined;
streamType?: number | undefined;
default?: boolean | undefined;
codec?: string | undefined;
index?: number | undefined;
bitrate?: number | undefined;
bitDepth?: number | undefined;
chromaLocation?: string | undefined;
chromaSubsampling?: string | undefined;
codedHeight?: number | undefined;
codedWidth?: number | undefined;
colorPrimaries?: string | undefined;
colorRange?: string | undefined;
colorSpace?: string | undefined;
colorTrc?: string | undefined;
frameRate?: number | undefined;
hasScalingMatrix?: boolean | undefined;
height?: number | undefined;
level?: number | undefined;
profile?: string | undefined;
refFrames?: number | undefined;
scanType?: string | undefined;
streamIdentifier?: string | undefined;
width?: number | undefined;
displayTitle?: string | undefined;
extendedDisplayTitle?: string | undefined;
selected?: boolean | undefined;
channels?: number | undefined;
language?: string | undefined;
languageTag?: string | undefined;
languageCode?: string | undefined;
samplingRate?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Stream> = z
.object({
id: z.number().int().optional(),
streamType: z.number().int().optional(),
default: z.boolean().optional(),
codec: z.string().optional(),
index: z.number().int().optional(),
bitrate: z.number().int().optional(),
bitDepth: z.number().int().optional(),
chromaLocation: z.string().optional(),
chromaSubsampling: z.string().optional(),
codedHeight: z.number().int().optional(),
codedWidth: z.number().int().optional(),
colorPrimaries: z.string().optional(),
colorRange: z.string().optional(),
colorSpace: z.string().optional(),
colorTrc: z.string().optional(),
frameRate: z.number().int().optional(),
hasScalingMatrix: z.boolean().optional(),
height: z.number().int().optional(),
level: z.number().int().optional(),
profile: z.string().optional(),
refFrames: z.number().int().optional(),
scanType: z.string().optional(),
streamIdentifier: z.string().optional(),
width: z.number().int().optional(),
displayTitle: z.string().optional(),
extendedDisplayTitle: z.string().optional(),
selected: z.boolean().optional(),
channels: z.number().int().optional(),
language: z.string().optional(),
languageTag: z.string().optional(),
languageCode: z.string().optional(),
samplingRate: z.number().int().optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.streamType === undefined ? null : { streamType: v.streamType }),
...(v.default === undefined ? null : { default: v.default }),
...(v.codec === undefined ? null : { codec: v.codec }),
...(v.index === undefined ? null : { index: v.index }),
...(v.bitrate === undefined ? null : { bitrate: v.bitrate }),
...(v.bitDepth === undefined ? null : { bitDepth: v.bitDepth }),
...(v.chromaLocation === undefined ? null : { chromaLocation: v.chromaLocation }),
...(v.chromaSubsampling === undefined
? null
: { chromaSubsampling: v.chromaSubsampling }),
...(v.codedHeight === undefined ? null : { codedHeight: v.codedHeight }),
...(v.codedWidth === undefined ? null : { codedWidth: v.codedWidth }),
...(v.colorPrimaries === undefined ? null : { colorPrimaries: v.colorPrimaries }),
...(v.colorRange === undefined ? null : { colorRange: v.colorRange }),
...(v.colorSpace === undefined ? null : { colorSpace: v.colorSpace }),
...(v.colorTrc === undefined ? null : { colorTrc: v.colorTrc }),
...(v.frameRate === undefined ? null : { frameRate: v.frameRate }),
...(v.hasScalingMatrix === undefined
? null
: { hasScalingMatrix: v.hasScalingMatrix }),
...(v.height === undefined ? null : { height: v.height }),
...(v.level === undefined ? null : { level: v.level }),
...(v.profile === undefined ? null : { profile: v.profile }),
...(v.refFrames === undefined ? null : { refFrames: v.refFrames }),
...(v.scanType === undefined ? null : { scanType: v.scanType }),
...(v.streamIdentifier === undefined
? null
: { streamIdentifier: v.streamIdentifier }),
...(v.width === undefined ? null : { width: v.width }),
...(v.displayTitle === undefined ? null : { displayTitle: v.displayTitle }),
...(v.extendedDisplayTitle === undefined
? null
: { extendedDisplayTitle: v.extendedDisplayTitle }),
...(v.selected === undefined ? null : { selected: v.selected }),
...(v.channels === undefined ? null : { channels: v.channels }),
...(v.language === undefined ? null : { language: v.language }),
...(v.languageTag === undefined ? null : { languageTag: v.languageTag }),
...(v.languageCode === undefined ? null : { languageCode: v.languageCode }),
...(v.samplingRate === undefined ? null : { samplingRate: v.samplingRate }),
};
});
}
/** @internal */
export namespace GetMetadataPart$ {
export type Inbound = {
id?: number | undefined;
key?: string | undefined;
duration?: number | undefined;
file?: string | undefined;
size?: number | undefined;
audioProfile?: string | undefined;
container?: string | undefined;
has64bitOffsets?: boolean | undefined;
optimizedForStreaming?: boolean | undefined;
videoProfile?: string | undefined;
Stream?: Array<Stream$.Inbound> | undefined;
};
export const inboundSchema: z.ZodType<GetMetadataPart, z.ZodTypeDef, Inbound> = z
.object({
id: z.number().int().optional(),
key: z.string().optional(),
duration: z.number().int().optional(),
file: z.string().optional(),
size: z.number().int().optional(),
audioProfile: z.string().optional(),
container: z.string().optional(),
has64bitOffsets: z.boolean().optional(),
optimizedForStreaming: z.boolean().optional(),
videoProfile: z.string().optional(),
Stream: z.array(z.lazy(() => Stream$.inboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.key === undefined ? null : { key: v.key }),
...(v.duration === undefined ? null : { duration: v.duration }),
...(v.file === undefined ? null : { file: v.file }),
...(v.size === undefined ? null : { size: v.size }),
...(v.audioProfile === undefined ? null : { audioProfile: v.audioProfile }),
...(v.container === undefined ? null : { container: v.container }),
...(v.has64bitOffsets === undefined
? null
: { has64bitOffsets: v.has64bitOffsets }),
...(v.optimizedForStreaming === undefined
? null
: { optimizedForStreaming: v.optimizedForStreaming }),
...(v.videoProfile === undefined ? null : { videoProfile: v.videoProfile }),
...(v.Stream === undefined ? null : { stream: v.Stream }),
};
});
export type Outbound = {
id?: number | undefined;
key?: string | undefined;
duration?: number | undefined;
file?: string | undefined;
size?: number | undefined;
audioProfile?: string | undefined;
container?: string | undefined;
has64bitOffsets?: boolean | undefined;
optimizedForStreaming?: boolean | undefined;
videoProfile?: string | undefined;
Stream?: Array<Stream$.Outbound> | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetMetadataPart> = z
.object({
id: z.number().int().optional(),
key: z.string().optional(),
duration: z.number().int().optional(),
file: z.string().optional(),
size: z.number().int().optional(),
audioProfile: z.string().optional(),
container: z.string().optional(),
has64bitOffsets: z.boolean().optional(),
optimizedForStreaming: z.boolean().optional(),
videoProfile: z.string().optional(),
stream: z.array(z.lazy(() => Stream$.outboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.key === undefined ? null : { key: v.key }),
...(v.duration === undefined ? null : { duration: v.duration }),
...(v.file === undefined ? null : { file: v.file }),
...(v.size === undefined ? null : { size: v.size }),
...(v.audioProfile === undefined ? null : { audioProfile: v.audioProfile }),
...(v.container === undefined ? null : { container: v.container }),
...(v.has64bitOffsets === undefined
? null
: { has64bitOffsets: v.has64bitOffsets }),
...(v.optimizedForStreaming === undefined
? null
: { optimizedForStreaming: v.optimizedForStreaming }),
...(v.videoProfile === undefined ? null : { videoProfile: v.videoProfile }),
...(v.stream === undefined ? null : { Stream: v.stream }),
};
});
}
/** @internal */
export namespace GetMetadataMedia$ {
export type Inbound = {
id?: number | undefined;
duration?: number | undefined;
bitrate?: number | undefined;
width?: number | undefined;
height?: number | undefined;
aspectRatio?: number | undefined;
audioChannels?: number | undefined;
audioCodec?: string | undefined;
videoCodec?: string | undefined;
videoResolution?: string | undefined;
container?: string | undefined;
videoFrameRate?: string | undefined;
optimizedForStreaming?: number | undefined;
audioProfile?: string | undefined;
has64bitOffsets?: boolean | undefined;
videoProfile?: string | undefined;
Part?: Array<GetMetadataPart$.Inbound> | undefined;
};
export const inboundSchema: z.ZodType<GetMetadataMedia, z.ZodTypeDef, Inbound> = z
.object({
id: z.number().int().optional(),
duration: z.number().int().optional(),
bitrate: z.number().int().optional(),
width: z.number().int().optional(),
height: z.number().int().optional(),
aspectRatio: z.number().optional(),
audioChannels: z.number().int().optional(),
audioCodec: z.string().optional(),
videoCodec: z.string().optional(),
videoResolution: z.string().optional(),
container: z.string().optional(),
videoFrameRate: z.string().optional(),
optimizedForStreaming: z.number().int().optional(),
audioProfile: z.string().optional(),
has64bitOffsets: z.boolean().optional(),
videoProfile: z.string().optional(),
Part: z.array(z.lazy(() => GetMetadataPart$.inboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.duration === undefined ? null : { duration: v.duration }),
...(v.bitrate === undefined ? null : { bitrate: v.bitrate }),
...(v.width === undefined ? null : { width: v.width }),
...(v.height === undefined ? null : { height: v.height }),
...(v.aspectRatio === undefined ? null : { aspectRatio: v.aspectRatio }),
...(v.audioChannels === undefined ? null : { audioChannels: v.audioChannels }),
...(v.audioCodec === undefined ? null : { audioCodec: v.audioCodec }),
...(v.videoCodec === undefined ? null : { videoCodec: v.videoCodec }),
...(v.videoResolution === undefined
? null
: { videoResolution: v.videoResolution }),
...(v.container === undefined ? null : { container: v.container }),
...(v.videoFrameRate === undefined ? null : { videoFrameRate: v.videoFrameRate }),
...(v.optimizedForStreaming === undefined
? null
: { optimizedForStreaming: v.optimizedForStreaming }),
...(v.audioProfile === undefined ? null : { audioProfile: v.audioProfile }),
...(v.has64bitOffsets === undefined
? null
: { has64bitOffsets: v.has64bitOffsets }),
...(v.videoProfile === undefined ? null : { videoProfile: v.videoProfile }),
...(v.Part === undefined ? null : { part: v.Part }),
};
});
export type Outbound = {
id?: number | undefined;
duration?: number | undefined;
bitrate?: number | undefined;
width?: number | undefined;
height?: number | undefined;
aspectRatio?: number | undefined;
audioChannels?: number | undefined;
audioCodec?: string | undefined;
videoCodec?: string | undefined;
videoResolution?: string | undefined;
container?: string | undefined;
videoFrameRate?: string | undefined;
optimizedForStreaming?: number | undefined;
audioProfile?: string | undefined;
has64bitOffsets?: boolean | undefined;
videoProfile?: string | undefined;
Part?: Array<GetMetadataPart$.Outbound> | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetMetadataMedia> = z
.object({
id: z.number().int().optional(),
duration: z.number().int().optional(),
bitrate: z.number().int().optional(),
width: z.number().int().optional(),
height: z.number().int().optional(),
aspectRatio: z.number().optional(),
audioChannels: z.number().int().optional(),
audioCodec: z.string().optional(),
videoCodec: z.string().optional(),
videoResolution: z.string().optional(),
container: z.string().optional(),
videoFrameRate: z.string().optional(),
optimizedForStreaming: z.number().int().optional(),
audioProfile: z.string().optional(),
has64bitOffsets: z.boolean().optional(),
videoProfile: z.string().optional(),
part: z.array(z.lazy(() => GetMetadataPart$.outboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.duration === undefined ? null : { duration: v.duration }),
...(v.bitrate === undefined ? null : { bitrate: v.bitrate }),
...(v.width === undefined ? null : { width: v.width }),
...(v.height === undefined ? null : { height: v.height }),
...(v.aspectRatio === undefined ? null : { aspectRatio: v.aspectRatio }),
...(v.audioChannels === undefined ? null : { audioChannels: v.audioChannels }),
...(v.audioCodec === undefined ? null : { audioCodec: v.audioCodec }),
...(v.videoCodec === undefined ? null : { videoCodec: v.videoCodec }),
...(v.videoResolution === undefined
? null
: { videoResolution: v.videoResolution }),
...(v.container === undefined ? null : { container: v.container }),
...(v.videoFrameRate === undefined ? null : { videoFrameRate: v.videoFrameRate }),
...(v.optimizedForStreaming === undefined
? null
: { optimizedForStreaming: v.optimizedForStreaming }),
...(v.audioProfile === undefined ? null : { audioProfile: v.audioProfile }),
...(v.has64bitOffsets === undefined
? null
: { has64bitOffsets: v.has64bitOffsets }),
...(v.videoProfile === undefined ? null : { videoProfile: v.videoProfile }),
...(v.part === undefined ? null : { Part: v.part }),
};
});
}
/** @internal */
export namespace GetMetadataGenre$ {
export type Inbound = {
id?: number | undefined;
filter?: string | undefined;
tag?: string | undefined;
};
export const inboundSchema: z.ZodType<GetMetadataGenre, z.ZodTypeDef, Inbound> = z
.object({
id: z.number().int().optional(),
filter: z.string().optional(),
tag: z.string().optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.filter === undefined ? null : { filter: v.filter }),
...(v.tag === undefined ? null : { tag: v.tag }),
};
});
export type Outbound = {
id?: number | undefined;
filter?: string | undefined;
tag?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetMetadataGenre> = z
.object({
id: z.number().int().optional(),
filter: z.string().optional(),
tag: z.string().optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.filter === undefined ? null : { filter: v.filter }),
...(v.tag === undefined ? null : { tag: v.tag }),
};
});
}
/** @internal */
export namespace GetMetadataCountry$ {
export type Inbound = {
id?: number | undefined;
filter?: string | undefined;
tag?: string | undefined;
};
export const inboundSchema: z.ZodType<GetMetadataCountry, z.ZodTypeDef, Inbound> = z
.object({
id: z.number().int().optional(),
filter: z.string().optional(),
tag: z.string().optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.filter === undefined ? null : { filter: v.filter }),
...(v.tag === undefined ? null : { tag: v.tag }),
};
});
export type Outbound = {
id?: number | undefined;
filter?: string | undefined;
tag?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetMetadataCountry> = z
.object({
id: z.number().int().optional(),
filter: z.string().optional(),
tag: z.string().optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.filter === undefined ? null : { filter: v.filter }),
...(v.tag === undefined ? null : { tag: v.tag }),
};
});
}
/** @internal */
export namespace Guids$ {
export type Inbound = {
id?: string | undefined;
};
export const inboundSchema: z.ZodType<Guids, z.ZodTypeDef, Inbound> = z
.object({
id: z.string().optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
};
});
export type Outbound = {
id?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Guids> = z
.object({
id: z.string().optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
};
});
}
/** @internal */
export namespace Ratings$ {
export type Inbound = {
image?: string | undefined;
value?: number | undefined;
type?: string | undefined;
};
export const inboundSchema: z.ZodType<Ratings, z.ZodTypeDef, Inbound> = z
.object({
image: z.string().optional(),
value: z.number().optional(),
type: z.string().optional(),
})
.transform((v) => {
return {
...(v.image === undefined ? null : { image: v.image }),
...(v.value === undefined ? null : { value: v.value }),
...(v.type === undefined ? null : { type: v.type }),
};
});
export type Outbound = {
image?: string | undefined;
value?: number | undefined;
type?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Ratings> = z
.object({
image: z.string().optional(),
value: z.number().optional(),
type: z.string().optional(),
})
.transform((v) => {
return {
...(v.image === undefined ? null : { image: v.image }),
...(v.value === undefined ? null : { value: v.value }),
...(v.type === undefined ? null : { type: v.type }),
};
});
}
/** @internal */
export namespace GetMetadataDirector$ {
export type Inbound = {
id?: number | undefined;
filter?: string | undefined;
tag?: string | undefined;
tagKey?: string | undefined;
thumb?: string | undefined;
};
export const inboundSchema: z.ZodType<GetMetadataDirector, z.ZodTypeDef, Inbound> = z
.object({
id: z.number().int().optional(),
filter: z.string().optional(),
tag: z.string().optional(),
tagKey: z.string().optional(),
thumb: z.string().optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.filter === undefined ? null : { filter: v.filter }),
...(v.tag === undefined ? null : { tag: v.tag }),
...(v.tagKey === undefined ? null : { tagKey: v.tagKey }),
...(v.thumb === undefined ? null : { thumb: v.thumb }),
};
});
export type Outbound = {
id?: number | undefined;
filter?: string | undefined;
tag?: string | undefined;
tagKey?: string | undefined;
thumb?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetMetadataDirector> = z
.object({
id: z.number().int().optional(),
filter: z.string().optional(),
tag: z.string().optional(),
tagKey: z.string().optional(),
thumb: z.string().optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.filter === undefined ? null : { filter: v.filter }),
...(v.tag === undefined ? null : { tag: v.tag }),
...(v.tagKey === undefined ? null : { tagKey: v.tagKey }),
...(v.thumb === undefined ? null : { thumb: v.thumb }),
};
});
}
/** @internal */
export namespace GetMetadataWriter$ {
export type Inbound = {
id?: number | undefined;
filter?: string | undefined;
tag?: string | undefined;
tagKey?: string | undefined;
thumb?: string | undefined;
};
export const inboundSchema: z.ZodType<GetMetadataWriter, z.ZodTypeDef, Inbound> = z
.object({
id: z.number().int().optional(),
filter: z.string().optional(),
tag: z.string().optional(),
tagKey: z.string().optional(),
thumb: z.string().optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.filter === undefined ? null : { filter: v.filter }),
...(v.tag === undefined ? null : { tag: v.tag }),
...(v.tagKey === undefined ? null : { tagKey: v.tagKey }),
...(v.thumb === undefined ? null : { thumb: v.thumb }),
};
});
export type Outbound = {
id?: number | undefined;
filter?: string | undefined;
tag?: string | undefined;
tagKey?: string | undefined;
thumb?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetMetadataWriter> = z
.object({
id: z.number().int().optional(),
filter: z.string().optional(),
tag: z.string().optional(),
tagKey: z.string().optional(),
thumb: z.string().optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.filter === undefined ? null : { filter: v.filter }),
...(v.tag === undefined ? null : { tag: v.tag }),
...(v.tagKey === undefined ? null : { tagKey: v.tagKey }),
...(v.thumb === undefined ? null : { thumb: v.thumb }),
};
});
}
/** @internal */
export namespace GetMetadataRole$ {
export type Inbound = {
id?: number | undefined;
filter?: string | undefined;
tag?: string | undefined;
tagKey?: string | undefined;
role?: string | undefined;
thumb?: string | undefined;
};
export const inboundSchema: z.ZodType<GetMetadataRole, z.ZodTypeDef, Inbound> = z
.object({
id: z.number().int().optional(),
filter: z.string().optional(),
tag: z.string().optional(),
tagKey: z.string().optional(),
role: z.string().optional(),
thumb: z.string().optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.filter === undefined ? null : { filter: v.filter }),
...(v.tag === undefined ? null : { tag: v.tag }),
...(v.tagKey === undefined ? null : { tagKey: v.tagKey }),
...(v.role === undefined ? null : { role: v.role }),
...(v.thumb === undefined ? null : { thumb: v.thumb }),
};
});
export type Outbound = {
id?: number | undefined;
filter?: string | undefined;
tag?: string | undefined;
tagKey?: string | undefined;
role?: string | undefined;
thumb?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetMetadataRole> = z
.object({
id: z.number().int().optional(),
filter: z.string().optional(),
tag: z.string().optional(),
tagKey: z.string().optional(),
role: z.string().optional(),
thumb: z.string().optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.filter === undefined ? null : { filter: v.filter }),
...(v.tag === undefined ? null : { tag: v.tag }),
...(v.tagKey === undefined ? null : { tagKey: v.tagKey }),
...(v.role === undefined ? null : { role: v.role }),
...(v.thumb === undefined ? null : { thumb: v.thumb }),
};
});
}
/** @internal */
export namespace Producer$ {
export type Inbound = {
id?: number | undefined;
filter?: string | undefined;
tag?: string | undefined;
tagKey?: string | undefined;
thumb?: string | undefined;
};
export const inboundSchema: z.ZodType<Producer, z.ZodTypeDef, Inbound> = z
.object({
id: z.number().int().optional(),
filter: z.string().optional(),
tag: z.string().optional(),
tagKey: z.string().optional(),
thumb: z.string().optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.filter === undefined ? null : { filter: v.filter }),
...(v.tag === undefined ? null : { tag: v.tag }),
...(v.tagKey === undefined ? null : { tagKey: v.tagKey }),
...(v.thumb === undefined ? null : { thumb: v.thumb }),
};
});
export type Outbound = {
id?: number | undefined;
filter?: string | undefined;
tag?: string | undefined;
tagKey?: string | undefined;
thumb?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Producer> = z
.object({
id: z.number().int().optional(),
filter: z.string().optional(),
tag: z.string().optional(),
tagKey: z.string().optional(),
thumb: z.string().optional(),
})
.transform((v) => {
return {
...(v.id === undefined ? null : { id: v.id }),
...(v.filter === undefined ? null : { filter: v.filter }),
...(v.tag === undefined ? null : { tag: v.tag }),
...(v.tagKey === undefined ? null : { tagKey: v.tagKey }),
...(v.thumb === undefined ? null : { thumb: v.thumb }),
};
});
}
/** @internal */
export namespace GetMetadataMetadata$ {
export type Inbound = {
ratingKey?: string | undefined;
key?: string | undefined;
guid?: string | undefined;
studio?: string | undefined;
type?: string | undefined;
title?: string | undefined;
librarySectionTitle?: string | undefined;
librarySectionID?: number | undefined;
librarySectionKey?: string | undefined;
contentRating?: string | undefined;
summary?: string | undefined;
rating?: number | undefined;
audienceRating?: number | undefined;
year?: number | undefined;
tagline?: string | undefined;
thumb?: string | undefined;
art?: string | undefined;
duration?: number | undefined;
originallyAvailableAt?: string | undefined;
addedAt?: number | undefined;
updatedAt?: number | undefined;
audienceRatingImage?: string | undefined;
hasPremiumPrimaryExtra?: string | undefined;
ratingImage?: string | undefined;
Media?: Array<GetMetadataMedia$.Inbound> | undefined;
Genre?: Array<GetMetadataGenre$.Inbound> | undefined;
Country?: Array<GetMetadataCountry$.Inbound> | undefined;
guids?: Array<Guids$.Inbound> | undefined;
ratings?: Array<Ratings$.Inbound> | undefined;
Director?: Array<GetMetadataDirector$.Inbound> | undefined;
Writer?: Array<GetMetadataWriter$.Inbound> | undefined;
Role?: Array<GetMetadataRole$.Inbound> | undefined;
Producer?: Array<Producer$.Inbound> | undefined;
};
export const inboundSchema: z.ZodType<GetMetadataMetadata, z.ZodTypeDef, Inbound> = z
.object({
ratingKey: z.string().optional(),
key: z.string().optional(),
guid: z.string().optional(),
studio: z.string().optional(),
type: z.string().optional(),
title: z.string().optional(),
librarySectionTitle: z.string().optional(),
librarySectionID: z.number().int().optional(),
librarySectionKey: z.string().optional(),
contentRating: z.string().optional(),
summary: z.string().optional(),
rating: z.number().optional(),
audienceRating: z.number().optional(),
year: z.number().int().optional(),
tagline: z.string().optional(),
thumb: z.string().optional(),
art: z.string().optional(),
duration: z.number().int().optional(),
originallyAvailableAt: z
.string()
.transform((v) => new RFCDate(v))
.optional(),
addedAt: z.number().int().optional(),
updatedAt: z.number().int().optional(),
audienceRatingImage: z.string().optional(),
hasPremiumPrimaryExtra: z.string().optional(),
ratingImage: z.string().optional(),
Media: z.array(z.lazy(() => GetMetadataMedia$.inboundSchema)).optional(),
Genre: z.array(z.lazy(() => GetMetadataGenre$.inboundSchema)).optional(),
Country: z.array(z.lazy(() => GetMetadataCountry$.inboundSchema)).optional(),
guids: z.array(z.lazy(() => Guids$.inboundSchema)).optional(),
ratings: z.array(z.lazy(() => Ratings$.inboundSchema)).optional(),
Director: z.array(z.lazy(() => GetMetadataDirector$.inboundSchema)).optional(),
Writer: z.array(z.lazy(() => GetMetadataWriter$.inboundSchema)).optional(),
Role: z.array(z.lazy(() => GetMetadataRole$.inboundSchema)).optional(),
Producer: z.array(z.lazy(() => Producer$.inboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.ratingKey === undefined ? null : { ratingKey: v.ratingKey }),
...(v.key === undefined ? null : { key: v.key }),
...(v.guid === undefined ? null : { guid: v.guid }),
...(v.studio === undefined ? null : { studio: v.studio }),
...(v.type === undefined ? null : { type: v.type }),
...(v.title === undefined ? null : { title: v.title }),
...(v.librarySectionTitle === undefined
? null
: { librarySectionTitle: v.librarySectionTitle }),
...(v.librarySectionID === undefined
? null
: { librarySectionID: v.librarySectionID }),
...(v.librarySectionKey === undefined
? null
: { librarySectionKey: v.librarySectionKey }),
...(v.contentRating === undefined ? null : { contentRating: v.contentRating }),
...(v.summary === undefined ? null : { summary: v.summary }),
...(v.rating === undefined ? null : { rating: v.rating }),
...(v.audienceRating === undefined ? null : { audienceRating: v.audienceRating }),
...(v.year === undefined ? null : { year: v.year }),
...(v.tagline === undefined ? null : { tagline: v.tagline }),
...(v.thumb === undefined ? null : { thumb: v.thumb }),
...(v.art === undefined ? null : { art: v.art }),
...(v.duration === undefined ? null : { duration: v.duration }),
...(v.originallyAvailableAt === undefined
? null
: { originallyAvailableAt: v.originallyAvailableAt }),
...(v.addedAt === undefined ? null : { addedAt: v.addedAt }),
...(v.updatedAt === undefined ? null : { updatedAt: v.updatedAt }),
...(v.audienceRatingImage === undefined
? null
: { audienceRatingImage: v.audienceRatingImage }),
...(v.hasPremiumPrimaryExtra === undefined
? null
: { hasPremiumPrimaryExtra: v.hasPremiumPrimaryExtra }),
...(v.ratingImage === undefined ? null : { ratingImage: v.ratingImage }),
...(v.Media === undefined ? null : { media: v.Media }),
...(v.Genre === undefined ? null : { genre: v.Genre }),
...(v.Country === undefined ? null : { country: v.Country }),
...(v.guids === undefined ? null : { guids: v.guids }),
...(v.ratings === undefined ? null : { ratings: v.ratings }),
...(v.Director === undefined ? null : { director: v.Director }),
...(v.Writer === undefined ? null : { writer: v.Writer }),
...(v.Role === undefined ? null : { role: v.Role }),
...(v.Producer === undefined ? null : { producer: v.Producer }),
};
});
export type Outbound = {
ratingKey?: string | undefined;
key?: string | undefined;
guid?: string | undefined;
studio?: string | undefined;
type?: string | undefined;
title?: string | undefined;
librarySectionTitle?: string | undefined;
librarySectionID?: number | undefined;
librarySectionKey?: string | undefined;
contentRating?: string | undefined;
summary?: string | undefined;
rating?: number | undefined;
audienceRating?: number | undefined;
year?: number | undefined;
tagline?: string | undefined;
thumb?: string | undefined;
art?: string | undefined;
duration?: number | undefined;
originallyAvailableAt?: string | undefined;
addedAt?: number | undefined;
updatedAt?: number | undefined;
audienceRatingImage?: string | undefined;
hasPremiumPrimaryExtra?: string | undefined;
ratingImage?: string | undefined;
Media?: Array<GetMetadataMedia$.Outbound> | undefined;
Genre?: Array<GetMetadataGenre$.Outbound> | undefined;
Country?: Array<GetMetadataCountry$.Outbound> | undefined;
guids?: Array<Guids$.Outbound> | undefined;
ratings?: Array<Ratings$.Outbound> | undefined;
Director?: Array<GetMetadataDirector$.Outbound> | undefined;
Writer?: Array<GetMetadataWriter$.Outbound> | undefined;
Role?: Array<GetMetadataRole$.Outbound> | undefined;
Producer?: Array<Producer$.Outbound> | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetMetadataMetadata> = z
.object({
ratingKey: z.string().optional(),
key: z.string().optional(),
guid: z.string().optional(),
studio: z.string().optional(),
type: z.string().optional(),
title: z.string().optional(),
librarySectionTitle: z.string().optional(),
librarySectionID: z.number().int().optional(),
librarySectionKey: z.string().optional(),
contentRating: z.string().optional(),
summary: z.string().optional(),
rating: z.number().optional(),
audienceRating: z.number().optional(),
year: z.number().int().optional(),
tagline: z.string().optional(),
thumb: z.string().optional(),
art: z.string().optional(),
duration: z.number().int().optional(),
originallyAvailableAt: z
.instanceof(RFCDate)
.transform((v) => v.toString())
.optional(),
addedAt: z.number().int().optional(),
updatedAt: z.number().int().optional(),
audienceRatingImage: z.string().optional(),
hasPremiumPrimaryExtra: z.string().optional(),
ratingImage: z.string().optional(),
media: z.array(z.lazy(() => GetMetadataMedia$.outboundSchema)).optional(),
genre: z.array(z.lazy(() => GetMetadataGenre$.outboundSchema)).optional(),
country: z.array(z.lazy(() => GetMetadataCountry$.outboundSchema)).optional(),
guids: z.array(z.lazy(() => Guids$.outboundSchema)).optional(),
ratings: z.array(z.lazy(() => Ratings$.outboundSchema)).optional(),
director: z.array(z.lazy(() => GetMetadataDirector$.outboundSchema)).optional(),
writer: z.array(z.lazy(() => GetMetadataWriter$.outboundSchema)).optional(),
role: z.array(z.lazy(() => GetMetadataRole$.outboundSchema)).optional(),
producer: z.array(z.lazy(() => Producer$.outboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.ratingKey === undefined ? null : { ratingKey: v.ratingKey }),
...(v.key === undefined ? null : { key: v.key }),
...(v.guid === undefined ? null : { guid: v.guid }),
...(v.studio === undefined ? null : { studio: v.studio }),
...(v.type === undefined ? null : { type: v.type }),
...(v.title === undefined ? null : { title: v.title }),
...(v.librarySectionTitle === undefined
? null
: { librarySectionTitle: v.librarySectionTitle }),
...(v.librarySectionID === undefined
? null
: { librarySectionID: v.librarySectionID }),
...(v.librarySectionKey === undefined
? null
: { librarySectionKey: v.librarySectionKey }),
...(v.contentRating === undefined ? null : { contentRating: v.contentRating }),
...(v.summary === undefined ? null : { summary: v.summary }),
...(v.rating === undefined ? null : { rating: v.rating }),
...(v.audienceRating === undefined ? null : { audienceRating: v.audienceRating }),
...(v.year === undefined ? null : { year: v.year }),
...(v.tagline === undefined ? null : { tagline: v.tagline }),
...(v.thumb === undefined ? null : { thumb: v.thumb }),
...(v.art === undefined ? null : { art: v.art }),
...(v.duration === undefined ? null : { duration: v.duration }),
...(v.originallyAvailableAt === undefined
? null
: { originallyAvailableAt: v.originallyAvailableAt }),
...(v.addedAt === undefined ? null : { addedAt: v.addedAt }),
...(v.updatedAt === undefined ? null : { updatedAt: v.updatedAt }),
...(v.audienceRatingImage === undefined
? null
: { audienceRatingImage: v.audienceRatingImage }),
...(v.hasPremiumPrimaryExtra === undefined
? null
: { hasPremiumPrimaryExtra: v.hasPremiumPrimaryExtra }),
...(v.ratingImage === undefined ? null : { ratingImage: v.ratingImage }),
...(v.media === undefined ? null : { Media: v.media }),
...(v.genre === undefined ? null : { Genre: v.genre }),
...(v.country === undefined ? null : { Country: v.country }),
...(v.guids === undefined ? null : { guids: v.guids }),
...(v.ratings === undefined ? null : { ratings: v.ratings }),
...(v.director === undefined ? null : { Director: v.director }),
...(v.writer === undefined ? null : { Writer: v.writer }),
...(v.role === undefined ? null : { Role: v.role }),
...(v.producer === undefined ? null : { Producer: v.producer }),
};
});
}
/** @internal */
export namespace GetMetadataMediaContainer$ {
export type Inbound = {
size?: number | undefined;
allowSync?: boolean | undefined;
identifier?: string | undefined;
librarySectionID?: number | undefined;
librarySectionTitle?: string | undefined;
librarySectionUUID?: string | undefined;
mediaTagPrefix?: string | undefined;
mediaTagVersion?: number | undefined;
Metadata?: Array<GetMetadataMetadata$.Inbound> | undefined;
};
export const inboundSchema: z.ZodType<GetMetadataMediaContainer, z.ZodTypeDef, Inbound> = z
.object({
size: z.number().int().optional(),
allowSync: z.boolean().optional(),
identifier: z.string().optional(),
librarySectionID: z.number().int().optional(),
librarySectionTitle: z.string().optional(),
librarySectionUUID: z.string().optional(),
mediaTagPrefix: z.string().optional(),
mediaTagVersion: z.number().int().optional(),
Metadata: z.array(z.lazy(() => GetMetadataMetadata$.inboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.size === undefined ? null : { size: v.size }),
...(v.allowSync === undefined ? null : { allowSync: v.allowSync }),
...(v.identifier === undefined ? null : { identifier: v.identifier }),
...(v.librarySectionID === undefined
? null
: { librarySectionID: v.librarySectionID }),
...(v.librarySectionTitle === undefined
? null
: { librarySectionTitle: v.librarySectionTitle }),
...(v.librarySectionUUID === undefined
? null
: { librarySectionUUID: v.librarySectionUUID }),
...(v.mediaTagPrefix === undefined ? null : { mediaTagPrefix: v.mediaTagPrefix }),
...(v.mediaTagVersion === undefined
? null
: { mediaTagVersion: v.mediaTagVersion }),
...(v.Metadata === undefined ? null : { metadata: v.Metadata }),
};
});
export type Outbound = {
size?: number | undefined;
allowSync?: boolean | undefined;
identifier?: string | undefined;
librarySectionID?: number | undefined;
librarySectionTitle?: string | undefined;
librarySectionUUID?: string | undefined;
mediaTagPrefix?: string | undefined;
mediaTagVersion?: number | undefined;
Metadata?: Array<GetMetadataMetadata$.Outbound> | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetMetadataMediaContainer> = z
.object({
size: z.number().int().optional(),
allowSync: z.boolean().optional(),
identifier: z.string().optional(),
librarySectionID: z.number().int().optional(),
librarySectionTitle: z.string().optional(),
librarySectionUUID: z.string().optional(),
mediaTagPrefix: z.string().optional(),
mediaTagVersion: z.number().int().optional(),
metadata: z.array(z.lazy(() => GetMetadataMetadata$.outboundSchema)).optional(),
})
.transform((v) => {
return {
...(v.size === undefined ? null : { size: v.size }),
...(v.allowSync === undefined ? null : { allowSync: v.allowSync }),
...(v.identifier === undefined ? null : { identifier: v.identifier }),
...(v.librarySectionID === undefined
? null
: { librarySectionID: v.librarySectionID }),
...(v.librarySectionTitle === undefined
? null
: { librarySectionTitle: v.librarySectionTitle }),
...(v.librarySectionUUID === undefined
? null
: { librarySectionUUID: v.librarySectionUUID }),
...(v.mediaTagPrefix === undefined ? null : { mediaTagPrefix: v.mediaTagPrefix }),
...(v.mediaTagVersion === undefined
? null
: { mediaTagVersion: v.mediaTagVersion }),
...(v.metadata === undefined ? null : { Metadata: v.metadata }),
};
});
}
/** @internal */
export namespace GetMetadataResponseBody$ {
export type Inbound = {
MediaContainer?: GetMetadataMediaContainer$.Inbound | undefined;
};
export const inboundSchema: z.ZodType<GetMetadataResponseBody, z.ZodTypeDef, Inbound> = z
.object({
MediaContainer: z.lazy(() => GetMetadataMediaContainer$.inboundSchema).optional(),
})
.transform((v) => {
return {
...(v.MediaContainer === undefined ? null : { mediaContainer: v.MediaContainer }),
};
});
export type Outbound = {
MediaContainer?: GetMetadataMediaContainer$.Outbound | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetMetadataResponseBody> = z
.object({
mediaContainer: z.lazy(() => GetMetadataMediaContainer$.outboundSchema).optional(),
})
.transform((v) => {
return {
...(v.mediaContainer === undefined ? null : { MediaContainer: v.mediaContainer }),
};
});
}
/** @internal */
export namespace GetMetadataResponse$ {
export type Inbound = {
ContentType: string;
StatusCode: number;
RawResponse: Response;
object?: GetMetadataResponseBody$.Inbound | undefined;
};
export const inboundSchema: z.ZodType<GetMetadataResponse, z.ZodTypeDef, Inbound> = z
.object({
ContentType: z.string(),
StatusCode: z.number().int(),
RawResponse: z.instanceof(Response),
object: z.lazy(() => GetMetadataResponseBody$.inboundSchema).optional(),
})
.transform((v) => {
return {
contentType: v.ContentType,
statusCode: v.StatusCode,
rawResponse: v.RawResponse,
...(v.object === undefined ? null : { object: v.object }),
};
});
export type Outbound = {
ContentType: string;
StatusCode: number;
RawResponse: never;
object?: GetMetadataResponseBody$.Outbound | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetMetadataResponse> = z
.object({
contentType: z.string(),
statusCode: z.number().int(),
rawResponse: z.instanceof(Response).transform(() => {
throw new Error("Response cannot be serialized");
}),
object: z.lazy(() => GetMetadataResponseBody$.outboundSchema).optional(),
})
.transform((v) => {
return {
ContentType: v.contentType,
StatusCode: v.statusCode,
RawResponse: v.rawResponse,
...(v.object === undefined ? null : { object: v.object }),
};
});
}