// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.

package components

import (
	"encoding/json"
	"fmt"
	"github.com/LukeHagar/plexgo/internal/utils"
	"github.com/LukeHagar/plexgo/types"
)

type MediaContainerWithDecisionGuids struct {
	// The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb://
	//
	ID string `json:"id"`
}

func (m *MediaContainerWithDecisionGuids) GetID() string {
	if m == nil {
		return ""
	}
	return m.ID
}

type MediaContainerWithDecisionDecision string

const (
	MediaContainerWithDecisionDecisionCopy        MediaContainerWithDecisionDecision = "copy"
	MediaContainerWithDecisionDecisionTranscode   MediaContainerWithDecisionDecision = "transcode"
	MediaContainerWithDecisionDecisionBurn        MediaContainerWithDecisionDecision = "burn"
	MediaContainerWithDecisionDecisionUnavailable MediaContainerWithDecisionDecision = "unavailable"
	MediaContainerWithDecisionDecisionIgnore      MediaContainerWithDecisionDecision = "ignore"
	MediaContainerWithDecisionDecisionNone        MediaContainerWithDecisionDecision = "none"
)

func (e MediaContainerWithDecisionDecision) ToPointer() *MediaContainerWithDecisionDecision {
	return &e
}
func (e *MediaContainerWithDecisionDecision) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "copy":
		fallthrough
	case "transcode":
		fallthrough
	case "burn":
		fallthrough
	case "unavailable":
		fallthrough
	case "ignore":
		fallthrough
	case "none":
		*e = MediaContainerWithDecisionDecision(v)
		return nil
	default:
		return fmt.Errorf("invalid value for MediaContainerWithDecisionDecision: %v", v)
	}
}

type MediaContainerWithDecisionLocation string

const (
	MediaContainerWithDecisionLocationDirect        MediaContainerWithDecisionLocation = "direct"
	MediaContainerWithDecisionLocationSidecarSubs   MediaContainerWithDecisionLocation = "sidecar-subs"
	MediaContainerWithDecisionLocationSegmentsVideo MediaContainerWithDecisionLocation = "segments-video"
	MediaContainerWithDecisionLocationSegmentsAudio MediaContainerWithDecisionLocation = "segments-audio"
	MediaContainerWithDecisionLocationSegmentsAv    MediaContainerWithDecisionLocation = "segments-av"
	MediaContainerWithDecisionLocationSegmentsSubs  MediaContainerWithDecisionLocation = "segments-subs"
	MediaContainerWithDecisionLocationEmbedded      MediaContainerWithDecisionLocation = "embedded"
	MediaContainerWithDecisionLocationSidecar       MediaContainerWithDecisionLocation = "sidecar"
)

func (e MediaContainerWithDecisionLocation) ToPointer() *MediaContainerWithDecisionLocation {
	return &e
}
func (e *MediaContainerWithDecisionLocation) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "direct":
		fallthrough
	case "sidecar-subs":
		fallthrough
	case "segments-video":
		fallthrough
	case "segments-audio":
		fallthrough
	case "segments-av":
		fallthrough
	case "segments-subs":
		fallthrough
	case "embedded":
		fallthrough
	case "sidecar":
		*e = MediaContainerWithDecisionLocation(v)
		return nil
	default:
		return fmt.Errorf("invalid value for MediaContainerWithDecisionLocation: %v", v)
	}
}

// MediaContainerWithDecisionStream - `Stream` represents a particular stream from a media item, such as the video stream, audio stream, or subtitle stream. The stream may either be part of the file represented by the parent `Part` or, especially for subtitles, an external file. The stream contains more detailed information about the specific stream. For example, a video may include the `aspectRatio` at the `Media` level, but detailed information about the video stream like the color space will be included on the `Stream` for the video stream.  Note that photos do not have streams (mostly as an optimization).
type MediaContainerWithDecisionStream struct {
	// Indicates if this stream is default.
	Default *bool `json:"default,omitempty"`
	// Audio channel layout.
	AudioChannelLayout *string `json:"audioChannelLayout,omitempty"`
	// Number of audio channels (for audio streams).
	Channels *int `json:"channels,omitempty"`
	// Bit depth of the video stream.
	BitDepth *int `json:"bitDepth,omitempty"`
	// Dolby Vision BL compatibility ID.
	DOVIBLCompatID *int `json:"DOVIBLCompatID,omitempty"`
	// Indicates if Dolby Vision BL is present.
	DOVIBLPresent *bool `json:"DOVIBLPresent,omitempty"`
	// Indicates if Dolby Vision EL is present.
	DOVIELPresent *bool `json:"DOVIELPresent,omitempty"`
	// Dolby Vision level.
	DOVILevel *int `json:"DOVILevel,omitempty"`
	// Indicates if Dolby Vision is present.
	DOVIPresent *bool `json:"DOVIPresent,omitempty"`
	// Dolby Vision profile.
	DOVIProfile *int `json:"DOVIProfile,omitempty"`
	// Indicates if Dolby Vision RPU is present.
	DOVIRPUPresent *bool `json:"DOVIRPUPresent,omitempty"`
	// Dolby Vision version.
	DOVIVersion *string `json:"DOVIVersion,omitempty"`
	// Bitrate of the stream.
	Bitrate *int `json:"bitrate,omitempty"`
	// Indicates if the stream can auto-sync.
	CanAutoSync *bool `json:"canAutoSync,omitempty"`
	// Chroma sample location.
	ChromaLocation *string `json:"chromaLocation,omitempty"`
	// Chroma subsampling format.
	ChromaSubsampling *string `json:"chromaSubsampling,omitempty"`
	// Coded video height.
	CodedHeight *int `json:"codedHeight,omitempty"`
	// Coded video width.
	CodedWidth     *int  `json:"codedWidth,omitempty"`
	ClosedCaptions *bool `json:"closedCaptions,omitempty"`
	// Codec used by the stream.
	Codec string `json:"codec"`
	// Color primaries used.
	ColorPrimaries *string `json:"colorPrimaries,omitempty"`
	// Color range (e.g., tv).
	ColorRange *string `json:"colorRange,omitempty"`
	// Color space.
	ColorSpace *string `json:"colorSpace,omitempty"`
	// Color transfer characteristics.
	ColorTrc *string `json:"colorTrc,omitempty"`
	// Display title for the stream.
	DisplayTitle string `json:"displayTitle"`
	// Extended display title for the stream.
	ExtendedDisplayTitle *string `json:"extendedDisplayTitle,omitempty"`
	// Frame rate of the stream.
	FrameRate        *float32 `json:"frameRate,omitempty"`
	HasScalingMatrix *bool    `json:"hasScalingMatrix,omitempty"`
	// Height of the video stream.
	Height *int `json:"height,omitempty"`
	// Unique stream identifier.
	ID int `json:"id"`
	// Index of the stream.
	Index *int `json:"index,omitempty"`
	// Key to access this stream part.
	Key string `json:"key"`
	// Language of the stream.
	Language *string `json:"language,omitempty"`
	// ISO language code.
	LanguageCode *string `json:"languageCode,omitempty"`
	// Language tag (e.g., en).
	LanguageTag *string `json:"languageTag,omitempty"`
	// Format of the stream (e.g., srt).
	Format *string `json:"format,omitempty"`
	// Indicates whether header compression is enabled.
	HeaderCompression *bool `json:"headerCompression,omitempty"`
	// Video level.
	Level *int `json:"level,omitempty"`
	// Indicates if this is the original stream.
	Original *bool `json:"original,omitempty"`
	// Video profile.
	Profile *string `json:"profile,omitempty"`
	// Number of reference frames.
	RefFrames *int `json:"refFrames,omitempty"`
	// Sampling rate for the audio stream.
	SamplingRate    *int    `json:"samplingRate,omitempty"`
	ScanType        *string `json:"scanType,omitempty"`
	EmbeddedInVideo *string `json:"embeddedInVideo,omitempty"`
	// Indicates if this stream is selected (applicable for audio streams).
	Selected *bool `json:"selected,omitempty"`
	Forced   *bool `json:"forced,omitempty"`
	// Indicates if the stream is for the hearing impaired.
	HearingImpaired *bool `json:"hearingImpaired,omitempty"`
	// Indicates if the stream is a dub.
	Dub *bool `json:"dub,omitempty"`
	// Optional title for the stream (e.g., language variant).
	Title            *string `json:"title,omitempty"`
	StreamIdentifier *int    `json:"streamIdentifier,omitempty"`
	// Stream type:
	//   - VIDEO = 1
	//   - AUDIO = 2
	//   - SUBTITLE = 3
	//
	streamType int64 `const:"1" json:"streamType"`
	// Width of the video stream.
	Width                *int                                `json:"width,omitempty"`
	Decision             *MediaContainerWithDecisionDecision `json:"decision,omitempty"`
	Location             *MediaContainerWithDecisionLocation `json:"location,omitempty"`
	AdditionalProperties map[string]any                      `additionalProperties:"true" json:"-"`
}

