/*
 * 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";
import { Result as SafeParseResult } from "../../types/fp.js";
import { RFCDate } from "../../types/rfcdate.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js";

export type GetMediaMetaDataRequest = {
  /**
   * the id of the library item to return the children of.
   */
  ratingKey: number;
  /**
   * Include concerts data if set to true.
   */
  includeConcerts?: boolean | undefined;
  /**
   * Include extra content (e.g. bonus features).
   */
  includeExtras?: boolean | undefined;
  /**
   * Include on-deck items.
   */
  includeOnDeck?: boolean | undefined;
  /**
   * Include popular leaves (episodes/chapters).
   */
  includePopularLeaves?: boolean | undefined;
  /**
   * Include preferences information.
   */
  includePreferences?: boolean | undefined;
  /**
   * Include reviews for the content.
   */
  includeReviews?: boolean | undefined;
  /**
   * Include chapter details.
   */
  includeChapters?: boolean | undefined;
  /**
   * Include station data.
   */
  includeStations?: boolean | undefined;
  /**
   * Include external media data.
   */
  includeExternalMedia?: boolean | undefined;
  /**
   * Trigger asynchronous metadata augmentation.
   */
  asyncAugmentMetadata?: boolean | undefined;
  /**
   * Trigger asynchronous file checking.
   */
  asyncCheckFiles?: boolean | undefined;
  /**
   * Trigger asynchronous refresh of analysis.
   */
  asyncRefreshAnalysis?: boolean | undefined;
  /**
   * Trigger asynchronous refresh of the local media agent.
   */
  asyncRefreshLocalMediaAgent?: boolean | undefined;
};

export type GetMediaMetaDataStream = {
  /**
   * Unique stream identifier.
   */
  id: number;
  /**
   * Stream type (1=video, 2=audio, 3=subtitle).
   */
  streamType: number;
  /**
   * Indicates if this stream is default.
   */
  default?: boolean | undefined;
  /**
   * Codec used by the stream.
   */
  codec: string;
  /**
   * Index of the stream.
   */
  index: number;
  /**
   * Bitrate of the stream.
   */
  bitrate: number;
  /**
   * Language of the stream.
   */
  language: string;
  /**
   * Language tag (e.g., en).
   */
  languageTag: string;
  /**
   * ISO language code.
   */
  languageCode: string;
  /**
   * Dolby Vision BL compatibility ID.
   */
  doviblCompatID?: number | undefined;
  /**
   * Indicates if Dolby Vision BL is present.
   */
  doviblPresent?: boolean | undefined;
  /**
   * Indicates if Dolby Vision EL is present.
   */
  dovielPresent?: boolean | undefined;
  /**
   * Dolby Vision level.
   */
  doviLevel?: number | undefined;
  /**
   * Indicates if Dolby Vision is present.
   */
  doviPresent?: boolean | undefined;
  /**
   * Dolby Vision profile.
   */
  doviProfile?: number | undefined;
  /**
   * Indicates if Dolby Vision RPU is present.
   */
  dovirpuPresent?: boolean | undefined;
  /**
   * Dolby Vision version.
   */
  doviVersion?: string | undefined;
  /**
   * Bit depth of the video stream.
   */
  bitDepth?: number | undefined;
  /**
   * Chroma sample location.
   */
  chromaLocation?: string | undefined;
  /**
   * Chroma subsampling format.
   */
  chromaSubsampling?: string | undefined;
  /**
   * Coded video height.
   */
  codedHeight?: number | undefined;
  /**
   * Coded video width.
   */
  codedWidth?: number | undefined;
  /**
   * Color primaries used.
   */
  colorPrimaries?: string | undefined;
  /**
   * Color range (e.g., tv).
   */
  colorRange?: string | undefined;
  /**
   * Color space.
   */
  colorSpace?: string | undefined;
  /**
   * Color transfer characteristics.
   */
  colorTrc?: string | undefined;
  /**
   * Frame rate of the stream.
   */
  frameRate?: number | undefined;
  /**
   * Height of the video stream.
   */
  height?: number | undefined;
  /**
   * Video level.
   */
  level?: number | undefined;
  /**
   * Indicates if this is the original stream.
   */
  original?: boolean | undefined;
  hasScalingMatrix?: boolean | undefined;
  /**
   * Video profile.
   */
  profile?: string | undefined;
  scanType?: string | undefined;
  /**
   * Number of reference frames.
   */
  refFrames?: number | undefined;
  /**
   * Width of the video stream.
   */
  width?: number | undefined;
  /**
   * Display title for the stream.
   */
  displayTitle: string;
  /**
   * Extended display title for the stream.
   */
  extendedDisplayTitle: string;
  /**
   * Indicates if this stream is selected (applicable for audio streams).
   */
  selected?: boolean | undefined;
  forced?: boolean | undefined;
  /**
   * Number of audio channels (for audio streams).
   */
  channels?: number | undefined;
  /**
   * Audio channel layout.
   */
  audioChannelLayout?: string | undefined;
  /**
   * Sampling rate for the audio stream.
   */
  samplingRate?: number | undefined;
  /**
   * Indicates if the stream can auto-sync.
   */
  canAutoSync?: boolean | undefined;
  /**
   * Indicates if the stream is for the hearing impaired.
   */
  hearingImpaired?: boolean | undefined;
  /**
   * Indicates if the stream is a dub.
   */
  dub?: boolean | undefined;
  /**
   * Optional title for the stream (e.g., language variant).
   */
  title?: string | undefined;
};

export type GetMediaMetaDataPart = {
  /**
   * Indicates if the part is accessible.
   */
  accessible?: boolean | undefined;
  /**
   * Indicates if the part exists.
   */
  exists?: boolean | undefined;
  /**
   * Unique part identifier.
   */
  id: number;
  /**
   * Key to access this part.
   */
  key: string;
  indexes?: string | undefined;
  /**
   * Duration of the part in milliseconds.
   */
  duration: number;
  /**
   * File path for the part.
   */
  file: string;
  /**
   * File size in bytes.
   */
  size: number;
  /**
   * Container format of the part.
   */
  container: string;
  /**
   * Video profile for the part.
   */
  videoProfile: string;
  /**
   * An array of streams for this part.
   */
  stream: Array<GetMediaMetaDataStream>;
};

export type GetMediaMetaDataMedia = {
  /**
   * Unique media identifier.
   */
  id: number;
  /**
   * Duration of the media in milliseconds.
   */
  duration: number;
  /**
   * Bitrate in bits per second.
   */
  bitrate: number;
  /**
   * Video width in pixels.
   */
  width: number;
  /**
   * Video height in pixels.
   */
  height: number;
  /**
   * Aspect ratio of the video.
   */
  aspectRatio: number;
  /**
   * Number of audio channels.
   */
  audioChannels: number;
  /**
   * Audio codec used.
   */
  audioCodec: string;
  /**
   * Video codec used.
   */
  videoCodec: string;
  /**
   * Video resolution (e.g., 4k).
   */
  videoResolution: string;
  /**
   * File container type.
   */
  container: string;
  /**
   * Frame rate of the video (e.g., 24p).
   */
  videoFrameRate: string;
  /**
   * Video profile (e.g., main 10).
   */
  videoProfile: string;
  /**
   * Indicates whether voice activity is detected.
   */
  hasVoiceActivity: boolean;
  /**
   * An array of parts for this media item.
   */
  part: Array<GetMediaMetaDataPart>;
};

export type GetMediaMetaDataImage = {
  /**
   * Alternate text for the image.
   */
  alt: string;
  /**
   * The type of image (e.g., coverPoster, background, clearLogo).
   */
  type: string;
  /**
   * The URL of the image.
   */
  url: string;
};

export type GetMediaMetaDataUltraBlurColors = {
  /**
   * The top-left color value.
   */
  topLeft: string;
  /**
   * The top-right color value.
   */
  topRight: string;
  /**
   * The bottom-right color value.
   */
  bottomRight: string;
  /**
   * The bottom-left color value.
   */
  bottomLeft: string;
};

export type GetMediaMetaDataGenre = {
  /**
   * The unique genre identifier.
   */
  id: number;
  /**
   * The filter string for the genre.
   */
  filter: string;
  /**
   * The genre name.
   */
  tag: string;
};

export type GetMediaMetaDataCountry = {
  /**
   * The unique country identifier.
   */
  id: number;
  /**
   * The filter string for the country.
   */
  filter: string;
  /**
   * The country name.
   */
  tag: string;
};

export type Guids = {
  /**
   * The GUID value.
   */
  id: string;
};

export type Rating = {
  /**
   * The image or reference for the rating.
   */
  image: string;
  /**
   * The rating value.
   */
  value: number;
  /**
   * The type of rating (e.g., audience, critic).
   */
  type: string;
};

export type GetMediaMetaDataRole = {
  /**
   * The unique role identifier.
   */
  id: number;
  /**
   * The filter string for the role.
   */
  filter: string;
  /**
   * The actor's name.
   */
  tag: string;
  /**
   * A key associated with the actor tag.
   */
  tagKey: string;
  /**
   * The character name or role.
   */
  role?: string | undefined;
  /**
   * URL for the role thumbnail image.
   */
  thumb?: string | undefined;
};

export type GetMediaMetaDataDirector = {
  /**
   * The unique role identifier.
   */
  id: number;
  /**
   * The filter string for the role.
   */
  filter: string;
  /**
   * The actor's name.
   */
  tag: string;
  /**
   * A key associated with the actor tag.
   */
  tagKey: string;
  /**
   * The character name or role.
   */
  role?: string | undefined;
  /**
   * URL for the role thumbnail image.
   */
  thumb?: string | undefined;
};

export type GetMediaMetaDataWriter = {
  /**
   * The unique role identifier.
   */
  id: number;
  /**
   * The filter string for the role.
   */
  filter: string;
  /**
   * The actor's name.
   */
  tag: string;
  /**
   * A key associated with the actor tag.
   */
  tagKey: string;
  /**
   * The character name or role.
   */
  role?: string | undefined;
  /**
   * URL for the role thumbnail image.
   */
  thumb?: string | undefined;
};

export type Producer = {
  /**
   * The unique role identifier.
   */
  id: number;
  /**
   * The filter string for the role.
   */
  filter: string;
  /**
   * The actor's name.
   */
  tag: string;
  /**
   * A key associated with the actor tag.
   */
  tagKey: string;
  /**
   * The character name or role.
   */
  role?: string | undefined;
  /**
   * URL for the role thumbnail image.
   */
  thumb?: string | undefined;
};

export type Similar = {
  /**
   * The unique similar item identifier.
   */
  id: number;
  /**
   * The filter string for similar items.
   */
  filter: string;
  /**
   * The tag or title of the similar content.
   */
  tag: string;
};

export type GetMediaMetaDataLocation = {
  /**
   * The file path for the location.
   */
  path: string;
};

export type GetMediaMetaDataMetadata = {
  /**
   * The rating key of the metadata item.
   */
  ratingKey: string;
  /**
   * The rating key of the parent of this metadata item.
   */
  parentRatingKey?: string | undefined;
  /**
   * The rating key of the grandparent of this metadata item.
   */
  grandparentRatingKey?: string | undefined;
  /**
   * A GUID identifying the parent entity (e.g., season) for the item.
   */
  parentGuid?: string | undefined;
  /**
   * A GUID identifying the grandparent entity (e.g., show).
   */
  grandparentGuid?: string | undefined;
  /**
   * A URL-friendly identifier (slug) for the grandparent entity.
   */
  grandparentSlug?: string | undefined;
  /**
   * A key identifying the grandparent metadata in the library.
   */
  grandparentKey?: string | undefined;
  /**
   * A key identifying the parent metadata in the library.
   */
  parentKey?: string | undefined;
  /**
   * The API key to access metadata details.
   */
  key: string;
  /**
   * The globally unique identifier for the item.
   */
  guid: string;
  /**
   * A URL-friendly identifier for the item.
   */
  slug?: string | undefined;
  /**
   * The studio that produced the content.
   */
  studio?: string | undefined;
  /**
   * The type of content (e.g., show, movie).
   */
  type: string;
  /**
   * The title of the content.
   */
  title: string;
  /**
   * The original title of the content.
   */
  originalTitle?: string | undefined;
  /**
   * The title of the library section.
   */
  librarySectionTitle: string;
  /**
   * The ID of the library section.
   */
  librarySectionID: number;
  /**
   * The key of the library section.
   */
  librarySectionKey: string;
  /**
   * The content rating (e.g., TV-MA).
   */
  contentRating: string;
  /**
   * A summary of the content.
   */
  summary: string;
  /**
   * The index or order of the item.
   */
  index?: number | undefined;
  /**
   * The title of the grandparent entity (typically the show's title).
   */
  grandparentTitle?: string | undefined;
  /**
   * The title of the parent entity (typically the season's title).
   */
  parentTitle?: string | undefined;
  /**
   * The audience rating for the content.
   */
  audienceRating: number;
  /**
   * The number of times the item has been viewed.
   */
  viewCount?: number | undefined;
  /**
   * The number of times the item has been skipped.
   */
  skipCount?: number | undefined;
  /**
   * Unix timestamp of when the item was last viewed.
   */
  lastViewedAt?: number | undefined;
  /**
   * The release year.
   */
  year: number;
  /**
   * The tagline of the content.
   */
  tagline?: string | undefined;
  chapterSource?: string | undefined;
  primaryExtraKey?: string | undefined;
  /**
   * URL of the thumbnail image.
   */
  thumb: string;
  /**
   * URL of the art image.
   */
  art: string;
  /**
   * URL of the theme image.
   */
  theme?: string | undefined;
  /**
   * Duration of the content in milliseconds.
   */
  duration: number;
  /**
   * The original release date.
   */
  originallyAvailableAt: RFCDate;
  /**
   * The total number of episodes (or leaves).
   */
  leafCount?: number | undefined;
  /**
   * The number of episodes that have been viewed.
   */
  viewedLeafCount?: number | undefined;
  /**
   * The number of child items.
   */
  childCount?: number | undefined;
  /**
   * Unix timestamp when the item was added.
   */
  addedAt: number;
  /**
   * Unix timestamp when the item was last updated.
   */
  updatedAt: number;
  /**
   * The URL for the audience rating image.
   */
  audienceRatingImage: string;
  /**
   * The index number of the parent entity, which could indicate its order or position.
   */
  parentIndex?: number | undefined;
  /**
   * The URL of the parent's thumbnail image.
   */
  parentThumb?: string | undefined;
  /**
   * The URL of the grandparent's thumbnail image.
   */
  grandparentThumb?: string | undefined;
  /**
   * The URL of the grandparent's art image.
   */
  grandparentArt?: string | undefined;
  media?: Array<GetMediaMetaDataMedia> | undefined;
  /**
   * An array of image objects.
   */
  image: Array<GetMediaMetaDataImage>;
  ultraBlurColors: GetMediaMetaDataUltraBlurColors;
  /**
   * An array of genre tags.
   */
  genre?: Array<GetMediaMetaDataGenre> | undefined;
  /**
   * An array of country tags.
   */
  country?: Array<GetMediaMetaDataCountry> | undefined;
  /**
   * An array of GUID objects.
   */
  guids: Array<Guids>;
  /**
   * An array of rating objects.
   */
  rating: Array<Rating>;
  /**
   * An array of Actor roles.
   */
  role?: Array<GetMediaMetaDataRole> | undefined;
  /**
   * An array of Director roles.
   */
  director?: Array<GetMediaMetaDataDirector> | undefined;
  /**
   * An array of Writer roles.
   */
  writer?: Array<GetMediaMetaDataWriter> | undefined;
  /**
   * An array of Writer roles.
   */
  producer?: Array<Producer> | undefined;
  /**
   * An array of similar content objects.
   */
  similar?: Array<Similar> | undefined;
  /**
   * An array of location objects.
   */
  location?: Array<GetMediaMetaDataLocation> | undefined;
};

export type GetMediaMetaDataMediaContainer = {
  size: number;
  /**
   * Indicates whether syncing is allowed.
   */
  allowSync: boolean;
  /**
   * An plugin identifier for the media container.
   */
  identifier: string;
  /**
   * The unique identifier for the library section.
   */
  librarySectionID: number;
  /**
   * The title of the library section.
   */
  librarySectionTitle: string;
  /**
   * The universally unique identifier for the library section.
   */
  librarySectionUUID?: string | undefined;
  /**
   * The prefix used for media tag resource paths.
   */
  mediaTagPrefix: string;
  /**
   * The version number for media tags.
   */
  mediaTagVersion: number;
  /**
   * An array of metadata items.
   */
  metadata: Array<GetMediaMetaDataMetadata>;
};

/**
 * The metadata of the library item.
 */
export type GetMediaMetaDataResponseBody = {
  mediaContainer?: GetMediaMetaDataMediaContainer | undefined;
};