func (m MediaContainerWithDecisionStream) MarshalJSON() ([]byte, error) {
	return utils.MarshalJSON(m, "", false)
}

func (m *MediaContainerWithDecisionStream) UnmarshalJSON(data []byte) error {
	if err := utils.UnmarshalJSON(data, &m, "", false, []string{"codec", "displayTitle", "id", "key", "streamType"}); err != nil {
		return err
	}
	return nil
}

func (m *MediaContainerWithDecisionStream) GetDefault() *bool {
	if m == nil {
		return nil
	}
	return m.Default
}

func (m *MediaContainerWithDecisionStream) GetAudioChannelLayout() *string {
	if m == nil {
		return nil
	}
	return m.AudioChannelLayout
}

func (m *MediaContainerWithDecisionStream) GetChannels() *int {
	if m == nil {
		return nil
	}
	return m.Channels
}

func (m *MediaContainerWithDecisionStream) GetBitDepth() *int {
	if m == nil {
		return nil
	}
	return m.BitDepth
}

func (m *MediaContainerWithDecisionStream) GetDOVIBLCompatID() *int {
	if m == nil {
		return nil
	}
	return m.DOVIBLCompatID
}

func (m *MediaContainerWithDecisionStream) GetDOVIBLPresent() *bool {
	if m == nil {
		return nil
	}
	return m.DOVIBLPresent
}

func (m *MediaContainerWithDecisionStream) GetDOVIELPresent() *bool {
	if m == nil {
		return nil
	}
	return m.DOVIELPresent
}

func (m *MediaContainerWithDecisionStream) GetDOVILevel() *int {
	if m == nil {
		return nil
	}
	return m.DOVILevel
}

func (m *MediaContainerWithDecisionStream) GetDOVIPresent() *bool {
	if m == nil {
		return nil
	}
	return m.DOVIPresent
}

func (m *MediaContainerWithDecisionStream) GetDOVIProfile() *int {
	if m == nil {
		return nil
	}
	return m.DOVIProfile
}

func (m *MediaContainerWithDecisionStream) GetDOVIRPUPresent() *bool {
	if m == nil {
		return nil
	}
	return m.DOVIRPUPresent
}

func (m *MediaContainerWithDecisionStream) GetDOVIVersion() *string {
	if m == nil {
		return nil
	}
	return m.DOVIVersion
}

func (m *MediaContainerWithDecisionStream) GetBitrate() *int {
	if m == nil {
		return nil
	}
	return m.Bitrate
}

func (m *MediaContainerWithDecisionStream) GetCanAutoSync() *bool {
	if m == nil {
		return nil
	}
	return m.CanAutoSync
}

func (m *MediaContainerWithDecisionStream) GetChromaLocation() *string {
	if m == nil {
		return nil
	}
	return m.ChromaLocation
}

func (m *MediaContainerWithDecisionStream) GetChromaSubsampling() *string {
	if m == nil {
		return nil
	}
	return m.ChromaSubsampling
}

func (m *MediaContainerWithDecisionStream) GetCodedHeight() *int {
	if m == nil {
		return nil
	}
	return m.CodedHeight
}

func (m *MediaContainerWithDecisionStream) GetCodedWidth() *int {
	if m == nil {
		return nil
	}
	return m.CodedWidth
}

func (m *MediaContainerWithDecisionStream) GetClosedCaptions() *bool {
	if m == nil {
		return nil
	}
	return m.ClosedCaptions
}

func (m *MediaContainerWithDecisionStream) GetCodec() string {
	if m == nil {
		return ""
	}
	return m.Codec
}

func (m *MediaContainerWithDecisionStream) GetColorPrimaries() *string {
	if m == nil {
		return nil
	}
	return m.ColorPrimaries
}

func (m *MediaContainerWithDecisionStream) GetColorRange() *string {
	if m == nil {
		return nil
	}
	return m.ColorRange
}

func (m *MediaContainerWithDecisionStream) GetColorSpace() *string {
	if m == nil {
		return nil
	}
	return m.ColorSpace
}

func (m *MediaContainerWithDecisionStream) GetColorTrc() *string {
	if m == nil {
		return nil
	}
	return m.ColorTrc
}

func (m *MediaContainerWithDecisionStream) GetDisplayTitle() string {
	if m == nil {
		return ""
	}
	return m.DisplayTitle
}

func (m *MediaContainerWithDecisionStream) GetExtendedDisplayTitle() *string {
	if m == nil {
		return nil
	}
	return m.ExtendedDisplayTitle
}