export type GetMediaMetaDataResponse = {
  /**
   * 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?: GetMediaMetaDataResponseBody | undefined;
};

/** @internal */
export const GetMediaMetaDataRequest$inboundSchema: z.ZodType<
  GetMediaMetaDataRequest,
  z.ZodTypeDef,
  unknown
> = z.object({
  ratingKey: z.number().int(),
  includeConcerts: z.boolean().optional(),
  includeExtras: z.boolean().optional(),
  includeOnDeck: z.boolean().optional(),
  includePopularLeaves: z.boolean().optional(),
  includePreferences: z.boolean().optional(),
  includeReviews: z.boolean().optional(),
  includeChapters: z.boolean().optional(),
  includeStations: z.boolean().optional(),
  includeExternalMedia: z.boolean().optional(),
  asyncAugmentMetadata: z.boolean().optional(),
  asyncCheckFiles: z.boolean().optional(),
  asyncRefreshAnalysis: z.boolean().optional(),
  asyncRefreshLocalMediaAgent: z.boolean().optional(),
});

/** @internal */
export type GetMediaMetaDataRequest$Outbound = {
  ratingKey: number;
  includeConcerts?: boolean | undefined;
  includeExtras?: boolean | undefined;
  includeOnDeck?: boolean | undefined;
  includePopularLeaves?: boolean | undefined;
  includePreferences?: boolean | undefined;
  includeReviews?: boolean | undefined;
  includeChapters?: boolean | undefined;
  includeStations?: boolean | undefined;
  includeExternalMedia?: boolean | undefined;
  asyncAugmentMetadata?: boolean | undefined;
  asyncCheckFiles?: boolean | undefined;
  asyncRefreshAnalysis?: boolean | undefined;
  asyncRefreshLocalMediaAgent?: boolean | undefined;
};

/** @internal */
export const GetMediaMetaDataRequest$outboundSchema: z.ZodType<
  GetMediaMetaDataRequest$Outbound,
  z.ZodTypeDef,
  GetMediaMetaDataRequest
> = z.object({
  ratingKey: z.number().int(),
  includeConcerts: z.boolean().optional(),
  includeExtras: z.boolean().optional(),
  includeOnDeck: z.boolean().optional(),
  includePopularLeaves: z.boolean().optional(),
  includePreferences: z.boolean().optional(),
  includeReviews: z.boolean().optional(),
  includeChapters: z.boolean().optional(),
  includeStations: z.boolean().optional(),
  includeExternalMedia: z.boolean().optional(),
  asyncAugmentMetadata: z.boolean().optional(),
  asyncCheckFiles: z.boolean().optional(),
  asyncRefreshAnalysis: z.boolean().optional(),
  asyncRefreshLocalMediaAgent: 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 GetMediaMetaDataRequest$ {
  /** @deprecated use `GetMediaMetaDataRequest$inboundSchema` instead. */
  export const inboundSchema = GetMediaMetaDataRequest$inboundSchema;
  /** @deprecated use `GetMediaMetaDataRequest$outboundSchema` instead. */
  export const outboundSchema = GetMediaMetaDataRequest$outboundSchema;
  /** @deprecated use `GetMediaMetaDataRequest$Outbound` instead. */
  export type Outbound = GetMediaMetaDataRequest$Outbound;
}

export function getMediaMetaDataRequestToJSON(
  getMediaMetaDataRequest: GetMediaMetaDataRequest,
): string {
  return JSON.stringify(
    GetMediaMetaDataRequest$outboundSchema.parse(getMediaMetaDataRequest),
  );
}

export function getMediaMetaDataRequestFromJSON(
  jsonString: string,
): SafeParseResult<GetMediaMetaDataRequest, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => GetMediaMetaDataRequest$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMediaMetaDataRequest' from JSON`,
  );
}

/** @internal */
export const GetMediaMetaDataStream$inboundSchema: z.ZodType<
  GetMediaMetaDataStream,
  z.ZodTypeDef,
  unknown
> = z.object({
  id: z.number().int(),
  streamType: z.number().int(),
  default: z.boolean().optional(),
  codec: z.string(),
  index: z.number().int(),
  bitrate: z.number().int(),
  language: z.string(),
  languageTag: z.string(),
  languageCode: z.string(),
  DOVIBLCompatID: z.number().int().optional(),
  DOVIBLPresent: z.boolean().optional(),
  DOVIELPresent: z.boolean().optional(),
  DOVILevel: z.number().int().optional(),
  DOVIPresent: z.boolean().optional(),
  DOVIProfile: z.number().int().optional(),
  DOVIRPUPresent: z.boolean().optional(),
  DOVIVersion: z.string().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().optional(),
  height: z.number().int().optional(),
  level: z.number().int().optional(),
  original: z.boolean().optional(),
  hasScalingMatrix: z.boolean().optional(),
  profile: z.string().optional(),
  scanType: z.string().optional(),
  refFrames: z.number().int().optional(),
  width: z.number().int().optional(),
  displayTitle: z.string(),
  extendedDisplayTitle: z.string(),
  selected: z.boolean().optional(),
  forced: z.boolean().optional(),
  channels: z.number().int().optional(),
  audioChannelLayout: z.string().optional(),
  samplingRate: z.number().int().optional(),
  canAutoSync: z.boolean().optional(),
  hearingImpaired: z.boolean().optional(),
  dub: z.boolean().optional(),
  title: z.string().optional(),
}).transform((v) => {
  return remap$(v, {
    "DOVIBLCompatID": "doviblCompatID",
    "DOVIBLPresent": "doviblPresent",
    "DOVIELPresent": "dovielPresent",
    "DOVILevel": "doviLevel",
    "DOVIPresent": "doviPresent",
    "DOVIProfile": "doviProfile",
    "DOVIRPUPresent": "dovirpuPresent",
    "DOVIVersion": "doviVersion",
  });
});

/** @internal */
export type GetMediaMetaDataStream$Outbound = {
  id: number;
  streamType: number;
  default?: boolean | undefined;
  codec: string;
  index: number;
  bitrate: number;
  language: string;
  languageTag: string;
  languageCode: string;
  DOVIBLCompatID?: number | undefined;
  DOVIBLPresent?: boolean | undefined;
  DOVIELPresent?: boolean | undefined;
  DOVILevel?: number | undefined;
  DOVIPresent?: boolean | undefined;
  DOVIProfile?: number | undefined;
  DOVIRPUPresent?: boolean | undefined;
  DOVIVersion?: string | 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;
  height?: number | undefined;
  level?: number | undefined;
  original?: boolean | undefined;
  hasScalingMatrix?: boolean | undefined;
  profile?: string | undefined;
  scanType?: string | undefined;
  refFrames?: number | undefined;
  width?: number | undefined;
  displayTitle: string;
  extendedDisplayTitle: string;
  selected?: boolean | undefined;
  forced?: boolean | undefined;
  channels?: number | undefined;
  audioChannelLayout?: string | undefined;
  samplingRate?: number | undefined;
  canAutoSync?: boolean | undefined;
  hearingImpaired?: boolean | undefined;
  dub?: boolean | undefined;
  title?: string | undefined;
};

/** @internal */
export const GetMediaMetaDataStream$outboundSchema: z.ZodType<
  GetMediaMetaDataStream$Outbound,
  z.ZodTypeDef,
  GetMediaMetaDataStream
> = z.object({
  id: z.number().int(),
  streamType: z.number().int(),
  default: z.boolean().optional(),
  codec: z.string(),
  index: z.number().int(),
  bitrate: z.number().int(),
  language: z.string(),
  languageTag: z.string(),
  languageCode: z.string(),
  doviblCompatID: z.number().int().optional(),
  doviblPresent: z.boolean().optional(),
  dovielPresent: z.boolean().optional(),
  doviLevel: z.number().int().optional(),
  doviPresent: z.boolean().optional(),
  doviProfile: z.number().int().optional(),
  dovirpuPresent: z.boolean().optional(),
  doviVersion: z.string().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().optional(),
  height: z.number().int().optional(),
  level: z.number().int().optional(),
  original: z.boolean().optional(),
  hasScalingMatrix: z.boolean().optional(),
  profile: z.string().optional(),
  scanType: z.string().optional(),
  refFrames: z.number().int().optional(),
  width: z.number().int().optional(),
  displayTitle: z.string(),
  extendedDisplayTitle: z.string(),
  selected: z.boolean().optional(),
  forced: z.boolean().optional(),
  channels: z.number().int().optional(),
  audioChannelLayout: z.string().optional(),
  samplingRate: z.number().int().optional(),
  canAutoSync: z.boolean().optional(),
  hearingImpaired: z.boolean().optional(),
  dub: z.boolean().optional(),
  title: z.string().optional(),
}).transform((v) => {
  return remap$(v, {
    doviblCompatID: "DOVIBLCompatID",
    doviblPresent: "DOVIBLPresent",
    dovielPresent: "DOVIELPresent",
    doviLevel: "DOVILevel",
    doviPresent: "DOVIPresent",
    doviProfile: "DOVIProfile",
    dovirpuPresent: "DOVIRPUPresent",
    doviVersion: "DOVIVersion",
  });
});

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace GetMediaMetaDataStream$ {
  /** @deprecated use `GetMediaMetaDataStream$inboundSchema` instead. */
  export const inboundSchema = GetMediaMetaDataStream$inboundSchema;
  /** @deprecated use `GetMediaMetaDataStream$outboundSchema` instead. */
  export const outboundSchema = GetMediaMetaDataStream$outboundSchema;
  /** @deprecated use `GetMediaMetaDataStream$Outbound` instead. */
  export type Outbound = GetMediaMetaDataStream$Outbound;
}

export function getMediaMetaDataStreamToJSON(
  getMediaMetaDataStream: GetMediaMetaDataStream,
): string {
  return JSON.stringify(
    GetMediaMetaDataStream$outboundSchema.parse(getMediaMetaDataStream),
  );
}

export function getMediaMetaDataStreamFromJSON(
  jsonString: string,
): SafeParseResult<GetMediaMetaDataStream, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => GetMediaMetaDataStream$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMediaMetaDataStream' from JSON`,
  );
}