func (m *MediaContainerWithDecisionStream) GetFrameRate() *float32 {
	if m == nil {
		return nil
	}
	return m.FrameRate
}

func (m *MediaContainerWithDecisionStream) GetHasScalingMatrix() *bool {
	if m == nil {
		return nil
	}
	return m.HasScalingMatrix
}

func (m *MediaContainerWithDecisionStream) GetHeight() *int {
	if m == nil {
		return nil
	}
	return m.Height
}

func (m *MediaContainerWithDecisionStream) GetID() int {
	if m == nil {
		return 0
	}
	return m.ID
}

func (m *MediaContainerWithDecisionStream) GetIndex() *int {
	if m == nil {
		return nil
	}
	return m.Index
}

func (m *MediaContainerWithDecisionStream) GetKey() string {
	if m == nil {
		return ""
	}
	return m.Key
}

func (m *MediaContainerWithDecisionStream) GetLanguage() *string {
	if m == nil {
		return nil
	}
	return m.Language
}

func (m *MediaContainerWithDecisionStream) GetLanguageCode() *string {
	if m == nil {
		return nil
	}
	return m.LanguageCode
}

func (m *MediaContainerWithDecisionStream) GetLanguageTag() *string {
	if m == nil {
		return nil
	}
	return m.LanguageTag
}

func (m *MediaContainerWithDecisionStream) GetFormat() *string {
	if m == nil {
		return nil
	}
	return m.Format
}

func (m *MediaContainerWithDecisionStream) GetHeaderCompression() *bool {
	if m == nil {
		return nil
	}
	return m.HeaderCompression
}

func (m *MediaContainerWithDecisionStream) GetLevel() *int {
	if m == nil {
		return nil
	}
	return m.Level
}

func (m *MediaContainerWithDecisionStream) GetOriginal() *bool {
	if m == nil {
		return nil
	}
	return m.Original
}

func (m *MediaContainerWithDecisionStream) GetProfile() *string {
	if m == nil {
		return nil
	}
	return m.Profile
}

func (m *MediaContainerWithDecisionStream) GetRefFrames() *int {
	if m == nil {
		return nil
	}
	return m.RefFrames
}

func (m *MediaContainerWithDecisionStream) GetSamplingRate() *int {
	if m == nil {
		return nil
	}
	return m.SamplingRate
}

func (m *MediaContainerWithDecisionStream) GetScanType() *string {
	if m == nil {
		return nil
	}
	return m.ScanType
}

func (m *MediaContainerWithDecisionStream) GetEmbeddedInVideo() *string {
	if m == nil {
		return nil
	}
	return m.EmbeddedInVideo
}

func (m *MediaContainerWithDecisionStream) GetSelected() *bool {
	if m == nil {
		return nil
	}
	return m.Selected
}

func (m *MediaContainerWithDecisionStream) GetForced() *bool {
	if m == nil {
		return nil
	}
	return m.Forced
}

func (m *MediaContainerWithDecisionStream) GetHearingImpaired() *bool {
	if m == nil {
		return nil
	}
	return m.HearingImpaired
}

func (m *MediaContainerWithDecisionStream) GetDub() *bool {
	if m == nil {
		return nil
	}
	return m.Dub
}

func (m *MediaContainerWithDecisionStream) GetTitle() *string {
	if m == nil {
		return nil
	}
	return m.Title
}

func (m *MediaContainerWithDecisionStream) GetStreamIdentifier() *int {
	if m == nil {
		return nil
	}
	return m.StreamIdentifier
}

func (m *MediaContainerWithDecisionStream) GetStreamType() int64 {
	return 1
}

func (m *MediaContainerWithDecisionStream) GetWidth() *int {
	if m == nil {
		return nil
	}
	return m.Width
}

func (m *MediaContainerWithDecisionStream) GetDecision() *MediaContainerWithDecisionDecision {
	if m == nil {
		return nil
	}
	return m.Decision
}

func (m *MediaContainerWithDecisionStream) GetLocation() *MediaContainerWithDecisionLocation {
	if m == nil {
		return nil
	}
	return m.Location
}

func (m *MediaContainerWithDecisionStream) GetAdditionalProperties() map[string]any {
	if m == nil {
		return nil
	}
	return m.AdditionalProperties
}

type Decision string

const (
	DecisionDirectplay Decision = "directplay"
	DecisionTranscode  Decision = "transcode"
	DecisionNone       Decision = "none"
)

func (e Decision) ToPointer() *Decision {
	return &e
}
func (e *Decision) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "directplay":
		fallthrough
	case "transcode":
		fallthrough
	case "none":
		*e = Decision(v)
		return nil
	default:
		return fmt.Errorf("invalid value for Decision: %v", v)
	}
}

// MediaContainerWithDecisionPart - `Part` represents a particular file or "part" of a media item. The part is the playable unit of the media hierarchy. Suppose that a movie library contains a movie that is broken up into files, reminiscent of a movie split across two BDs. The metadata item represents information about the movie, the media item represents this instance of the movie at this resolution and quality, and the part items represent the two playable files.  If another media were added which contained the joining of these two parts transcoded down to a lower resolution, then this metadata would contain 2 medias, one with 2 parts and one with 1 part.
type MediaContainerWithDecisionPart struct {
	// Indicates if the part is accessible.
	Accessible   *bool   `json:"accessible,omitempty"`
	AudioProfile *string `json:"audioProfile,omitempty"`
	// The container of the media file, such as `mp4` or `mkv`
	Container *string `json:"container,omitempty"`
	// The duration of the media item, in milliseconds
	Duration *int `json:"duration,omitempty"`
	// Indicates if the part exists.
	Exists *bool `json:"exists,omitempty"`
	// The local file path at which the part is stored on the server
	File            *string `json:"file,omitempty"`
	Has64bitOffsets *bool   `json:"has64bitOffsets,omitempty"`
	ID              int64   `json:"id"`
	Indexes         *string `json:"indexes,omitempty"`
	// The key from which the media can be streamed
	Key                   string `json:"key"`
	OptimizedForStreaming *bool  `json:"optimizedForStreaming,omitempty"`
	// The size of the media, in bytes
	Size                 *int64                             `json:"size,omitempty"`
	Stream               []MediaContainerWithDecisionStream `json:"Stream,omitempty"`
	VideoProfile         *string                            `json:"videoProfile,omitempty"`
	Decision             *Decision                          `json:"decision,omitempty"`
	Selected             *bool                              `json:"selected,omitempty"`
	AdditionalProperties map[string]any                     `additionalProperties:"true" json:"-"`
}

func (m MediaContainerWithDecisionPart) MarshalJSON() ([]byte, error) {
	return utils.MarshalJSON(m, "", false)
}