/** @internal */
export const GetMediaMetaDataPart$inboundSchema: z.ZodType<
  GetMediaMetaDataPart,
  z.ZodTypeDef,
  unknown
> = z.object({
  accessible: z.boolean().optional(),
  exists: z.boolean().optional(),
  id: z.number().int(),
  key: z.string(),
  indexes: z.string().optional(),
  duration: z.number().int(),
  file: z.string(),
  size: z.number().int(),
  container: z.string(),
  videoProfile: z.string(),
  Stream: z.array(z.lazy(() => GetMediaMetaDataStream$inboundSchema)),
}).transform((v) => {
  return remap$(v, {
    "Stream": "stream",
  });
});

/** @internal */
export type GetMediaMetaDataPart$Outbound = {
  accessible?: boolean | undefined;
  exists?: boolean | undefined;
  id: number;
  key: string;
  indexes?: string | undefined;
  duration: number;
  file: string;
  size: number;
  container: string;
  videoProfile: string;
  Stream: Array<GetMediaMetaDataStream$Outbound>;
};

/** @internal */
export const GetMediaMetaDataPart$outboundSchema: z.ZodType<
  GetMediaMetaDataPart$Outbound,
  z.ZodTypeDef,
  GetMediaMetaDataPart
> = z.object({
  accessible: z.boolean().optional(),
  exists: z.boolean().optional(),
  id: z.number().int(),
  key: z.string(),
  indexes: z.string().optional(),
  duration: z.number().int(),
  file: z.string(),
  size: z.number().int(),
  container: z.string(),
  videoProfile: z.string(),
  stream: z.array(z.lazy(() => GetMediaMetaDataStream$outboundSchema)),
}).transform((v) => {
  return remap$(v, {
    stream: "Stream",
  });
});

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace GetMediaMetaDataPart$ {
  /** @deprecated use `GetMediaMetaDataPart$inboundSchema` instead. */
  export const inboundSchema = GetMediaMetaDataPart$inboundSchema;
  /** @deprecated use `GetMediaMetaDataPart$outboundSchema` instead. */
  export const outboundSchema = GetMediaMetaDataPart$outboundSchema;
  /** @deprecated use `GetMediaMetaDataPart$Outbound` instead. */
  export type Outbound = GetMediaMetaDataPart$Outbound;
}

export function getMediaMetaDataPartToJSON(
  getMediaMetaDataPart: GetMediaMetaDataPart,
): string {
  return JSON.stringify(
    GetMediaMetaDataPart$outboundSchema.parse(getMediaMetaDataPart),
  );
}

export function getMediaMetaDataPartFromJSON(
  jsonString: string,
): SafeParseResult<GetMediaMetaDataPart, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => GetMediaMetaDataPart$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMediaMetaDataPart' from JSON`,
  );
}

/** @internal */
export const GetMediaMetaDataMedia$inboundSchema: z.ZodType<
  GetMediaMetaDataMedia,
  z.ZodTypeDef,
  unknown
> = z.object({
  id: z.number().int(),
  duration: z.number().int(),
  bitrate: z.number().int(),
  width: z.number().int(),
  height: z.number().int(),
  aspectRatio: z.number(),
  audioChannels: z.number().int(),
  audioCodec: z.string(),
  videoCodec: z.string(),
  videoResolution: z.string(),
  container: z.string(),
  videoFrameRate: z.string(),
  videoProfile: z.string(),
  hasVoiceActivity: z.boolean(),
  Part: z.array(z.lazy(() => GetMediaMetaDataPart$inboundSchema)),
}).transform((v) => {
  return remap$(v, {
    "Part": "part",
  });
});

/** @internal */
export type GetMediaMetaDataMedia$Outbound = {
  id: number;
  duration: number;
  bitrate: number;
  width: number;
  height: number;
  aspectRatio: number;
  audioChannels: number;
  audioCodec: string;
  videoCodec: string;
  videoResolution: string;
  container: string;
  videoFrameRate: string;
  videoProfile: string;
  hasVoiceActivity: boolean;
  Part: Array<GetMediaMetaDataPart$Outbound>;
};

/** @internal */
export const GetMediaMetaDataMedia$outboundSchema: z.ZodType<
  GetMediaMetaDataMedia$Outbound,
  z.ZodTypeDef,
  GetMediaMetaDataMedia
> = z.object({
  id: z.number().int(),
  duration: z.number().int(),
  bitrate: z.number().int(),
  width: z.number().int(),
  height: z.number().int(),
  aspectRatio: z.number(),
  audioChannels: z.number().int(),
  audioCodec: z.string(),
  videoCodec: z.string(),
  videoResolution: z.string(),
  container: z.string(),
  videoFrameRate: z.string(),
  videoProfile: z.string(),
  hasVoiceActivity: z.boolean(),
  part: z.array(z.lazy(() => GetMediaMetaDataPart$outboundSchema)),
}).transform((v) => {
  return remap$(v, {
    part: "Part",
  });
});

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace GetMediaMetaDataMedia$ {
  /** @deprecated use `GetMediaMetaDataMedia$inboundSchema` instead. */
  export const inboundSchema = GetMediaMetaDataMedia$inboundSchema;
  /** @deprecated use `GetMediaMetaDataMedia$outboundSchema` instead. */
  export const outboundSchema = GetMediaMetaDataMedia$outboundSchema;
  /** @deprecated use `GetMediaMetaDataMedia$Outbound` instead. */
  export type Outbound = GetMediaMetaDataMedia$Outbound;
}

export function getMediaMetaDataMediaToJSON(
  getMediaMetaDataMedia: GetMediaMetaDataMedia,
): string {
  return JSON.stringify(
    GetMediaMetaDataMedia$outboundSchema.parse(getMediaMetaDataMedia),
  );
}

export function getMediaMetaDataMediaFromJSON(
  jsonString: string,
): SafeParseResult<GetMediaMetaDataMedia, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => GetMediaMetaDataMedia$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMediaMetaDataMedia' from JSON`,
  );
}

/** @internal */
export const GetMediaMetaDataImage$inboundSchema: z.ZodType<
  GetMediaMetaDataImage,
  z.ZodTypeDef,
  unknown
> = z.object({
  alt: z.string(),
  type: z.string(),
  url: z.string(),
});

/** @internal */
export type GetMediaMetaDataImage$Outbound = {
  alt: string;
  type: string;
  url: string;
};

/** @internal */
export const GetMediaMetaDataImage$outboundSchema: z.ZodType<
  GetMediaMetaDataImage$Outbound,
  z.ZodTypeDef,
  GetMediaMetaDataImage
> = z.object({
  alt: z.string(),
  type: z.string(),
  url: z.string(),
});

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace GetMediaMetaDataImage$ {
  /** @deprecated use `GetMediaMetaDataImage$inboundSchema` instead. */
  export const inboundSchema = GetMediaMetaDataImage$inboundSchema;
  /** @deprecated use `GetMediaMetaDataImage$outboundSchema` instead. */
  export const outboundSchema = GetMediaMetaDataImage$outboundSchema;
  /** @deprecated use `GetMediaMetaDataImage$Outbound` instead. */
  export type Outbound = GetMediaMetaDataImage$Outbound;
}

export function getMediaMetaDataImageToJSON(
  getMediaMetaDataImage: GetMediaMetaDataImage,
): string {
  return JSON.stringify(
    GetMediaMetaDataImage$outboundSchema.parse(getMediaMetaDataImage),
  );
}

export function getMediaMetaDataImageFromJSON(
  jsonString: string,
): SafeParseResult<GetMediaMetaDataImage, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => GetMediaMetaDataImage$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMediaMetaDataImage' from JSON`,
  );
}

/** @internal */
export const GetMediaMetaDataUltraBlurColors$inboundSchema: z.ZodType<
  GetMediaMetaDataUltraBlurColors,
  z.ZodTypeDef,
  unknown
> = z.object({
  topLeft: z.string(),
  topRight: z.string(),
  bottomRight: z.string(),
  bottomLeft: z.string(),
});

/** @internal */
export type GetMediaMetaDataUltraBlurColors$Outbound = {
  topLeft: string;
  topRight: string;
  bottomRight: string;
  bottomLeft: string;
};

/** @internal */
export const GetMediaMetaDataUltraBlurColors$outboundSchema: z.ZodType<
  GetMediaMetaDataUltraBlurColors$Outbound,
  z.ZodTypeDef,
  GetMediaMetaDataUltraBlurColors
> = z.object({
  topLeft: z.string(),
  topRight: z.string(),
  bottomRight: z.string(),
  bottomLeft: z.string(),
});

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace GetMediaMetaDataUltraBlurColors$ {
  /** @deprecated use `GetMediaMetaDataUltraBlurColors$inboundSchema` instead. */
  export const inboundSchema = GetMediaMetaDataUltraBlurColors$inboundSchema;
  /** @deprecated use `GetMediaMetaDataUltraBlurColors$outboundSchema` instead. */
  export const outboundSchema = GetMediaMetaDataUltraBlurColors$outboundSchema;
  /** @deprecated use `GetMediaMetaDataUltraBlurColors$Outbound` instead. */
  export type Outbound = GetMediaMetaDataUltraBlurColors$Outbound;
}

export function getMediaMetaDataUltraBlurColorsToJSON(
  getMediaMetaDataUltraBlurColors: GetMediaMetaDataUltraBlurColors,
): string {
  return JSON.stringify(
    GetMediaMetaDataUltraBlurColors$outboundSchema.parse(
      getMediaMetaDataUltraBlurColors,
    ),
  );
}

export function getMediaMetaDataUltraBlurColorsFromJSON(
  jsonString: string,
): SafeParseResult<GetMediaMetaDataUltraBlurColors, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => GetMediaMetaDataUltraBlurColors$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMediaMetaDataUltraBlurColors' from JSON`,
  );
}

/** @internal */
export const GetMediaMetaDataGenre$inboundSchema: z.ZodType<
  GetMediaMetaDataGenre,
  z.ZodTypeDef,
  unknown
> = z.object({
  id: z.number().int(),
  filter: z.string(),
  tag: z.string(),
});

/** @internal */
export type GetMediaMetaDataGenre$Outbound = {
  id: number;
  filter: string;
  tag: string;
};

/** @internal */
export const GetMediaMetaDataGenre$outboundSchema: z.ZodType<
  GetMediaMetaDataGenre$Outbound,
  z.ZodTypeDef,
  GetMediaMetaDataGenre
> = z.object({
  id: z.number().int(),
  filter: z.string(),
  tag: z.string(),
});

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace GetMediaMetaDataGenre$ {
  /** @deprecated use `GetMediaMetaDataGenre$inboundSchema` instead. */
  export const inboundSchema = GetMediaMetaDataGenre$inboundSchema;
  /** @deprecated use `GetMediaMetaDataGenre$outboundSchema` instead. */
  export const outboundSchema = GetMediaMetaDataGenre$outboundSchema;
  /** @deprecated use `GetMediaMetaDataGenre$Outbound` instead. */
  export type Outbound = GetMediaMetaDataGenre$Outbound;
}

export function getMediaMetaDataGenreToJSON(
  getMediaMetaDataGenre: GetMediaMetaDataGenre,
): string {
  return JSON.stringify(
    GetMediaMetaDataGenre$outboundSchema.parse(getMediaMetaDataGenre),
  );
}

export function getMediaMetaDataGenreFromJSON(
  jsonString: string,
): SafeParseResult<GetMediaMetaDataGenre, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => GetMediaMetaDataGenre$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMediaMetaDataGenre' from JSON`,
  );
}

/** @internal */
export const GetMediaMetaDataCountry$inboundSchema: z.ZodType<
  GetMediaMetaDataCountry,
  z.ZodTypeDef,
  unknown
> = z.object({
  id: z.number().int(),
  filter: z.string(),
  tag: z.string(),
});

/** @internal */
export type GetMediaMetaDataCountry$Outbound = {
  id: number;
  filter: string;
  tag: string;
};

/** @internal */
export const GetMediaMetaDataCountry$outboundSchema: z.ZodType<
  GetMediaMetaDataCountry$Outbound,
  z.ZodTypeDef,
  GetMediaMetaDataCountry
> = z.object({
  id: z.number().int(),
  filter: z.string(),
  tag: z.string(),
});

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace GetMediaMetaDataCountry$ {
  /** @deprecated use `GetMediaMetaDataCountry$inboundSchema` instead. */
  export const inboundSchema = GetMediaMetaDataCountry$inboundSchema;
  /** @deprecated use `GetMediaMetaDataCountry$outboundSchema` instead. */
  export const outboundSchema = GetMediaMetaDataCountry$outboundSchema;
  /** @deprecated use `GetMediaMetaDataCountry$Outbound` instead. */
  export type Outbound = GetMediaMetaDataCountry$Outbound;
}

export function getMediaMetaDataCountryToJSON(
  getMediaMetaDataCountry: GetMediaMetaDataCountry,
): string {
  return JSON.stringify(
    GetMediaMetaDataCountry$outboundSchema.parse(getMediaMetaDataCountry),
  );
}

export function getMediaMetaDataCountryFromJSON(
  jsonString: string,
): SafeParseResult<GetMediaMetaDataCountry, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => GetMediaMetaDataCountry$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMediaMetaDataCountry' from JSON`,
  );
}

/** @internal */
export const Guids$inboundSchema: z.ZodType<Guids, z.ZodTypeDef, unknown> = z
  .object({
    id: z.string(),
  });

/** @internal */
export type Guids$Outbound = {
  id: string;
};

/** @internal */
export const Guids$outboundSchema: z.ZodType<
  Guids$Outbound,
  z.ZodTypeDef,
  Guids
> = z.object({
  id: z.string(),
});

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace Guids$ {
  /** @deprecated use `Guids$inboundSchema` instead. */
  export const inboundSchema = Guids$inboundSchema;
  /** @deprecated use `Guids$outboundSchema` instead. */
  export const outboundSchema = Guids$outboundSchema;
  /** @deprecated use `Guids$Outbound` instead. */
  export type Outbound = Guids$Outbound;
}

export function guidsToJSON(guids: Guids): string {
  return JSON.stringify(Guids$outboundSchema.parse(guids));
}

export function guidsFromJSON(
  jsonString: string,
): SafeParseResult<Guids, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => Guids$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'Guids' from JSON`,
  );
}

/** @internal */
export const Rating$inboundSchema: z.ZodType<Rating, z.ZodTypeDef, unknown> = z
  .object({
    image: z.string(),
    value: z.number(),
    type: z.string(),
  });

/** @internal */
export type Rating$Outbound = {
  image: string;
  value: number;
  type: string;
};

/** @internal */
export const Rating$outboundSchema: z.ZodType<
  Rating$Outbound,
  z.ZodTypeDef,
  Rating
> = z.object({
  image: z.string(),
  value: z.number(),
  type: z.string(),
});

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace Rating$ {
  /** @deprecated use `Rating$inboundSchema` instead. */
  export const inboundSchema = Rating$inboundSchema;
  /** @deprecated use `Rating$outboundSchema` instead. */
  export const outboundSchema = Rating$outboundSchema;
  /** @deprecated use `Rating$Outbound` instead. */
  export type Outbound = Rating$Outbound;
}

export function ratingToJSON(rating: Rating): string {
  return JSON.stringify(Rating$outboundSchema.parse(rating));
}

export function ratingFromJSON(
  jsonString: string,
): SafeParseResult<Rating, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => Rating$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'Rating' from JSON`,
  );
}

/** @internal */
export const GetMediaMetaDataRole$inboundSchema: z.ZodType<
  GetMediaMetaDataRole,
  z.ZodTypeDef,
  unknown
> = z.object({
  id: z.number().int(),
  filter: z.string(),
  tag: z.string(),
  tagKey: z.string(),
  role: z.string().optional(),
  thumb: z.string().optional(),
});

/** @internal */
export type GetMediaMetaDataRole$Outbound = {
  id: number;
  filter: string;
  tag: string;
  tagKey: string;
  role?: string | undefined;
  thumb?: string | undefined;
};

/** @internal */
export const GetMediaMetaDataRole$outboundSchema: z.ZodType<
  GetMediaMetaDataRole$Outbound,
  z.ZodTypeDef,
  GetMediaMetaDataRole
> = z.object({
  id: z.number().int(),
  filter: z.string(),
  tag: z.string(),
  tagKey: z.string(),
  role: z.string().optional(),
  thumb: 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 GetMediaMetaDataRole$ {
  /** @deprecated use `GetMediaMetaDataRole$inboundSchema` instead. */
  export const inboundSchema = GetMediaMetaDataRole$inboundSchema;
  /** @deprecated use `GetMediaMetaDataRole$outboundSchema` instead. */
  export const outboundSchema = GetMediaMetaDataRole$outboundSchema;
  /** @deprecated use `GetMediaMetaDataRole$Outbound` instead. */
  export type Outbound = GetMediaMetaDataRole$Outbound;
}

export function getMediaMetaDataRoleToJSON(
  getMediaMetaDataRole: GetMediaMetaDataRole,
): string {
  return JSON.stringify(
    GetMediaMetaDataRole$outboundSchema.parse(getMediaMetaDataRole),
  );
}

export function getMediaMetaDataRoleFromJSON(
  jsonString: string,
): SafeParseResult<GetMediaMetaDataRole, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => GetMediaMetaDataRole$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMediaMetaDataRole' from JSON`,
  );
}