func (m *MediaContainerWithDecisionPart) UnmarshalJSON(data []byte) error {
	if err := utils.UnmarshalJSON(data, &m, "", false, []string{"id", "key"}); err != nil {
		return err
	}
	return nil
}

func (m *MediaContainerWithDecisionPart) GetAccessible() *bool {
	if m == nil {
		return nil
	}
	return m.Accessible
}

func (m *MediaContainerWithDecisionPart) GetAudioProfile() *string {
	if m == nil {
		return nil
	}
	return m.AudioProfile
}

func (m *MediaContainerWithDecisionPart) GetContainer() *string {
	if m == nil {
		return nil
	}
	return m.Container
}

func (m *MediaContainerWithDecisionPart) GetDuration() *int {
	if m == nil {
		return nil
	}
	return m.Duration
}

func (m *MediaContainerWithDecisionPart) GetExists() *bool {
	if m == nil {
		return nil
	}
	return m.Exists
}

func (m *MediaContainerWithDecisionPart) GetFile() *string {
	if m == nil {
		return nil
	}
	return m.File
}

func (m *MediaContainerWithDecisionPart) GetHas64bitOffsets() *bool {
	if m == nil {
		return nil
	}
	return m.Has64bitOffsets
}

func (m *MediaContainerWithDecisionPart) GetID() int64 {
	if m == nil {
		return 0
	}
	return m.ID
}

func (m *MediaContainerWithDecisionPart) GetIndexes() *string {
	if m == nil {
		return nil
	}
	return m.Indexes
}

func (m *MediaContainerWithDecisionPart) GetKey() string {
	if m == nil {
		return ""
	}
	return m.Key
}

func (m *MediaContainerWithDecisionPart) GetOptimizedForStreaming() *bool {
	if m == nil {
		return nil
	}
	return m.OptimizedForStreaming
}

func (m *MediaContainerWithDecisionPart) GetSize() *int64 {
	if m == nil {
		return nil
	}
	return m.Size
}

func (m *MediaContainerWithDecisionPart) GetStream() []MediaContainerWithDecisionStream {
	if m == nil {
		return nil
	}
	return m.Stream
}

func (m *MediaContainerWithDecisionPart) GetVideoProfile() *string {
	if m == nil {
		return nil
	}
	return m.VideoProfile
}

func (m *MediaContainerWithDecisionPart) GetDecision() *Decision {
	if m == nil {
		return nil
	}
	return m.Decision
}

func (m *MediaContainerWithDecisionPart) GetSelected() *bool {
	if m == nil {
		return nil
	}
	return m.Selected
}

func (m *MediaContainerWithDecisionPart) GetAdditionalProperties() map[string]any {
	if m == nil {
		return nil
	}
	return m.AdditionalProperties
}

// MediaContainerWithDecisionMedia - `Media` represents an one or more media files (parts) and is a child of a metadata item. There aren't necessarily any guaranteed attributes on media elements since the attributes will vary based on the type. The possible attributes are not documented here, but they typically have self-evident names. High-level media information that can be used for badging and flagging, such as `videoResolution` and codecs, is included on the media element.
type MediaContainerWithDecisionMedia struct {
	AspectRatio           *float32                         `json:"aspectRatio,omitempty"`
	AudioChannels         *int                             `json:"audioChannels,omitempty"`
	AudioCodec            *string                          `json:"audioCodec,omitempty"`
	AudioProfile          *string                          `json:"audioProfile,omitempty"`
	Bitrate               *int                             `json:"bitrate,omitempty"`
	Container             *string                          `json:"container,omitempty"`
	Duration              *int                             `json:"duration,omitempty"`
	Has64bitOffsets       *bool                            `json:"has64bitOffsets,omitempty"`
	HasVoiceActivity      *bool                            `json:"hasVoiceActivity,omitempty"`
	Height                *int                             `json:"height,omitempty"`
	ID                    int64                            `json:"id"`
	OptimizedForStreaming *bool                            `json:"optimizedForStreaming,omitempty"`
	Part                  []MediaContainerWithDecisionPart `json:"Part,omitempty"`
	VideoCodec            *string                          `json:"videoCodec,omitempty"`
	VideoFrameRate        *string                          `json:"videoFrameRate,omitempty"`
	VideoProfile          *string                          `json:"videoProfile,omitempty"`
	VideoResolution       *string                          `json:"videoResolution,omitempty"`
	Width                 *int                             `json:"width,omitempty"`
	Abr                   *bool                            `json:"abr,omitempty"`
	ResourceSession       *string                          `json:"resourceSession,omitempty"`
	Selected              *bool                            `json:"selected,omitempty"`
	AdditionalProperties  map[string]any                   `additionalProperties:"true" json:"-"`
}

func (m MediaContainerWithDecisionMedia) MarshalJSON() ([]byte, error) {
	return utils.MarshalJSON(m, "", false)
}

func (m *MediaContainerWithDecisionMedia) UnmarshalJSON(data []byte) error {
	if err := utils.UnmarshalJSON(data, &m, "", false, []string{"id"}); err != nil {
		return err
	}
	return nil
}

func (m *MediaContainerWithDecisionMedia) GetAspectRatio() *float32 {
	if m == nil {
		return nil
	}
	return m.AspectRatio
}

func (m *MediaContainerWithDecisionMedia) GetAudioChannels() *int {
	if m == nil {
		return nil
	}
	return m.AudioChannels
}

func (m *MediaContainerWithDecisionMedia) GetAudioCodec() *string {
	if m == nil {
		return nil
	}
	return m.AudioCodec
}

func (m *MediaContainerWithDecisionMedia) GetAudioProfile() *string {
	if m == nil {
		return nil
	}
	return m.AudioProfile
}

func (m *MediaContainerWithDecisionMedia) GetBitrate() *int {
	if m == nil {
		return nil
	}
	return m.Bitrate
}

func (m *MediaContainerWithDecisionMedia) GetContainer() *string {
	if m == nil {
		return nil
	}
	return m.Container
}

func (m *MediaContainerWithDecisionMedia) GetDuration() *int {
	if m == nil {
		return nil
	}
	return m.Duration
}

func (m *MediaContainerWithDecisionMedia) GetHas64bitOffsets() *bool {
	if m == nil {
		return nil
	}
	return m.Has64bitOffsets
}

func (m *MediaContainerWithDecisionMedia) GetHasVoiceActivity() *bool {
	if m == nil {
		return nil
	}
	return m.HasVoiceActivity
}

func (m *MediaContainerWithDecisionMedia) GetHeight() *int {
	if m == nil {
		return nil
	}
	return m.Height
}

func (m *MediaContainerWithDecisionMedia) GetID() int64 {
	if m == nil {
		return 0
	}
	return m.ID
}