/** @internal */
export const GetMediaMetaDataDirector$inboundSchema: z.ZodType<
  GetMediaMetaDataDirector,
  z.ZodTypeDef,
  unknown
> = z.object({
  id: z.number().int(),
  filter: z.string(),
  tag: z.string(),
  tagKey: z.string(),
  role: z.string().optional(),
  thumb: z.string().optional(),
});

/** @internal */
export type GetMediaMetaDataDirector$Outbound = {
  id: number;
  filter: string;
  tag: string;
  tagKey: string;
  role?: string | undefined;
  thumb?: string | undefined;
};

/** @internal */
export const GetMediaMetaDataDirector$outboundSchema: z.ZodType<
  GetMediaMetaDataDirector$Outbound,
  z.ZodTypeDef,
  GetMediaMetaDataDirector
> = z.object({
  id: z.number().int(),
  filter: z.string(),
  tag: z.string(),
  tagKey: z.string(),
  role: z.string().optional(),
  thumb: 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 GetMediaMetaDataDirector$ {
  /** @deprecated use `GetMediaMetaDataDirector$inboundSchema` instead. */
  export const inboundSchema = GetMediaMetaDataDirector$inboundSchema;
  /** @deprecated use `GetMediaMetaDataDirector$outboundSchema` instead. */
  export const outboundSchema = GetMediaMetaDataDirector$outboundSchema;
  /** @deprecated use `GetMediaMetaDataDirector$Outbound` instead. */
  export type Outbound = GetMediaMetaDataDirector$Outbound;
}

export function getMediaMetaDataDirectorToJSON(
  getMediaMetaDataDirector: GetMediaMetaDataDirector,
): string {
  return JSON.stringify(
    GetMediaMetaDataDirector$outboundSchema.parse(getMediaMetaDataDirector),
  );
}

export function getMediaMetaDataDirectorFromJSON(
  jsonString: string,
): SafeParseResult<GetMediaMetaDataDirector, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => GetMediaMetaDataDirector$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMediaMetaDataDirector' from JSON`,
  );
}

/** @internal */
export const GetMediaMetaDataWriter$inboundSchema: z.ZodType<
  GetMediaMetaDataWriter,
  z.ZodTypeDef,
  unknown
> = z.object({
  id: z.number().int(),
  filter: z.string(),
  tag: z.string(),
  tagKey: z.string(),
  role: z.string().optional(),
  thumb: z.string().optional(),
});

/** @internal */
export type GetMediaMetaDataWriter$Outbound = {
  id: number;
  filter: string;
  tag: string;
  tagKey: string;
  role?: string | undefined;
  thumb?: string | undefined;
};

/** @internal */
export const GetMediaMetaDataWriter$outboundSchema: z.ZodType<
  GetMediaMetaDataWriter$Outbound,
  z.ZodTypeDef,
  GetMediaMetaDataWriter
> = z.object({
  id: z.number().int(),
  filter: z.string(),
  tag: z.string(),
  tagKey: z.string(),
  role: z.string().optional(),
  thumb: 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 GetMediaMetaDataWriter$ {
  /** @deprecated use `GetMediaMetaDataWriter$inboundSchema` instead. */
  export const inboundSchema = GetMediaMetaDataWriter$inboundSchema;
  /** @deprecated use `GetMediaMetaDataWriter$outboundSchema` instead. */
  export const outboundSchema = GetMediaMetaDataWriter$outboundSchema;
  /** @deprecated use `GetMediaMetaDataWriter$Outbound` instead. */
  export type Outbound = GetMediaMetaDataWriter$Outbound;
}

export function getMediaMetaDataWriterToJSON(
  getMediaMetaDataWriter: GetMediaMetaDataWriter,
): string {
  return JSON.stringify(
    GetMediaMetaDataWriter$outboundSchema.parse(getMediaMetaDataWriter),
  );
}

export function getMediaMetaDataWriterFromJSON(
  jsonString: string,
): SafeParseResult<GetMediaMetaDataWriter, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => GetMediaMetaDataWriter$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMediaMetaDataWriter' from JSON`,
  );
}

/** @internal */
export const Producer$inboundSchema: z.ZodType<
  Producer,
  z.ZodTypeDef,
  unknown
> = z.object({
  id: z.number().int(),
  filter: z.string(),
  tag: z.string(),
  tagKey: z.string(),
  role: z.string().optional(),
  thumb: z.string().optional(),
});

/** @internal */
export type Producer$Outbound = {
  id: number;
  filter: string;
  tag: string;
  tagKey: string;
  role?: string | undefined;
  thumb?: string | undefined;
};

/** @internal */
export const Producer$outboundSchema: z.ZodType<
  Producer$Outbound,
  z.ZodTypeDef,
  Producer
> = z.object({
  id: z.number().int(),
  filter: z.string(),
  tag: z.string(),
  tagKey: z.string(),
  role: z.string().optional(),
  thumb: 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 Producer$ {
  /** @deprecated use `Producer$inboundSchema` instead. */
  export const inboundSchema = Producer$inboundSchema;
  /** @deprecated use `Producer$outboundSchema` instead. */
  export const outboundSchema = Producer$outboundSchema;
  /** @deprecated use `Producer$Outbound` instead. */
  export type Outbound = Producer$Outbound;
}

export function producerToJSON(producer: Producer): string {
  return JSON.stringify(Producer$outboundSchema.parse(producer));
}

export function producerFromJSON(
  jsonString: string,
): SafeParseResult<Producer, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => Producer$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'Producer' from JSON`,
  );
}

/** @internal */
export const Similar$inboundSchema: z.ZodType<Similar, z.ZodTypeDef, unknown> =
  z.object({
    id: z.number().int(),
    filter: z.string(),
    tag: z.string(),
  });

/** @internal */
export type Similar$Outbound = {
  id: number;
  filter: string;
  tag: string;
};

/** @internal */
export const Similar$outboundSchema: z.ZodType<
  Similar$Outbound,
  z.ZodTypeDef,
  Similar
> = z.object({
  id: z.number().int(),
  filter: z.string(),
  tag: z.string(),
});

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace Similar$ {
  /** @deprecated use `Similar$inboundSchema` instead. */
  export const inboundSchema = Similar$inboundSchema;
  /** @deprecated use `Similar$outboundSchema` instead. */
  export const outboundSchema = Similar$outboundSchema;
  /** @deprecated use `Similar$Outbound` instead. */
  export type Outbound = Similar$Outbound;
}

export function similarToJSON(similar: Similar): string {
  return JSON.stringify(Similar$outboundSchema.parse(similar));
}

export function similarFromJSON(
  jsonString: string,
): SafeParseResult<Similar, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => Similar$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'Similar' from JSON`,
  );
}

/** @internal */
export const GetMediaMetaDataLocation$inboundSchema: z.ZodType<
  GetMediaMetaDataLocation,
  z.ZodTypeDef,
  unknown
> = z.object({
  path: z.string(),
});

/** @internal */
export type GetMediaMetaDataLocation$Outbound = {
  path: string;
};

/** @internal */
export const GetMediaMetaDataLocation$outboundSchema: z.ZodType<
  GetMediaMetaDataLocation$Outbound,
  z.ZodTypeDef,
  GetMediaMetaDataLocation
> = z.object({
  path: z.string(),
});

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace GetMediaMetaDataLocation$ {
  /** @deprecated use `GetMediaMetaDataLocation$inboundSchema` instead. */
  export const inboundSchema = GetMediaMetaDataLocation$inboundSchema;
  /** @deprecated use `GetMediaMetaDataLocation$outboundSchema` instead. */
  export const outboundSchema = GetMediaMetaDataLocation$outboundSchema;
  /** @deprecated use `GetMediaMetaDataLocation$Outbound` instead. */
  export type Outbound = GetMediaMetaDataLocation$Outbound;
}

export function getMediaMetaDataLocationToJSON(
  getMediaMetaDataLocation: GetMediaMetaDataLocation,
): string {
  return JSON.stringify(
    GetMediaMetaDataLocation$outboundSchema.parse(getMediaMetaDataLocation),
  );
}

export function getMediaMetaDataLocationFromJSON(
  jsonString: string,
): SafeParseResult<GetMediaMetaDataLocation, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => GetMediaMetaDataLocation$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMediaMetaDataLocation' from JSON`,
  );
}

/** @internal */
export const GetMediaMetaDataMetadata$inboundSchema: z.ZodType<
  GetMediaMetaDataMetadata,
  z.ZodTypeDef,
  unknown
> = z.object({
  ratingKey: z.string(),
  parentRatingKey: z.string().optional(),
  grandparentRatingKey: z.string().optional(),
  parentGuid: z.string().optional(),
  grandparentGuid: z.string().optional(),
  grandparentSlug: z.string().optional(),
  grandparentKey: z.string().optional(),
  parentKey: z.string().optional(),
  key: z.string(),
  guid: z.string(),
  slug: z.string().optional(),
  studio: z.string().optional(),
  type: z.string(),
  title: z.string(),
  originalTitle: z.string().optional(),
  librarySectionTitle: z.string(),
  librarySectionID: z.number().int(),
  librarySectionKey: z.string(),
  contentRating: z.string(),
  summary: z.string(),
  index: z.number().int().optional(),
  grandparentTitle: z.string().optional(),
  parentTitle: z.string().optional(),
  audienceRating: z.number(),
  viewCount: z.number().int().optional(),
  skipCount: z.number().int().optional(),
  lastViewedAt: z.number().int().optional(),
  year: z.number().int(),
  tagline: z.string().optional(),
  chapterSource: z.string().optional(),
  primaryExtraKey: z.string().optional(),
  thumb: z.string(),
  art: z.string(),
  theme: z.string().optional(),
  duration: z.number().int(),
  originallyAvailableAt: z.string().transform(v => new RFCDate(v)),
  leafCount: z.number().int().optional(),
  viewedLeafCount: z.number().int().optional(),
  childCount: z.number().int().optional(),
  addedAt: z.number().int(),
  updatedAt: z.number().int(),
  audienceRatingImage: z.string(),
  parentIndex: z.number().int().optional(),
  parentThumb: z.string().optional(),
  grandparentThumb: z.string().optional(),
  grandparentArt: z.string().optional(),
  Media: z.array(z.lazy(() => GetMediaMetaDataMedia$inboundSchema)).optional(),
  Image: z.array(z.lazy(() => GetMediaMetaDataImage$inboundSchema)),
  UltraBlurColors: z.lazy(() => GetMediaMetaDataUltraBlurColors$inboundSchema),
  Genre: z.array(z.lazy(() => GetMediaMetaDataGenre$inboundSchema)).optional(),
  Country: z.array(z.lazy(() => GetMediaMetaDataCountry$inboundSchema))
    .optional(),
  Guid: z.array(z.lazy(() => Guids$inboundSchema)),
  Rating: z.array(z.lazy(() => Rating$inboundSchema)),
  Role: z.array(z.lazy(() => GetMediaMetaDataRole$inboundSchema)).optional(),
  Director: z.array(z.lazy(() => GetMediaMetaDataDirector$inboundSchema))
    .optional(),
  Writer: z.array(z.lazy(() => GetMediaMetaDataWriter$inboundSchema))
    .optional(),
  Producer: z.array(z.lazy(() => Producer$inboundSchema)).optional(),
  Similar: z.array(z.lazy(() => Similar$inboundSchema)).optional(),
  Location: z.array(z.lazy(() => GetMediaMetaDataLocation$inboundSchema))
    .optional(),
}).transform((v) => {
  return remap$(v, {
    "Media": "media",
    "Image": "image",
    "UltraBlurColors": "ultraBlurColors",
    "Genre": "genre",
    "Country": "country",
    "Guid": "guids",
    "Rating": "rating",
    "Role": "role",
    "Director": "director",
    "Writer": "writer",
    "Producer": "producer",
    "Similar": "similar",
    "Location": "location",
  });
});

/** @internal */
export type GetMediaMetaDataMetadata$Outbound = {
  ratingKey: string;
  parentRatingKey?: string | undefined;
  grandparentRatingKey?: string | undefined;
  parentGuid?: string | undefined;
  grandparentGuid?: string | undefined;
  grandparentSlug?: string | undefined;
  grandparentKey?: string | undefined;
  parentKey?: string | undefined;
  key: string;
  guid: string;
  slug?: string | undefined;
  studio?: string | undefined;
  type: string;
  title: string;
  originalTitle?: string | undefined;
  librarySectionTitle: string;
  librarySectionID: number;
  librarySectionKey: string;
  contentRating: string;
  summary: string;
  index?: number | undefined;
  grandparentTitle?: string | undefined;
  parentTitle?: string | undefined;
  audienceRating: number;
  viewCount?: number | undefined;
  skipCount?: number | undefined;
  lastViewedAt?: number | undefined;
  year: number;
  tagline?: string | undefined;
  chapterSource?: string | undefined;
  primaryExtraKey?: string | undefined;
  thumb: string;
  art: string;
  theme?: string | undefined;
  duration: number;
  originallyAvailableAt: string;
  leafCount?: number | undefined;
  viewedLeafCount?: number | undefined;
  childCount?: number | undefined;
  addedAt: number;
  updatedAt: number;
  audienceRatingImage: string;
  parentIndex?: number | undefined;
  parentThumb?: string | undefined;
  grandparentThumb?: string | undefined;
  grandparentArt?: string | undefined;
  Media?: Array<GetMediaMetaDataMedia$Outbound> | undefined;
  Image: Array<GetMediaMetaDataImage$Outbound>;
  UltraBlurColors: GetMediaMetaDataUltraBlurColors$Outbound;
  Genre?: Array<GetMediaMetaDataGenre$Outbound> | undefined;
  Country?: Array<GetMediaMetaDataCountry$Outbound> | undefined;
  Guid: Array<Guids$Outbound>;
  Rating: Array<Rating$Outbound>;
  Role?: Array<GetMediaMetaDataRole$Outbound> | undefined;
  Director?: Array<GetMediaMetaDataDirector$Outbound> | undefined;
  Writer?: Array<GetMediaMetaDataWriter$Outbound> | undefined;
  Producer?: Array<Producer$Outbound> | undefined;
  Similar?: Array<Similar$Outbound> | undefined;
  Location?: Array<GetMediaMetaDataLocation$Outbound> | undefined;
};

/** @internal */
export const GetMediaMetaDataMetadata$outboundSchema: z.ZodType<
  GetMediaMetaDataMetadata$Outbound,
  z.ZodTypeDef,
  GetMediaMetaDataMetadata
> = z.object({
  ratingKey: z.string(),
  parentRatingKey: z.string().optional(),
  grandparentRatingKey: z.string().optional(),
  parentGuid: z.string().optional(),
  grandparentGuid: z.string().optional(),
  grandparentSlug: z.string().optional(),
  grandparentKey: z.string().optional(),
  parentKey: z.string().optional(),
  key: z.string(),
  guid: z.string(),
  slug: z.string().optional(),
  studio: z.string().optional(),
  type: z.string(),
  title: z.string(),
  originalTitle: z.string().optional(),
  librarySectionTitle: z.string(),
  librarySectionID: z.number().int(),
  librarySectionKey: z.string(),
  contentRating: z.string(),
  summary: z.string(),
  index: z.number().int().optional(),
  grandparentTitle: z.string().optional(),
  parentTitle: z.string().optional(),
  audienceRating: z.number(),
  viewCount: z.number().int().optional(),
  skipCount: z.number().int().optional(),
  lastViewedAt: z.number().int().optional(),
  year: z.number().int(),
  tagline: z.string().optional(),
  chapterSource: z.string().optional(),
  primaryExtraKey: z.string().optional(),
  thumb: z.string(),
  art: z.string(),
  theme: z.string().optional(),
  duration: z.number().int(),
  originallyAvailableAt: z.instanceof(RFCDate).transform(v => v.toString()),
  leafCount: z.number().int().optional(),
  viewedLeafCount: z.number().int().optional(),
  childCount: z.number().int().optional(),
  addedAt: z.number().int(),
  updatedAt: z.number().int(),
  audienceRatingImage: z.string(),
  parentIndex: z.number().int().optional(),
  parentThumb: z.string().optional(),
  grandparentThumb: z.string().optional(),
  grandparentArt: z.string().optional(),
  media: z.array(z.lazy(() => GetMediaMetaDataMedia$outboundSchema)).optional(),
  image: z.array(z.lazy(() => GetMediaMetaDataImage$outboundSchema)),
  ultraBlurColors: z.lazy(() => GetMediaMetaDataUltraBlurColors$outboundSchema),
  genre: z.array(z.lazy(() => GetMediaMetaDataGenre$outboundSchema)).optional(),
  country: z.array(z.lazy(() => GetMediaMetaDataCountry$outboundSchema))
    .optional(),
  guids: z.array(z.lazy(() => Guids$outboundSchema)),
  rating: z.array(z.lazy(() => Rating$outboundSchema)),
  role: z.array(z.lazy(() => GetMediaMetaDataRole$outboundSchema)).optional(),
  director: z.array(z.lazy(() => GetMediaMetaDataDirector$outboundSchema))
    .optional(),
  writer: z.array(z.lazy(() => GetMediaMetaDataWriter$outboundSchema))
    .optional(),
  producer: z.array(z.lazy(() => Producer$outboundSchema)).optional(),
  similar: z.array(z.lazy(() => Similar$outboundSchema)).optional(),
  location: z.array(z.lazy(() => GetMediaMetaDataLocation$outboundSchema))
    .optional(),
}).transform((v) => {
  return remap$(v, {
    media: "Media",
    image: "Image",
    ultraBlurColors: "UltraBlurColors",
    genre: "Genre",
    country: "Country",
    guids: "Guid",
    rating: "Rating",
    role: "Role",
    director: "Director",
    writer: "Writer",
    producer: "Producer",
    similar: "Similar",
    location: "Location",
  });
});

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace GetMediaMetaDataMetadata$ {
  /** @deprecated use `GetMediaMetaDataMetadata$inboundSchema` instead. */
  export const inboundSchema = GetMediaMetaDataMetadata$inboundSchema;
  /** @deprecated use `GetMediaMetaDataMetadata$outboundSchema` instead. */
  export const outboundSchema = GetMediaMetaDataMetadata$outboundSchema;
  /** @deprecated use `GetMediaMetaDataMetadata$Outbound` instead. */
  export type Outbound = GetMediaMetaDataMetadata$Outbound;
}