func (m *MediaContainerWithDecisionMedia) GetOptimizedForStreaming() *bool {
	if m == nil {
		return nil
	}
	return m.OptimizedForStreaming
}

func (m *MediaContainerWithDecisionMedia) GetPart() []MediaContainerWithDecisionPart {
	if m == nil {
		return nil
	}
	return m.Part
}

func (m *MediaContainerWithDecisionMedia) GetVideoCodec() *string {
	if m == nil {
		return nil
	}
	return m.VideoCodec
}

func (m *MediaContainerWithDecisionMedia) GetVideoFrameRate() *string {
	if m == nil {
		return nil
	}
	return m.VideoFrameRate
}

func (m *MediaContainerWithDecisionMedia) GetVideoProfile() *string {
	if m == nil {
		return nil
	}
	return m.VideoProfile
}

func (m *MediaContainerWithDecisionMedia) GetVideoResolution() *string {
	if m == nil {
		return nil
	}
	return m.VideoResolution
}

func (m *MediaContainerWithDecisionMedia) GetWidth() *int {
	if m == nil {
		return nil
	}
	return m.Width
}

func (m *MediaContainerWithDecisionMedia) GetAbr() *bool {
	if m == nil {
		return nil
	}
	return m.Abr
}

func (m *MediaContainerWithDecisionMedia) GetResourceSession() *string {
	if m == nil {
		return nil
	}
	return m.ResourceSession
}

func (m *MediaContainerWithDecisionMedia) GetSelected() *bool {
	if m == nil {
		return nil
	}
	return m.Selected
}

func (m *MediaContainerWithDecisionMedia) GetAdditionalProperties() map[string]any {
	if m == nil {
		return nil
	}
	return m.AdditionalProperties
}

// MediaContainerWithDecisionMetadata - Items in a library are referred to as "metadata items." These metadata items are distinct from "media items" which represent actual instances of media that can be consumed. Consider a TV library that has a single video file in it for a particular episode of a show. The library has a single media item, but it has three metadata items: one for the show, one for the season, and one for the episode. Consider a movie library that has two video files in it: the same movie, but two different resolutions. The library has a single metadata item for the movie, but that metadata item has two media items, one for each resolution. Additionally a "media item" will have one or more "media parts" where the the parts are intended to be watched together, such as a CD1 and CD2 parts of the same movie.
//
// Note that when a metadata item has multiple media items, those media items should be isomorphic. That is, a 4K version and 1080p version of a movie are different versions of the same movie. They have the same duration, same summary, same rating, etc. and they can generally be considered interchangeable. A theatrical release vs. director's cut vs. unrated version on the other hand would be separate metadata items.
//
// Metadata items can often live in a hierarchy with relationships between them.  For example, the metadata item for an episodes is associated with a season metadata item which is associated with a show metadata item.  A similar hierarchy exists with track, album, and artist and photos and photo album.  The relationships may be expressed via relative terms and absolute terms.  For example, "leaves" refer to metadata items which has associated media (there is no media for a season nor show).  A show will have "children" in the form of seasons and a season will have "children" in the form of episodes and episodes have "parent" in the form of a season which has a "parent" in the form of a show.  Similarly, a show has "grandchildren" in the form of episodse and an episode has a "grandparent" in the form of a show.
type MediaContainerWithDecisionMetadata struct {
	// The title of the item (e.g. “300” or “The Simpsons”)
	Title string `json:"title"`
	// The type of the video item, such as `movie`, `episode`, or `clip`.
	Type string `json:"type"`
	// When present, contains the disc number for a track on multi-disc albums.
	AbsoluteIndex *int `json:"absoluteIndex,omitempty"`
	// In units of seconds since the epoch, returns the time at which the item was added to the library.
	AddedAt int64 `json:"addedAt"`
	// When present, the URL for the background artwork for the item.
	Art *string `json:"art,omitempty"`
	// Some rating systems separate reviewer ratings from audience ratings
	AudienceRating *float32 `json:"audienceRating,omitempty"`
	// A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled).
	AudienceRatingImage *string `json:"audienceRatingImage,omitempty"`
	Autotag             []Tag   `json:"Autotag,omitempty"`
	// When present, the URL for a banner graphic for the item.
	Banner *string `json:"banner,omitempty"`
	// When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two).
	ChapterSource *string `json:"chapterSource,omitempty"`
	// The number of child items associated with this media item.
	ChildCount *int `json:"childCount,omitempty"`
	// When present, the URL for a composite image for descendent items (e.g. photo albums or playlists).
	Composite *string `json:"composite,omitempty"`
	// If known, the content rating (e.g. MPAA) for an item.
	ContentRating *string `json:"contentRating,omitempty"`
	Country       []Tag   `json:"Country,omitempty"`
	Director      []Tag   `json:"Director,omitempty"`
	// When present, the duration for the item, in units of milliseconds.
	Duration *int `json:"duration,omitempty"`
	// Typically only seen in metadata at a library's top level
	Filter []Filter `json:"Filter,omitempty"`
	Genre  []Tag    `json:"Genre,omitempty"`
	// The `art` of the grandparent
	GrandparentArt *string `json:"grandparentArt,omitempty"`
	// The GUID of the grandparent media item.
	GrandparentGUID *string `json:"grandparentGuid,omitempty"`
	// The `hero` of the grandparent
	GrandparentHero *string `json:"grandparentHero,omitempty"`
	// The `key` of the grandparent
	GrandparentKey *string `json:"grandparentKey,omitempty"`
	// The `ratingKey` of the grandparent
	GrandparentRatingKey *string `json:"grandparentRatingKey,omitempty"`
	// The `theme` of the grandparent
	GrandparentTheme *string `json:"grandparentTheme,omitempty"`
	// The `thumb` of the grandparent
	GrandparentThumb *string `json:"grandparentThumb,omitempty"`
	// The `title` of the grandparent
	GrandparentTitle *string `json:"grandparentTitle,omitempty"`
	// The globally unique identifier for the media item.
	GUID  *string                           `json:"guid,omitempty"`
	Guids []MediaContainerWithDecisionGuids `json:"Guid,omitempty"`
	// When present, the URL for a hero image for the item.
	Hero  *string `json:"hero,omitempty"`
	Image []Image `json:"Image,omitempty"`
	// When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks.
	Index *int `json:"index,omitempty"`
	// The key at which the item's details can be fetched.  In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details.
	Key          string `json:"key"`
	LastViewedAt *int64 `json:"lastViewedAt,omitempty"`
	// For shows and seasons, contains the number of total episodes.
	LeafCount *int                              `json:"leafCount,omitempty"`
	Media     []MediaContainerWithDecisionMedia `json:"Media,omitempty"`
	// When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well.
	OriginallyAvailableAt *types.Date `json:"originallyAvailableAt,omitempty"`
	// When present, used to indicate an item's original title, e.g. a movie's foreign title.
	OriginalTitle *string `json:"originalTitle,omitempty"`
	// The GUID of the parent media item.
	ParentGUID *string `json:"parentGuid,omitempty"`
	// The `hero` of the parent
	ParentHero *string `json:"parentHero,omitempty"`
	// The `index` of the parent
	ParentIndex *int `json:"parentIndex,omitempty"`
	// The `key` of the parent
	ParentKey *string `json:"parentKey,omitempty"`
	// The `ratingKey` of the parent
	ParentRatingKey *string `json:"parentRatingKey,omitempty"`
	// The `thumb` of the parent
	ParentThumb *string `json:"parentThumb,omitempty"`
	// The `title` of the parent
	ParentTitle *string `json:"parentTitle,omitempty"`
	// Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item.
	PrimaryExtraKey *string `json:"primaryExtraKey,omitempty"`
	// Prompt to give the user for this directory (such as `Search Movies`)
	Prompt *string `json:"prompt,omitempty"`
	// When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from.
	Rating      *float32 `json:"rating,omitempty"`
	RatingArray []Tag    `json:"Rating,omitempty"`
	// Number of ratings under this metadata
	RatingCount *int `json:"ratingCount,omitempty"`
	// When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten.
	RatingImage *string `json:"ratingImage,omitempty"`
	// This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them.  While it often appears to be numeric, this is not guaranteed.
	RatingKey *string `json:"ratingKey,omitempty"`
	Role      []Tag   `json:"Role,omitempty"`
	// Indicates this is a search directory
	Search *bool `json:"search,omitempty"`
	// Used by old clients to provide nested menus allowing for primative (but structured) navigation.
	Secondary *bool `json:"secondary,omitempty"`
	// When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc.
	SkipChildren *bool `json:"skipChildren,omitempty"`
	// When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show).
	SkipParent *bool `json:"skipParent,omitempty"`
	// Typically only seen in metadata at a library's top level
	Sort []Sort `json:"Sort,omitempty"`
	// When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums).
	Studio *string `json:"studio,omitempty"`
	// The subtype of the video item, such as `photo` when the video item is in a photo library
	Subtype *string `json:"subtype,omitempty"`
	// When present, the extended textual information about the item (e.g. movie plot, artist biography, album review).
	Summary *string `json:"summary,omitempty"`
	// When present, a pithy one-liner about the item (usually only seen for movies).
	Tagline *string `json:"tagline,omitempty"`
	// When present, the URL for theme music for the item (usually only for TV shows).
	Theme *string `json:"theme,omitempty"`
	// When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail.
	Thumb *string `json:"thumb,omitempty"`
	// Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”).
	TitleSort *string `json:"titleSort,omitempty"`
	// In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated).
	UpdatedAt *int64 `json:"updatedAt,omitempty"`
	// When the user has rated an item, this contains the user rating
	UserRating *float32 `json:"userRating,omitempty"`
	// When a users has completed watched or listened to an item, this attribute contains the number of consumptions.
	ViewCount *int `json:"viewCount,omitempty"`
	// For shows and seasons, contains the number of viewed episodes.
	ViewedLeafCount *int `json:"viewedLeafCount,omitempty"`
	// When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds.
	ViewOffset *int  `json:"viewOffset,omitempty"`
	Writer     []Tag `json:"Writer,omitempty"`
	// When present, the year associated with the item's release (e.g. release year for a movie).
	Year                 *int           `json:"year,omitempty"`
	AdditionalProperties map[string]any `additionalProperties:"true" json:"-"`
}

func (m MediaContainerWithDecisionMetadata) MarshalJSON() ([]byte, error) {
	return utils.MarshalJSON(m, "", false)
}

func (m *MediaContainerWithDecisionMetadata) UnmarshalJSON(data []byte) error {
	if err := utils.UnmarshalJSON(data, &m, "", false, []string{"title", "type", "addedAt", "key"}); err != nil {
		return err
	}
	return nil
}

func (m *MediaContainerWithDecisionMetadata) GetTitle() string {
	if m == nil {
		return ""
	}
	return m.Title
}

func (m *MediaContainerWithDecisionMetadata) GetType() string {
	if m == nil {
		return ""
	}
	return m.Type
}

func (m *MediaContainerWithDecisionMetadata) GetAbsoluteIndex() *int {
	if m == nil {
		return nil
	}
	return m.AbsoluteIndex
}

func (m *MediaContainerWithDecisionMetadata) GetAddedAt() int64 {
	if m == nil {
		return 0
	}
	return m.AddedAt
}

func (m *MediaContainerWithDecisionMetadata) GetArt() *string {
	if m == nil {
		return nil
	}
	return m.Art
}

func (m *MediaContainerWithDecisionMetadata) GetAudienceRating() *float32 {
	if m == nil {
		return nil
	}
	return m.AudienceRating
}

func (m *MediaContainerWithDecisionMetadata) GetAudienceRatingImage() *string {
	if m == nil {
		return nil
	}
	return m.AudienceRatingImage
}

func (m *MediaContainerWithDecisionMetadata) GetAutotag() []Tag {
	if m == nil {
		return nil
	}
	return m.Autotag
}

func (m *MediaContainerWithDecisionMetadata) GetBanner() *string {
	if m == nil {
		return nil
	}
	return m.Banner
}

func (m *MediaContainerWithDecisionMetadata) GetChapterSource() *string {
	if m == nil {
		return nil
	}
	return m.ChapterSource
}

func (m *MediaContainerWithDecisionMetadata) GetChildCount() *int {
	if m == nil {
		return nil
	}
	return m.ChildCount
}

func (m *MediaContainerWithDecisionMetadata) GetComposite() *string {
	if m == nil {
		return nil
	}
	return m.Composite
}

func (m *MediaContainerWithDecisionMetadata) GetContentRating() *string {
	if m == nil {
		return nil
	}
	return m.ContentRating
}

func (m *MediaContainerWithDecisionMetadata) GetCountry() []Tag {
	if m == nil {
		return nil
	}
	return m.Country
}

func (m *MediaContainerWithDecisionMetadata) GetDirector() []Tag {
	if m == nil {
		return nil
	}
	return m.Director
}

func (m *MediaContainerWithDecisionMetadata) GetDuration() *int {
	if m == nil {
		return nil
	}
	return m.Duration
}

func (m *MediaContainerWithDecisionMetadata) GetFilter() []Filter {
	if m == nil {
		return nil
	}
	return m.Filter
}

func (m *MediaContainerWithDecisionMetadata) GetGenre() []Tag {
	if m == nil {
		return nil
	}
	return m.Genre
}