export function getMediaMetaDataMetadataToJSON(
  getMediaMetaDataMetadata: GetMediaMetaDataMetadata,
): string {
  return JSON.stringify(
    GetMediaMetaDataMetadata$outboundSchema.parse(getMediaMetaDataMetadata),
  );
}

export function getMediaMetaDataMetadataFromJSON(
  jsonString: string,
): SafeParseResult<GetMediaMetaDataMetadata, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => GetMediaMetaDataMetadata$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMediaMetaDataMetadata' from JSON`,
  );
}

/** @internal */
export const GetMediaMetaDataMediaContainer$inboundSchema: z.ZodType<
  GetMediaMetaDataMediaContainer,
  z.ZodTypeDef,
  unknown
> = z.object({
  size: z.number(),
  allowSync: z.boolean(),
  identifier: z.string(),
  librarySectionID: z.number().int(),
  librarySectionTitle: z.string(),
  librarySectionUUID: z.string().optional(),
  mediaTagPrefix: z.string(),
  mediaTagVersion: z.number().int(),
  Metadata: z.array(z.lazy(() => GetMediaMetaDataMetadata$inboundSchema)),
}).transform((v) => {
  return remap$(v, {
    "Metadata": "metadata",
  });
});

/** @internal */
export type GetMediaMetaDataMediaContainer$Outbound = {
  size: number;
  allowSync: boolean;
  identifier: string;
  librarySectionID: number;
  librarySectionTitle: string;
  librarySectionUUID?: string | undefined;
  mediaTagPrefix: string;
  mediaTagVersion: number;
  Metadata: Array<GetMediaMetaDataMetadata$Outbound>;
};

/** @internal */
export const GetMediaMetaDataMediaContainer$outboundSchema: z.ZodType<
  GetMediaMetaDataMediaContainer$Outbound,
  z.ZodTypeDef,
  GetMediaMetaDataMediaContainer
> = z.object({
  size: z.number(),
  allowSync: z.boolean(),
  identifier: z.string(),
  librarySectionID: z.number().int(),
  librarySectionTitle: z.string(),
  librarySectionUUID: z.string().optional(),
  mediaTagPrefix: z.string(),
  mediaTagVersion: z.number().int(),
  metadata: z.array(z.lazy(() => GetMediaMetaDataMetadata$outboundSchema)),
}).transform((v) => {
  return remap$(v, {
    metadata: "Metadata",
  });
});

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace GetMediaMetaDataMediaContainer$ {
  /** @deprecated use `GetMediaMetaDataMediaContainer$inboundSchema` instead. */
  export const inboundSchema = GetMediaMetaDataMediaContainer$inboundSchema;
  /** @deprecated use `GetMediaMetaDataMediaContainer$outboundSchema` instead. */
  export const outboundSchema = GetMediaMetaDataMediaContainer$outboundSchema;
  /** @deprecated use `GetMediaMetaDataMediaContainer$Outbound` instead. */
  export type Outbound = GetMediaMetaDataMediaContainer$Outbound;
}

export function getMediaMetaDataMediaContainerToJSON(
  getMediaMetaDataMediaContainer: GetMediaMetaDataMediaContainer,
): string {
  return JSON.stringify(
    GetMediaMetaDataMediaContainer$outboundSchema.parse(
      getMediaMetaDataMediaContainer,
    ),
  );
}

export function getMediaMetaDataMediaContainerFromJSON(
  jsonString: string,
): SafeParseResult<GetMediaMetaDataMediaContainer, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => GetMediaMetaDataMediaContainer$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMediaMetaDataMediaContainer' from JSON`,
  );
}

/** @internal */
export const GetMediaMetaDataResponseBody$inboundSchema: z.ZodType<
  GetMediaMetaDataResponseBody,
  z.ZodTypeDef,
  unknown
> = z.object({
  MediaContainer: z.lazy(() => GetMediaMetaDataMediaContainer$inboundSchema)
    .optional(),
}).transform((v) => {
  return remap$(v, {
    "MediaContainer": "mediaContainer",
  });
});

/** @internal */
export type GetMediaMetaDataResponseBody$Outbound = {
  MediaContainer?: GetMediaMetaDataMediaContainer$Outbound | undefined;
};

/** @internal */
export const GetMediaMetaDataResponseBody$outboundSchema: z.ZodType<
  GetMediaMetaDataResponseBody$Outbound,
  z.ZodTypeDef,
  GetMediaMetaDataResponseBody
> = z.object({
  mediaContainer: z.lazy(() => GetMediaMetaDataMediaContainer$outboundSchema)
    .optional(),
}).transform((v) => {
  return remap$(v, {
    mediaContainer: "MediaContainer",
  });
});

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace GetMediaMetaDataResponseBody$ {
  /** @deprecated use `GetMediaMetaDataResponseBody$inboundSchema` instead. */
  export const inboundSchema = GetMediaMetaDataResponseBody$inboundSchema;
  /** @deprecated use `GetMediaMetaDataResponseBody$outboundSchema` instead. */
  export const outboundSchema = GetMediaMetaDataResponseBody$outboundSchema;
  /** @deprecated use `GetMediaMetaDataResponseBody$Outbound` instead. */
  export type Outbound = GetMediaMetaDataResponseBody$Outbound;
}

export function getMediaMetaDataResponseBodyToJSON(
  getMediaMetaDataResponseBody: GetMediaMetaDataResponseBody,
): string {
  return JSON.stringify(
    GetMediaMetaDataResponseBody$outboundSchema.parse(
      getMediaMetaDataResponseBody,
    ),
  );
}

export function getMediaMetaDataResponseBodyFromJSON(
  jsonString: string,
): SafeParseResult<GetMediaMetaDataResponseBody, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => GetMediaMetaDataResponseBody$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMediaMetaDataResponseBody' from JSON`,
  );
}

/** @internal */
export const GetMediaMetaDataResponse$inboundSchema: z.ZodType<
  GetMediaMetaDataResponse,
  z.ZodTypeDef,
  unknown
> = z.object({
  ContentType: z.string(),
  StatusCode: z.number().int(),
  RawResponse: z.instanceof(Response),
  object: z.lazy(() => GetMediaMetaDataResponseBody$inboundSchema).optional(),
}).transform((v) => {
  return remap$(v, {
    "ContentType": "contentType",
    "StatusCode": "statusCode",
    "RawResponse": "rawResponse",
  });
});

/** @internal */
export type GetMediaMetaDataResponse$Outbound = {
  ContentType: string;
  StatusCode: number;
  RawResponse: never;
  object?: GetMediaMetaDataResponseBody$Outbound | undefined;
};

/** @internal */
export const GetMediaMetaDataResponse$outboundSchema: z.ZodType<
  GetMediaMetaDataResponse$Outbound,
  z.ZodTypeDef,
  GetMediaMetaDataResponse
> = z.object({
  contentType: z.string(),
  statusCode: z.number().int(),
  rawResponse: z.instanceof(Response).transform(() => {
    throw new Error("Response cannot be serialized");
  }),
  object: z.lazy(() => GetMediaMetaDataResponseBody$outboundSchema).optional(),
}).transform((v) => {
  return remap$(v, {
    contentType: "ContentType",
    statusCode: "StatusCode",
    rawResponse: "RawResponse",
  });
});

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace GetMediaMetaDataResponse$ {
  /** @deprecated use `GetMediaMetaDataResponse$inboundSchema` instead. */
  export const inboundSchema = GetMediaMetaDataResponse$inboundSchema;
  /** @deprecated use `GetMediaMetaDataResponse$outboundSchema` instead. */
  export const outboundSchema = GetMediaMetaDataResponse$outboundSchema;
  /** @deprecated use `GetMediaMetaDataResponse$Outbound` instead. */
  export type Outbound = GetMediaMetaDataResponse$Outbound;
}

export function getMediaMetaDataResponseToJSON(
  getMediaMetaDataResponse: GetMediaMetaDataResponse,
): string {
  return JSON.stringify(
    GetMediaMetaDataResponse$outboundSchema.parse(getMediaMetaDataResponse),
  );
}

export function getMediaMetaDataResponseFromJSON(
  jsonString: string,
): SafeParseResult<GetMediaMetaDataResponse, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => GetMediaMetaDataResponse$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMediaMetaDataResponse' from JSON`,
  );
}