func (m *MediaContainerWithDecisionMetadata) GetGrandparentArt() *string {
	if m == nil {
		return nil
	}
	return m.GrandparentArt
}

func (m *MediaContainerWithDecisionMetadata) GetGrandparentGUID() *string {
	if m == nil {
		return nil
	}
	return m.GrandparentGUID
}

func (m *MediaContainerWithDecisionMetadata) GetGrandparentHero() *string {
	if m == nil {
		return nil
	}
	return m.GrandparentHero
}

func (m *MediaContainerWithDecisionMetadata) GetGrandparentKey() *string {
	if m == nil {
		return nil
	}
	return m.GrandparentKey
}

func (m *MediaContainerWithDecisionMetadata) GetGrandparentRatingKey() *string {
	if m == nil {
		return nil
	}
	return m.GrandparentRatingKey
}

func (m *MediaContainerWithDecisionMetadata) GetGrandparentTheme() *string {
	if m == nil {
		return nil
	}
	return m.GrandparentTheme
}

func (m *MediaContainerWithDecisionMetadata) GetGrandparentThumb() *string {
	if m == nil {
		return nil
	}
	return m.GrandparentThumb
}

func (m *MediaContainerWithDecisionMetadata) GetGrandparentTitle() *string {
	if m == nil {
		return nil
	}
	return m.GrandparentTitle
}

func (m *MediaContainerWithDecisionMetadata) GetGUID() *string {
	if m == nil {
		return nil
	}
	return m.GUID
}

func (m *MediaContainerWithDecisionMetadata) GetGuids() []MediaContainerWithDecisionGuids {
	if m == nil {
		return nil
	}
	return m.Guids
}

func (m *MediaContainerWithDecisionMetadata) GetHero() *string {
	if m == nil {
		return nil
	}
	return m.Hero
}

func (m *MediaContainerWithDecisionMetadata) GetImage() []Image {
	if m == nil {
		return nil
	}
	return m.Image
}

func (m *MediaContainerWithDecisionMetadata) GetIndex() *int {
	if m == nil {
		return nil
	}
	return m.Index
}

func (m *MediaContainerWithDecisionMetadata) GetKey() string {
	if m == nil {
		return ""
	}
	return m.Key
}

func (m *MediaContainerWithDecisionMetadata) GetLastViewedAt() *int64 {
	if m == nil {
		return nil
	}
	return m.LastViewedAt
}

func (m *MediaContainerWithDecisionMetadata) GetLeafCount() *int {
	if m == nil {
		return nil
	}
	return m.LeafCount
}

func (m *MediaContainerWithDecisionMetadata) GetMedia() []MediaContainerWithDecisionMedia {
	if m == nil {
		return nil
	}
	return m.Media
}

func (m *MediaContainerWithDecisionMetadata) GetOriginallyAvailableAt() *types.Date {
	if m == nil {
		return nil
	}
	return m.OriginallyAvailableAt
}

func (m *MediaContainerWithDecisionMetadata) GetOriginalTitle() *string {
	if m == nil {
		return nil
	}
	return m.OriginalTitle
}

func (m *MediaContainerWithDecisionMetadata) GetParentGUID() *string {
	if m == nil {
		return nil
	}
	return m.ParentGUID
}

func (m *MediaContainerWithDecisionMetadata) GetParentHero() *string {
	if m == nil {
		return nil
	}
	return m.ParentHero
}

func (m *MediaContainerWithDecisionMetadata) GetParentIndex() *int {
	if m == nil {
		return nil
	}
	return m.ParentIndex
}

func (m *MediaContainerWithDecisionMetadata) GetParentKey() *string {
	if m == nil {
		return nil
	}
	return m.ParentKey
}

func (m *MediaContainerWithDecisionMetadata) GetParentRatingKey() *string {
	if m == nil {
		return nil
	}
	return m.ParentRatingKey
}

func (m *MediaContainerWithDecisionMetadata) GetParentThumb() *string {
	if m == nil {
		return nil
	}
	return m.ParentThumb
}

func (m *MediaContainerWithDecisionMetadata) GetParentTitle() *string {
	if m == nil {
		return nil
	}
	return m.ParentTitle
}

func (m *MediaContainerWithDecisionMetadata) GetPrimaryExtraKey() *string {
	if m == nil {
		return nil
	}
	return m.PrimaryExtraKey
}

func (m *MediaContainerWithDecisionMetadata) GetPrompt() *string {
	if m == nil {
		return nil
	}
	return m.Prompt
}

func (m *MediaContainerWithDecisionMetadata) GetRating() *float32 {
	if m == nil {
		return nil
	}
	return m.Rating
}

func (m *MediaContainerWithDecisionMetadata) GetRatingArray() []Tag {
	if m == nil {
		return nil
	}
	return m.RatingArray
}

func (m *MediaContainerWithDecisionMetadata) GetRatingCount() *int {
	if m == nil {
		return nil
	}
	return m.RatingCount
}

func (m *MediaContainerWithDecisionMetadata) GetRatingImage() *string {
	if m == nil {
		return nil
	}
	return m.RatingImage
}

func (m *MediaContainerWithDecisionMetadata) GetRatingKey() *string {
	if m == nil {
		return nil
	}
	return m.RatingKey
}

func (m *MediaContainerWithDecisionMetadata) GetRole() []Tag {
	if m == nil {
		return nil
	}
	return m.Role
}

func (m *MediaContainerWithDecisionMetadata) GetSearch() *bool {
	if m == nil {
		return nil
	}
	return m.Search
}

func (m *MediaContainerWithDecisionMetadata) GetSecondary() *bool {
	if m == nil {
		return nil
	}
	return m.Secondary
}

func (m *MediaContainerWithDecisionMetadata) GetSkipChildren() *bool {
	if m == nil {
		return nil
	}
	return m.SkipChildren
}

func (m *MediaContainerWithDecisionMetadata) GetSkipParent() *bool {
	if m == nil {
		return nil
	}
	return m.SkipParent
}

func (m *MediaContainerWithDecisionMetadata) GetSort() []Sort {
	if m == nil {
		return nil
	}
	return m.Sort
}

func (m *MediaContainerWithDecisionMetadata) GetStudio() *string {
	if m == nil {
		return nil
	}
	return m.Studio
}

func (m *MediaContainerWithDecisionMetadata) GetSubtype() *string {
	if m == nil {
		return nil
	}
	return m.Subtype
}

func (m *MediaContainerWithDecisionMetadata) GetSummary() *string {
	if m == nil {
		return nil
	}
	return m.Summary
}

func (m *MediaContainerWithDecisionMetadata) GetTagline() *string {
	if m == nil {
		return nil
	}
	return m.Tagline
}

func (m *MediaContainerWithDecisionMetadata) GetTheme() *string {
	if m == nil {
		return nil
	}
	return m.Theme
}

func (m *MediaContainerWithDecisionMetadata) GetThumb() *string {
	if m == nil {
		return nil
	}
	return m.Thumb
}

func (m *MediaContainerWithDecisionMetadata) GetTitleSort() *string {
	if m == nil {
		return nil
	}
	return m.TitleSort
}

func (m *MediaContainerWithDecisionMetadata) GetUpdatedAt() *int64 {
	if m == nil {
		return nil
	}
	return m.UpdatedAt
}

func (m *MediaContainerWithDecisionMetadata) GetUserRating() *float32 {
	if m == nil {
		return nil
	}
	return m.UserRating
}

func (m *MediaContainerWithDecisionMetadata) GetViewCount() *int {
	if m == nil {
		return nil
	}
	return m.ViewCount
}

func (m *MediaContainerWithDecisionMetadata) GetViewedLeafCount() *int {
	if m == nil {
		return nil
	}
	return m.ViewedLeafCount
}

func (m *MediaContainerWithDecisionMetadata) GetViewOffset() *int {
	if m == nil {
		return nil
	}
	return m.ViewOffset
}

func (m *MediaContainerWithDecisionMetadata) GetWriter() []Tag {
	if m == nil {
		return nil
	}
	return m.Writer
}

func (m *MediaContainerWithDecisionMetadata) GetYear() *int {
	if m == nil {
		return nil
	}
	return m.Year
}

func (m *MediaContainerWithDecisionMetadata) GetAdditionalProperties() map[string]any {
	if m == nil {
		return nil
	}
	return m.AdditionalProperties
}

// MediaContainerWithDecisionMediaContainer - `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
// Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
// The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
type MediaContainerWithDecisionMediaContainer struct {
	Identifier *string `json:"identifier,omitempty"`
	// The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
	//
	Offset *int64 `json:"offset,omitempty"`
	Size   *int64 `json:"size,omitempty"`
	// The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
	//
	TotalSize *int64 `json:"totalSize,omitempty"`
	// The maximum available bitrate when the decision was rendered.
	AvailableBandwidth     *int64  `json:"availableBandwidth,omitempty"`
	DirectPlayDecisionCode *int64  `json:"directPlayDecisionCode,omitempty"`
	DirectPlayDecisionText *string `json:"directPlayDecisionText,omitempty"`
	// The overall decision. 1xxx are playback can succeed, 2xxx are a general error (such as insufficient bandwidth), 3xxx are errors in direct play, and 4xxx are errors in transcodes. Same codes are used in all.
	GeneralDecisionCode *int64  `json:"generalDecisionCode,omitempty"`
	GeneralDecisionText *string `json:"generalDecisionText,omitempty"`
	// The code indicating the status of evaluation of playback when client indicates `hasMDE=1`
	MdeDecisionCode *int64 `json:"mdeDecisionCode,omitempty"`
	// Descriptive text for the above code
	MdeDecisionText       *string                              `json:"mdeDecisionText,omitempty"`
	Metadata              []MediaContainerWithDecisionMetadata `json:"Metadata,omitempty"`
	TranscodeDecisionCode *int64                               `json:"transcodeDecisionCode,omitempty"`
	TranscodeDecisionText *string                              `json:"transcodeDecisionText,omitempty"`
}

func (m *MediaContainerWithDecisionMediaContainer) GetIdentifier() *string {
	if m == nil {
		return nil
	}
	return m.Identifier
}

func (m *MediaContainerWithDecisionMediaContainer) GetOffset() *int64 {
	if m == nil {
		return nil
	}
	return m.Offset
}

func (m *MediaContainerWithDecisionMediaContainer) GetSize() *int64 {
	if m == nil {
		return nil
	}
	return m.Size
}

func (m *MediaContainerWithDecisionMediaContainer) GetTotalSize() *int64 {
	if m == nil {
		return nil
	}
	return m.TotalSize
}

func (m *MediaContainerWithDecisionMediaContainer) GetAvailableBandwidth() *int64 {
	if m == nil {
		return nil
	}
	return m.AvailableBandwidth
}

func (m *MediaContainerWithDecisionMediaContainer) GetDirectPlayDecisionCode() *int64 {
	if m == nil {
		return nil
	}
	return m.DirectPlayDecisionCode
}

func (m *MediaContainerWithDecisionMediaContainer) GetDirectPlayDecisionText() *string {
	if m == nil {
		return nil
	}
	return m.DirectPlayDecisionText
}

func (m *MediaContainerWithDecisionMediaContainer) GetGeneralDecisionCode() *int64 {
	if m == nil {
		return nil
	}
	return m.GeneralDecisionCode
}

func (m *MediaContainerWithDecisionMediaContainer) GetGeneralDecisionText() *string {
	if m == nil {
		return nil
	}
	return m.GeneralDecisionText
}

func (m *MediaContainerWithDecisionMediaContainer) GetMdeDecisionCode() *int64 {
	if m == nil {
		return nil
	}
	return m.MdeDecisionCode
}

func (m *MediaContainerWithDecisionMediaContainer) GetMdeDecisionText() *string {
	if m == nil {
		return nil
	}
	return m.MdeDecisionText
}

func (m *MediaContainerWithDecisionMediaContainer) GetMetadata() []MediaContainerWithDecisionMetadata {
	if m == nil {
		return nil
	}
	return m.Metadata
}

func (m *MediaContainerWithDecisionMediaContainer) GetTranscodeDecisionCode() *int64 {
	if m == nil {
		return nil
	}
	return m.TranscodeDecisionCode
}

func (m *MediaContainerWithDecisionMediaContainer) GetTranscodeDecisionText() *string {
	if m == nil {
		return nil
	}
	return m.TranscodeDecisionText
}

// MediaContainerWithDecision - `MediaContainer` is commonly found as the root of a response and is a pretty generic container. Common attributes include `identifier` and things related to paging (`offset`, `size`, `totalSize`).
//
// It is also common for a `MediaContainer` to contain attributes "hoisted" from its children. If every element in the container would have had the same attribute, then that attribute can be present on the container instead of being repeated on every element. For example, an album's list of tracks might include `parentTitle` on the container since all of the tracks have the same album title. A container may have a `source` attribute when all of the items came from the same source. Generally speaking, when looking for an attribute on an item, if the attribute wasn't found then the container should be checked for that attribute as well.
type MediaContainerWithDecision struct {
	MediaContainer *MediaContainerWithDecisionMediaContainer `json:"MediaContainer,omitempty"`
}

func (m *MediaContainerWithDecision) GetMediaContainer() *MediaContainerWithDecisionMediaContainer {
	if m == nil {
		return nil
	}
	return m.MediaContainer
}
