Files
plexgo/models/operations/getmediametadata.go

2232 lines
50 KiB
Go

// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"encoding/json"
"errors"
"fmt"
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/types"
"net/http"
)
type GetMediaMetaDataRequest struct {
// the id of the library item to return the children of.
RatingKey int64 `pathParam:"style=simple,explode=false,name=ratingKey"`
// Include concerts data if set to true.
IncludeConcerts *bool `queryParam:"style=form,explode=true,name=includeConcerts"`
// Include extra content (e.g. bonus features).
IncludeExtras *bool `queryParam:"style=form,explode=true,name=includeExtras"`
// Include on-deck items.
IncludeOnDeck *bool `queryParam:"style=form,explode=true,name=includeOnDeck"`
// Include popular leaves (episodes/chapters).
IncludePopularLeaves *bool `queryParam:"style=form,explode=true,name=includePopularLeaves"`
// Include preferences information.
IncludePreferences *bool `queryParam:"style=form,explode=true,name=includePreferences"`
// Include reviews for the content.
IncludeReviews *bool `queryParam:"style=form,explode=true,name=includeReviews"`
// Include chapter details.
IncludeChapters *bool `queryParam:"style=form,explode=true,name=includeChapters"`
// Include station data.
IncludeStations *bool `queryParam:"style=form,explode=true,name=includeStations"`
// Include external media data.
IncludeExternalMedia *bool `queryParam:"style=form,explode=true,name=includeExternalMedia"`
// Trigger asynchronous metadata augmentation.
AsyncAugmentMetadata *bool `queryParam:"style=form,explode=true,name=asyncAugmentMetadata"`
// Trigger asynchronous file checking.
AsyncCheckFiles *bool `queryParam:"style=form,explode=true,name=asyncCheckFiles"`
// Trigger asynchronous refresh of analysis.
AsyncRefreshAnalysis *bool `queryParam:"style=form,explode=true,name=asyncRefreshAnalysis"`
// Trigger asynchronous refresh of the local media agent.
AsyncRefreshLocalMediaAgent *bool `queryParam:"style=form,explode=true,name=asyncRefreshLocalMediaAgent"`
}
func (o *GetMediaMetaDataRequest) GetRatingKey() int64 {
if o == nil {
return 0
}
return o.RatingKey
}
func (o *GetMediaMetaDataRequest) GetIncludeConcerts() *bool {
if o == nil {
return nil
}
return o.IncludeConcerts
}
func (o *GetMediaMetaDataRequest) GetIncludeExtras() *bool {
if o == nil {
return nil
}
return o.IncludeExtras
}
func (o *GetMediaMetaDataRequest) GetIncludeOnDeck() *bool {
if o == nil {
return nil
}
return o.IncludeOnDeck
}
func (o *GetMediaMetaDataRequest) GetIncludePopularLeaves() *bool {
if o == nil {
return nil
}
return o.IncludePopularLeaves
}
func (o *GetMediaMetaDataRequest) GetIncludePreferences() *bool {
if o == nil {
return nil
}
return o.IncludePreferences
}
func (o *GetMediaMetaDataRequest) GetIncludeReviews() *bool {
if o == nil {
return nil
}
return o.IncludeReviews
}
func (o *GetMediaMetaDataRequest) GetIncludeChapters() *bool {
if o == nil {
return nil
}
return o.IncludeChapters
}
func (o *GetMediaMetaDataRequest) GetIncludeStations() *bool {
if o == nil {
return nil
}
return o.IncludeStations
}
func (o *GetMediaMetaDataRequest) GetIncludeExternalMedia() *bool {
if o == nil {
return nil
}
return o.IncludeExternalMedia
}
func (o *GetMediaMetaDataRequest) GetAsyncAugmentMetadata() *bool {
if o == nil {
return nil
}
return o.AsyncAugmentMetadata
}
func (o *GetMediaMetaDataRequest) GetAsyncCheckFiles() *bool {
if o == nil {
return nil
}
return o.AsyncCheckFiles
}
func (o *GetMediaMetaDataRequest) GetAsyncRefreshAnalysis() *bool {
if o == nil {
return nil
}
return o.AsyncRefreshAnalysis
}
func (o *GetMediaMetaDataRequest) GetAsyncRefreshLocalMediaAgent() *bool {
if o == nil {
return nil
}
return o.AsyncRefreshLocalMediaAgent
}
type OptimizedForStreaming1 int
const (
OptimizedForStreaming1Zero OptimizedForStreaming1 = 0
OptimizedForStreaming1One OptimizedForStreaming1 = 1
)
func (e OptimizedForStreaming1) ToPointer() *OptimizedForStreaming1 {
return &e
}
func (e *OptimizedForStreaming1) UnmarshalJSON(data []byte) error {
var v int
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case 0:
fallthrough
case 1:
*e = OptimizedForStreaming1(v)
return nil
default:
return fmt.Errorf("invalid value for OptimizedForStreaming1: %v", v)
}
}
type GetMediaMetaDataOptimizedForStreamingType string
const (
GetMediaMetaDataOptimizedForStreamingTypeOptimizedForStreaming1 GetMediaMetaDataOptimizedForStreamingType = "optimizedForStreaming_1"
GetMediaMetaDataOptimizedForStreamingTypeBoolean GetMediaMetaDataOptimizedForStreamingType = "boolean"
)
// GetMediaMetaDataOptimizedForStreaming - Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
type GetMediaMetaDataOptimizedForStreaming struct {
OptimizedForStreaming1 *OptimizedForStreaming1 `queryParam:"inline"`
Boolean *bool `queryParam:"inline"`
Type GetMediaMetaDataOptimizedForStreamingType
}
func CreateGetMediaMetaDataOptimizedForStreamingOptimizedForStreaming1(optimizedForStreaming1 OptimizedForStreaming1) GetMediaMetaDataOptimizedForStreaming {
typ := GetMediaMetaDataOptimizedForStreamingTypeOptimizedForStreaming1
return GetMediaMetaDataOptimizedForStreaming{
OptimizedForStreaming1: &optimizedForStreaming1,
Type: typ,
}
}
func CreateGetMediaMetaDataOptimizedForStreamingBoolean(boolean bool) GetMediaMetaDataOptimizedForStreaming {
typ := GetMediaMetaDataOptimizedForStreamingTypeBoolean
return GetMediaMetaDataOptimizedForStreaming{
Boolean: &boolean,
Type: typ,
}
}
func (u *GetMediaMetaDataOptimizedForStreaming) UnmarshalJSON(data []byte) error {
var optimizedForStreaming1 OptimizedForStreaming1 = OptimizedForStreaming1(0)
if err := utils.UnmarshalJSON(data, &optimizedForStreaming1, "", true, true); err == nil {
u.OptimizedForStreaming1 = &optimizedForStreaming1
u.Type = GetMediaMetaDataOptimizedForStreamingTypeOptimizedForStreaming1
return nil
}
var boolean bool = false
if err := utils.UnmarshalJSON(data, &boolean, "", true, true); err == nil {
u.Boolean = &boolean
u.Type = GetMediaMetaDataOptimizedForStreamingTypeBoolean
return nil
}
return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetMediaMetaDataOptimizedForStreaming", string(data))
}
func (u GetMediaMetaDataOptimizedForStreaming) MarshalJSON() ([]byte, error) {
if u.OptimizedForStreaming1 != nil {
return utils.MarshalJSON(u.OptimizedForStreaming1, "", true)
}
if u.Boolean != nil {
return utils.MarshalJSON(u.Boolean, "", true)
}
return nil, errors.New("could not marshal union type GetMediaMetaDataOptimizedForStreaming: all fields are null")
}
type GetMediaMetaDataOptimizedForStreaming1 int
const (
GetMediaMetaDataOptimizedForStreaming1Zero GetMediaMetaDataOptimizedForStreaming1 = 0
GetMediaMetaDataOptimizedForStreaming1One GetMediaMetaDataOptimizedForStreaming1 = 1
)
func (e GetMediaMetaDataOptimizedForStreaming1) ToPointer() *GetMediaMetaDataOptimizedForStreaming1 {
return &e
}
func (e *GetMediaMetaDataOptimizedForStreaming1) UnmarshalJSON(data []byte) error {
var v int
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case 0:
fallthrough
case 1:
*e = GetMediaMetaDataOptimizedForStreaming1(v)
return nil
default:
return fmt.Errorf("invalid value for GetMediaMetaDataOptimizedForStreaming1: %v", v)
}
}
type GetMediaMetaDataLibraryOptimizedForStreamingType string
const (
GetMediaMetaDataLibraryOptimizedForStreamingTypeGetMediaMetaDataOptimizedForStreaming1 GetMediaMetaDataLibraryOptimizedForStreamingType = "get-media-meta-data_optimizedForStreaming_1"
GetMediaMetaDataLibraryOptimizedForStreamingTypeBoolean GetMediaMetaDataLibraryOptimizedForStreamingType = "boolean"
)
// GetMediaMetaDataLibraryOptimizedForStreaming - Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
type GetMediaMetaDataLibraryOptimizedForStreaming struct {
GetMediaMetaDataOptimizedForStreaming1 *GetMediaMetaDataOptimizedForStreaming1 `queryParam:"inline"`
Boolean *bool `queryParam:"inline"`
Type GetMediaMetaDataLibraryOptimizedForStreamingType
}
func CreateGetMediaMetaDataLibraryOptimizedForStreamingGetMediaMetaDataOptimizedForStreaming1(getMediaMetaDataOptimizedForStreaming1 GetMediaMetaDataOptimizedForStreaming1) GetMediaMetaDataLibraryOptimizedForStreaming {
typ := GetMediaMetaDataLibraryOptimizedForStreamingTypeGetMediaMetaDataOptimizedForStreaming1
return GetMediaMetaDataLibraryOptimizedForStreaming{
GetMediaMetaDataOptimizedForStreaming1: &getMediaMetaDataOptimizedForStreaming1,
Type: typ,
}
}
func CreateGetMediaMetaDataLibraryOptimizedForStreamingBoolean(boolean bool) GetMediaMetaDataLibraryOptimizedForStreaming {
typ := GetMediaMetaDataLibraryOptimizedForStreamingTypeBoolean
return GetMediaMetaDataLibraryOptimizedForStreaming{
Boolean: &boolean,
Type: typ,
}
}
func (u *GetMediaMetaDataLibraryOptimizedForStreaming) UnmarshalJSON(data []byte) error {
var getMediaMetaDataOptimizedForStreaming1 GetMediaMetaDataOptimizedForStreaming1 = GetMediaMetaDataOptimizedForStreaming1(0)
if err := utils.UnmarshalJSON(data, &getMediaMetaDataOptimizedForStreaming1, "", true, true); err == nil {
u.GetMediaMetaDataOptimizedForStreaming1 = &getMediaMetaDataOptimizedForStreaming1
u.Type = GetMediaMetaDataLibraryOptimizedForStreamingTypeGetMediaMetaDataOptimizedForStreaming1
return nil
}
var boolean bool = false
if err := utils.UnmarshalJSON(data, &boolean, "", true, true); err == nil {
u.Boolean = &boolean
u.Type = GetMediaMetaDataLibraryOptimizedForStreamingTypeBoolean
return nil
}
return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetMediaMetaDataLibraryOptimizedForStreaming", string(data))
}
func (u GetMediaMetaDataLibraryOptimizedForStreaming) MarshalJSON() ([]byte, error) {
if u.GetMediaMetaDataOptimizedForStreaming1 != nil {
return utils.MarshalJSON(u.GetMediaMetaDataOptimizedForStreaming1, "", true)
}
if u.Boolean != nil {
return utils.MarshalJSON(u.Boolean, "", true)
}
return nil, errors.New("could not marshal union type GetMediaMetaDataLibraryOptimizedForStreaming: all fields are null")
}
// GetMediaMetaDataHasThumbnail - Indicates if the part has a thumbnail.
type GetMediaMetaDataHasThumbnail string
const (
GetMediaMetaDataHasThumbnailFalse GetMediaMetaDataHasThumbnail = "0"
GetMediaMetaDataHasThumbnailTrue GetMediaMetaDataHasThumbnail = "1"
)
func (e GetMediaMetaDataHasThumbnail) ToPointer() *GetMediaMetaDataHasThumbnail {
return &e
}
func (e *GetMediaMetaDataHasThumbnail) UnmarshalJSON(data []byte) error {
var v string
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case "0":
fallthrough
case "1":
*e = GetMediaMetaDataHasThumbnail(v)
return nil
default:
return fmt.Errorf("invalid value for GetMediaMetaDataHasThumbnail: %v", v)
}
}
type GetMediaMetaDataStream struct {
// Unique stream identifier.
ID int64 `json:"id"`
// Stream type (1=video, 2=audio, 3=subtitle).
StreamType int `json:"streamType"`
// Indicates if this stream is default.
Default *bool `json:"default,omitempty"`
// Codec used by the stream.
Codec string `json:"codec"`
// Index of the stream.
Index int `json:"index"`
// Bitrate of the stream.
Bitrate *int `json:"bitrate,omitempty"`
// Language of the stream.
Language string `json:"language"`
// Language tag (e.g., en).
LanguageTag string `json:"languageTag"`
// ISO language code.
LanguageCode string `json:"languageCode"`
// Indicates whether header compression is enabled.
HeaderCompression *bool `json:"headerCompression,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"`
// Bit depth of the video stream.
BitDepth *int `json:"bitDepth,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"`
// 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"`
// Frame rate of the stream.
FrameRate *float32 `json:"frameRate,omitempty"`
// Height of the video stream.
Height *int `json:"height,omitempty"`
// Video level.
Level *int `json:"level,omitempty"`
// Indicates if this is the original stream.
Original *bool `json:"original,omitempty"`
HasScalingMatrix *bool `json:"hasScalingMatrix,omitempty"`
// Video profile.
Profile *string `json:"profile,omitempty"`
ScanType *string `json:"scanType,omitempty"`
// Number of reference frames.
RefFrames *int `json:"refFrames,omitempty"`
// Width of the video stream.
Width *int `json:"width,omitempty"`
// Display title for the stream.
DisplayTitle string `json:"displayTitle"`
// Extended display title for the stream.
ExtendedDisplayTitle string `json:"extendedDisplayTitle"`
// Indicates if this stream is selected (applicable for audio streams).
Selected *bool `json:"selected,omitempty"`
Forced *bool `json:"forced,omitempty"`
// Number of audio channels (for audio streams).
Channels *int `json:"channels,omitempty"`
// Audio channel layout.
AudioChannelLayout *string `json:"audioChannelLayout,omitempty"`
// Sampling rate for the audio stream.
SamplingRate *int `json:"samplingRate,omitempty"`
// Indicates if the stream can auto-sync.
CanAutoSync *bool `json:"canAutoSync,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"`
}
func (o *GetMediaMetaDataStream) GetID() int64 {
if o == nil {
return 0
}
return o.ID
}
func (o *GetMediaMetaDataStream) GetStreamType() int {
if o == nil {
return 0
}
return o.StreamType
}
func (o *GetMediaMetaDataStream) GetDefault() *bool {
if o == nil {
return nil
}
return o.Default
}
func (o *GetMediaMetaDataStream) GetCodec() string {
if o == nil {
return ""
}
return o.Codec
}
func (o *GetMediaMetaDataStream) GetIndex() int {
if o == nil {
return 0
}
return o.Index
}
func (o *GetMediaMetaDataStream) GetBitrate() *int {
if o == nil {
return nil
}
return o.Bitrate
}
func (o *GetMediaMetaDataStream) GetLanguage() string {
if o == nil {
return ""
}
return o.Language
}
func (o *GetMediaMetaDataStream) GetLanguageTag() string {
if o == nil {
return ""
}
return o.LanguageTag
}
func (o *GetMediaMetaDataStream) GetLanguageCode() string {
if o == nil {
return ""
}
return o.LanguageCode
}
func (o *GetMediaMetaDataStream) GetHeaderCompression() *bool {
if o == nil {
return nil
}
return o.HeaderCompression
}
func (o *GetMediaMetaDataStream) GetDOVIBLCompatID() *int {
if o == nil {
return nil
}
return o.DOVIBLCompatID
}
func (o *GetMediaMetaDataStream) GetDOVIBLPresent() *bool {
if o == nil {
return nil
}
return o.DOVIBLPresent
}
func (o *GetMediaMetaDataStream) GetDOVIELPresent() *bool {
if o == nil {
return nil
}
return o.DOVIELPresent
}
func (o *GetMediaMetaDataStream) GetDOVILevel() *int {
if o == nil {
return nil
}
return o.DOVILevel
}
func (o *GetMediaMetaDataStream) GetDOVIPresent() *bool {
if o == nil {
return nil
}
return o.DOVIPresent
}
func (o *GetMediaMetaDataStream) GetDOVIProfile() *int {
if o == nil {
return nil
}
return o.DOVIProfile
}
func (o *GetMediaMetaDataStream) GetDOVIRPUPresent() *bool {
if o == nil {
return nil
}
return o.DOVIRPUPresent
}
func (o *GetMediaMetaDataStream) GetDOVIVersion() *string {
if o == nil {
return nil
}
return o.DOVIVersion
}
func (o *GetMediaMetaDataStream) GetBitDepth() *int {
if o == nil {
return nil
}
return o.BitDepth
}
func (o *GetMediaMetaDataStream) GetChromaLocation() *string {
if o == nil {
return nil
}
return o.ChromaLocation
}
func (o *GetMediaMetaDataStream) GetChromaSubsampling() *string {
if o == nil {
return nil
}
return o.ChromaSubsampling
}
func (o *GetMediaMetaDataStream) GetCodedHeight() *int {
if o == nil {
return nil
}
return o.CodedHeight
}
func (o *GetMediaMetaDataStream) GetCodedWidth() *int {
if o == nil {
return nil
}
return o.CodedWidth
}
func (o *GetMediaMetaDataStream) GetColorPrimaries() *string {
if o == nil {
return nil
}
return o.ColorPrimaries
}
func (o *GetMediaMetaDataStream) GetColorRange() *string {
if o == nil {
return nil
}
return o.ColorRange
}
func (o *GetMediaMetaDataStream) GetColorSpace() *string {
if o == nil {
return nil
}
return o.ColorSpace
}
func (o *GetMediaMetaDataStream) GetColorTrc() *string {
if o == nil {
return nil
}
return o.ColorTrc
}
func (o *GetMediaMetaDataStream) GetFrameRate() *float32 {
if o == nil {
return nil
}
return o.FrameRate
}
func (o *GetMediaMetaDataStream) GetHeight() *int {
if o == nil {
return nil
}
return o.Height
}
func (o *GetMediaMetaDataStream) GetLevel() *int {
if o == nil {
return nil
}
return o.Level
}
func (o *GetMediaMetaDataStream) GetOriginal() *bool {
if o == nil {
return nil
}
return o.Original
}
func (o *GetMediaMetaDataStream) GetHasScalingMatrix() *bool {
if o == nil {
return nil
}
return o.HasScalingMatrix
}
func (o *GetMediaMetaDataStream) GetProfile() *string {
if o == nil {
return nil
}
return o.Profile
}
func (o *GetMediaMetaDataStream) GetScanType() *string {
if o == nil {
return nil
}
return o.ScanType
}
func (o *GetMediaMetaDataStream) GetRefFrames() *int {
if o == nil {
return nil
}
return o.RefFrames
}
func (o *GetMediaMetaDataStream) GetWidth() *int {
if o == nil {
return nil
}
return o.Width
}
func (o *GetMediaMetaDataStream) GetDisplayTitle() string {
if o == nil {
return ""
}
return o.DisplayTitle
}
func (o *GetMediaMetaDataStream) GetExtendedDisplayTitle() string {
if o == nil {
return ""
}
return o.ExtendedDisplayTitle
}
func (o *GetMediaMetaDataStream) GetSelected() *bool {
if o == nil {
return nil
}
return o.Selected
}
func (o *GetMediaMetaDataStream) GetForced() *bool {
if o == nil {
return nil
}
return o.Forced
}
func (o *GetMediaMetaDataStream) GetChannels() *int {
if o == nil {
return nil
}
return o.Channels
}
func (o *GetMediaMetaDataStream) GetAudioChannelLayout() *string {
if o == nil {
return nil
}
return o.AudioChannelLayout
}
func (o *GetMediaMetaDataStream) GetSamplingRate() *int {
if o == nil {
return nil
}
return o.SamplingRate
}
func (o *GetMediaMetaDataStream) GetCanAutoSync() *bool {
if o == nil {
return nil
}
return o.CanAutoSync
}
func (o *GetMediaMetaDataStream) GetHearingImpaired() *bool {
if o == nil {
return nil
}
return o.HearingImpaired
}
func (o *GetMediaMetaDataStream) GetDub() *bool {
if o == nil {
return nil
}
return o.Dub
}
func (o *GetMediaMetaDataStream) GetTitle() *string {
if o == nil {
return nil
}
return o.Title
}
type GetMediaMetaDataPart struct {
// Indicates if the part is accessible.
Accessible *bool `json:"accessible,omitempty"`
// Indicates if the part exists.
Exists *bool `json:"exists,omitempty"`
// Unique part identifier.
ID int64 `json:"id"`
// Key to access this part.
Key string `json:"key"`
Indexes *string `json:"indexes,omitempty"`
// Duration of the part in milliseconds.
Duration *int `json:"duration,omitempty"`
// File path for the part.
File string `json:"file"`
// File size in bytes.
Size int64 `json:"size"`
PacketLength *int `json:"packetLength,omitempty"`
// Container format of the part.
Container *string `json:"container,omitempty"`
// Video profile for the part.
VideoProfile *string `json:"videoProfile,omitempty"`
// The audio profile used for the media (e.g., DTS, Dolby Digital, etc.).
AudioProfile *string `json:"audioProfile,omitempty"`
Has64bitOffsets *bool `json:"has64bitOffsets,omitempty"`
// Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
OptimizedForStreaming *GetMediaMetaDataLibraryOptimizedForStreaming `json:"optimizedForStreaming,omitempty"`
HasThumbnail *GetMediaMetaDataHasThumbnail `default:"0" json:"hasThumbnail"`
// An array of streams for this part.
Stream []GetMediaMetaDataStream `json:"Stream,omitempty"`
}
func (g GetMediaMetaDataPart) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(g, "", false)
}
func (g *GetMediaMetaDataPart) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &g, "", false, false); err != nil {
return err
}
return nil
}
func (o *GetMediaMetaDataPart) GetAccessible() *bool {
if o == nil {
return nil
}
return o.Accessible
}
func (o *GetMediaMetaDataPart) GetExists() *bool {
if o == nil {
return nil
}
return o.Exists
}
func (o *GetMediaMetaDataPart) GetID() int64 {
if o == nil {
return 0
}
return o.ID
}
func (o *GetMediaMetaDataPart) GetKey() string {
if o == nil {
return ""
}
return o.Key
}
func (o *GetMediaMetaDataPart) GetIndexes() *string {
if o == nil {
return nil
}
return o.Indexes
}
func (o *GetMediaMetaDataPart) GetDuration() *int {
if o == nil {
return nil
}
return o.Duration
}
func (o *GetMediaMetaDataPart) GetFile() string {
if o == nil {
return ""
}
return o.File
}
func (o *GetMediaMetaDataPart) GetSize() int64 {
if o == nil {
return 0
}
return o.Size
}
func (o *GetMediaMetaDataPart) GetPacketLength() *int {
if o == nil {
return nil
}
return o.PacketLength
}
func (o *GetMediaMetaDataPart) GetContainer() *string {
if o == nil {
return nil
}
return o.Container
}
func (o *GetMediaMetaDataPart) GetVideoProfile() *string {
if o == nil {
return nil
}
return o.VideoProfile
}
func (o *GetMediaMetaDataPart) GetAudioProfile() *string {
if o == nil {
return nil
}
return o.AudioProfile
}
func (o *GetMediaMetaDataPart) GetHas64bitOffsets() *bool {
if o == nil {
return nil
}
return o.Has64bitOffsets
}
func (o *GetMediaMetaDataPart) GetOptimizedForStreaming() *GetMediaMetaDataLibraryOptimizedForStreaming {
if o == nil {
return nil
}
return o.OptimizedForStreaming
}
func (o *GetMediaMetaDataPart) GetHasThumbnail() *GetMediaMetaDataHasThumbnail {
if o == nil {
return nil
}
return o.HasThumbnail
}
func (o *GetMediaMetaDataPart) GetStream() []GetMediaMetaDataStream {
if o == nil {
return nil
}
return o.Stream
}
type GetMediaMetaDataMedia struct {
// Unique media identifier.
ID int64 `json:"id"`
// Duration of the media in milliseconds.
Duration *int `json:"duration,omitempty"`
// Bitrate in bits per second.
Bitrate *int `json:"bitrate,omitempty"`
// Video width in pixels.
Width *int `json:"width,omitempty"`
// Video height in pixels.
Height *int `json:"height,omitempty"`
// Aspect ratio of the video.
AspectRatio *float32 `json:"aspectRatio,omitempty"`
// Number of audio channels.
AudioChannels *int `json:"audioChannels,omitempty"`
DisplayOffset *int `json:"displayOffset,omitempty"`
// Audio codec used.
AudioCodec *string `json:"audioCodec,omitempty"`
// Video codec used.
VideoCodec *string `json:"videoCodec,omitempty"`
// Video resolution (e.g., 4k).
VideoResolution *string `json:"videoResolution,omitempty"`
// File container type.
Container *string `json:"container,omitempty"`
// Frame rate of the video. Values found include NTSC, PAL, 24p
//
VideoFrameRate *string `json:"videoFrameRate,omitempty"`
// Video profile (e.g., main 10).
VideoProfile *string `json:"videoProfile,omitempty"`
// Indicates whether voice activity is detected.
HasVoiceActivity bool `json:"hasVoiceActivity"`
// The audio profile used for the media (e.g., DTS, Dolby Digital, etc.).
AudioProfile *string `json:"audioProfile,omitempty"`
// Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
OptimizedForStreaming *GetMediaMetaDataOptimizedForStreaming `json:"optimizedForStreaming,omitempty"`
Has64bitOffsets *bool `json:"has64bitOffsets,omitempty"`
// An array of parts for this media item.
Part []GetMediaMetaDataPart `json:"Part"`
}
func (o *GetMediaMetaDataMedia) GetID() int64 {
if o == nil {
return 0
}
return o.ID
}
func (o *GetMediaMetaDataMedia) GetDuration() *int {
if o == nil {
return nil
}
return o.Duration
}
func (o *GetMediaMetaDataMedia) GetBitrate() *int {
if o == nil {
return nil
}
return o.Bitrate
}
func (o *GetMediaMetaDataMedia) GetWidth() *int {
if o == nil {
return nil
}
return o.Width
}
func (o *GetMediaMetaDataMedia) GetHeight() *int {
if o == nil {
return nil
}
return o.Height
}
func (o *GetMediaMetaDataMedia) GetAspectRatio() *float32 {
if o == nil {
return nil
}
return o.AspectRatio
}
func (o *GetMediaMetaDataMedia) GetAudioChannels() *int {
if o == nil {
return nil
}
return o.AudioChannels
}
func (o *GetMediaMetaDataMedia) GetDisplayOffset() *int {
if o == nil {
return nil
}
return o.DisplayOffset
}
func (o *GetMediaMetaDataMedia) GetAudioCodec() *string {
if o == nil {
return nil
}
return o.AudioCodec
}
func (o *GetMediaMetaDataMedia) GetVideoCodec() *string {
if o == nil {
return nil
}
return o.VideoCodec
}
func (o *GetMediaMetaDataMedia) GetVideoResolution() *string {
if o == nil {
return nil
}
return o.VideoResolution
}
func (o *GetMediaMetaDataMedia) GetContainer() *string {
if o == nil {
return nil
}
return o.Container
}
func (o *GetMediaMetaDataMedia) GetVideoFrameRate() *string {
if o == nil {
return nil
}
return o.VideoFrameRate
}
func (o *GetMediaMetaDataMedia) GetVideoProfile() *string {
if o == nil {
return nil
}
return o.VideoProfile
}
func (o *GetMediaMetaDataMedia) GetHasVoiceActivity() bool {
if o == nil {
return false
}
return o.HasVoiceActivity
}
func (o *GetMediaMetaDataMedia) GetAudioProfile() *string {
if o == nil {
return nil
}
return o.AudioProfile
}
func (o *GetMediaMetaDataMedia) GetOptimizedForStreaming() *GetMediaMetaDataOptimizedForStreaming {
if o == nil {
return nil
}
return o.OptimizedForStreaming
}
func (o *GetMediaMetaDataMedia) GetHas64bitOffsets() *bool {
if o == nil {
return nil
}
return o.Has64bitOffsets
}
func (o *GetMediaMetaDataMedia) GetPart() []GetMediaMetaDataPart {
if o == nil {
return []GetMediaMetaDataPart{}
}
return o.Part
}
type GetMediaMetaDataImage struct {
// Alternate text for the image.
Alt string `json:"alt"`
// The type of image (e.g., coverPoster, background, clearLogo).
Type string `json:"type"`
// The URL of the image.
URL string `json:"url"`
}
func (o *GetMediaMetaDataImage) GetAlt() string {
if o == nil {
return ""
}
return o.Alt
}
func (o *GetMediaMetaDataImage) GetType() string {
if o == nil {
return ""
}
return o.Type
}
func (o *GetMediaMetaDataImage) GetURL() string {
if o == nil {
return ""
}
return o.URL
}
type GetMediaMetaDataUltraBlurColors struct {
// The top-left color value.
TopLeft string `json:"topLeft"`
// The top-right color value.
TopRight string `json:"topRight"`
// The bottom-right color value.
BottomRight string `json:"bottomRight"`
// The bottom-left color value.
BottomLeft string `json:"bottomLeft"`
}
func (o *GetMediaMetaDataUltraBlurColors) GetTopLeft() string {
if o == nil {
return ""
}
return o.TopLeft
}
func (o *GetMediaMetaDataUltraBlurColors) GetTopRight() string {
if o == nil {
return ""
}
return o.TopRight
}
func (o *GetMediaMetaDataUltraBlurColors) GetBottomRight() string {
if o == nil {
return ""
}
return o.BottomRight
}
func (o *GetMediaMetaDataUltraBlurColors) GetBottomLeft() string {
if o == nil {
return ""
}
return o.BottomLeft
}
type GetMediaMetaDataGenre struct {
// The unique genre identifier.
ID int64 `json:"id"`
// The filter string for the genre.
Filter string `json:"filter"`
// The genre name.
Tag string `json:"tag"`
}
func (o *GetMediaMetaDataGenre) GetID() int64 {
if o == nil {
return 0
}
return o.ID
}
func (o *GetMediaMetaDataGenre) GetFilter() string {
if o == nil {
return ""
}
return o.Filter
}
func (o *GetMediaMetaDataGenre) GetTag() string {
if o == nil {
return ""
}
return o.Tag
}
type GetMediaMetaDataCountry struct {
// The unique country identifier.
ID int `json:"id"`
// The filter string for the country.
Filter string `json:"filter"`
// The country name.
Tag string `json:"tag"`
}
func (o *GetMediaMetaDataCountry) GetID() int {
if o == nil {
return 0
}
return o.ID
}
func (o *GetMediaMetaDataCountry) GetFilter() string {
if o == nil {
return ""
}
return o.Filter
}
func (o *GetMediaMetaDataCountry) GetTag() string {
if o == nil {
return ""
}
return o.Tag
}
type GetMediaMetaDataGuids struct {
// The GUID value.
ID string `json:"id"`
}
func (o *GetMediaMetaDataGuids) GetID() string {
if o == nil {
return ""
}
return o.ID
}
type Ratings struct {
// The image or reference for the rating.
Image string `json:"image"`
// The rating value.
Value float32 `json:"value"`
// The type of rating (e.g., audience, critic).
Type string `json:"type"`
}
func (o *Ratings) GetImage() string {
if o == nil {
return ""
}
return o.Image
}
func (o *Ratings) GetValue() float32 {
if o == nil {
return 0.0
}
return o.Value
}
func (o *Ratings) GetType() string {
if o == nil {
return ""
}
return o.Type
}
type GetMediaMetaDataRole struct {
// The unique role identifier.
ID int64 `json:"id"`
// The filter string for the role.
Filter string `json:"filter"`
// The actor's name.
Tag string `json:"tag"`
// A key associated with the actor tag.
TagKey string `json:"tagKey"`
// The character name or role.
Role *string `json:"role,omitempty"`
// URL for the role thumbnail image.
Thumb *string `json:"thumb,omitempty"`
}
func (o *GetMediaMetaDataRole) GetID() int64 {
if o == nil {
return 0
}
return o.ID
}
func (o *GetMediaMetaDataRole) GetFilter() string {
if o == nil {
return ""
}
return o.Filter
}
func (o *GetMediaMetaDataRole) GetTag() string {
if o == nil {
return ""
}
return o.Tag
}
func (o *GetMediaMetaDataRole) GetTagKey() string {
if o == nil {
return ""
}
return o.TagKey
}
func (o *GetMediaMetaDataRole) GetRole() *string {
if o == nil {
return nil
}
return o.Role
}
func (o *GetMediaMetaDataRole) GetThumb() *string {
if o == nil {
return nil
}
return o.Thumb
}
type GetMediaMetaDataDirector struct {
// The unique role identifier.
ID int64 `json:"id"`
// The filter string for the role.
Filter string `json:"filter"`
// The actor's name.
Tag string `json:"tag"`
// A key associated with the actor tag.
TagKey string `json:"tagKey"`
// The character name or role.
Role *string `json:"role,omitempty"`
// URL for the role thumbnail image.
Thumb *string `json:"thumb,omitempty"`
}
func (o *GetMediaMetaDataDirector) GetID() int64 {
if o == nil {
return 0
}
return o.ID
}
func (o *GetMediaMetaDataDirector) GetFilter() string {
if o == nil {
return ""
}
return o.Filter
}
func (o *GetMediaMetaDataDirector) GetTag() string {
if o == nil {
return ""
}
return o.Tag
}
func (o *GetMediaMetaDataDirector) GetTagKey() string {
if o == nil {
return ""
}
return o.TagKey
}
func (o *GetMediaMetaDataDirector) GetRole() *string {
if o == nil {
return nil
}
return o.Role
}
func (o *GetMediaMetaDataDirector) GetThumb() *string {
if o == nil {
return nil
}
return o.Thumb
}
type GetMediaMetaDataWriter struct {
// The unique role identifier.
ID int64 `json:"id"`
// The filter string for the role.
Filter string `json:"filter"`
// The actor's name.
Tag string `json:"tag"`
// A key associated with the actor tag.
TagKey string `json:"tagKey"`
// The character name or role.
Role *string `json:"role,omitempty"`
// URL for the role thumbnail image.
Thumb *string `json:"thumb,omitempty"`
}
func (o *GetMediaMetaDataWriter) GetID() int64 {
if o == nil {
return 0
}
return o.ID
}
func (o *GetMediaMetaDataWriter) GetFilter() string {
if o == nil {
return ""
}
return o.Filter
}
func (o *GetMediaMetaDataWriter) GetTag() string {
if o == nil {
return ""
}
return o.Tag
}
func (o *GetMediaMetaDataWriter) GetTagKey() string {
if o == nil {
return ""
}
return o.TagKey
}
func (o *GetMediaMetaDataWriter) GetRole() *string {
if o == nil {
return nil
}
return o.Role
}
func (o *GetMediaMetaDataWriter) GetThumb() *string {
if o == nil {
return nil
}
return o.Thumb
}
type Producer struct {
// The unique role identifier.
ID int64 `json:"id"`
// The filter string for the role.
Filter string `json:"filter"`
// The actor's name.
Tag string `json:"tag"`
// A key associated with the actor tag.
TagKey string `json:"tagKey"`
// The character name or role.
Role *string `json:"role,omitempty"`
// URL for the role thumbnail image.
Thumb *string `json:"thumb,omitempty"`
}
func (o *Producer) GetID() int64 {
if o == nil {
return 0
}
return o.ID
}
func (o *Producer) GetFilter() string {
if o == nil {
return ""
}
return o.Filter
}
func (o *Producer) GetTag() string {
if o == nil {
return ""
}
return o.Tag
}
func (o *Producer) GetTagKey() string {
if o == nil {
return ""
}
return o.TagKey
}
func (o *Producer) GetRole() *string {
if o == nil {
return nil
}
return o.Role
}
func (o *Producer) GetThumb() *string {
if o == nil {
return nil
}
return o.Thumb
}
type Similar struct {
// The unique similar item identifier.
ID int64 `json:"id"`
// The filter string for similar items.
Filter string `json:"filter"`
// The tag or title of the similar content.
Tag string `json:"tag"`
}
func (o *Similar) GetID() int64 {
if o == nil {
return 0
}
return o.ID
}
func (o *Similar) GetFilter() string {
if o == nil {
return ""
}
return o.Filter
}
func (o *Similar) GetTag() string {
if o == nil {
return ""
}
return o.Tag
}
type GetMediaMetaDataLocation struct {
// The file path for the location.
Path string `json:"path"`
}
func (o *GetMediaMetaDataLocation) GetPath() string {
if o == nil {
return ""
}
return o.Path
}
type GetMediaMetaDataMetadata struct {
// The rating key of the metadata item.
RatingKey string `json:"ratingKey"`
// The rating key of the parent of this metadata item.
ParentRatingKey *string `json:"parentRatingKey,omitempty"`
// The rating key of the grandparent of this metadata item.
GrandparentRatingKey *string `json:"grandparentRatingKey,omitempty"`
// A GUID identifying the parent entity (e.g., season) for the item.
ParentGUID *string `json:"parentGuid,omitempty"`
// A GUID identifying the grandparent entity (e.g., show).
GrandparentGUID *string `json:"grandparentGuid,omitempty"`
// A URL-friendly identifier (slug) for the grandparent entity.
GrandparentSlug *string `json:"grandparentSlug,omitempty"`
// A key identifying the grandparent metadata in the library.
GrandparentKey *string `json:"grandparentKey,omitempty"`
// A key identifying the parent metadata in the library.
ParentKey *string `json:"parentKey,omitempty"`
// The API key to access metadata details.
Key string `json:"key"`
// The globally unique identifier for the item.
GUID string `json:"guid"`
// A URL-friendly identifier for the item.
Slug *string `json:"slug,omitempty"`
// The studio that produced the content.
Studio *string `json:"studio,omitempty"`
// The type of content (e.g., show, movie).
Type string `json:"type"`
// The title of the content.
Title string `json:"title"`
// The original title of the content.
OriginalTitle *string `json:"originalTitle,omitempty"`
// The title of the library section.
LibrarySectionTitle string `json:"librarySectionTitle"`
// The ID of the library section.
LibrarySectionID int64 `json:"librarySectionID"`
// The key of the library section.
LibrarySectionKey string `json:"librarySectionKey"`
// The content rating (e.g., TV-MA).
ContentRating *string `json:"contentRating,omitempty"`
// A summary of the content.
Summary string `json:"summary"`
// The index or order of the item.
Index *int64 `json:"index,omitempty"`
// The title of the grandparent entity (typically the show's title).
GrandparentTitle *string `json:"grandparentTitle,omitempty"`
// The title of the parent entity (typically the season's title).
ParentTitle *string `json:"parentTitle,omitempty"`
// The audience rating for the content.
AudienceRating *float32 `json:"audienceRating,omitempty"`
// The number of times the item has been viewed.
ViewCount *int64 `json:"viewCount,omitempty"`
// The number of times the item has been skipped.
SkipCount *int64 `json:"skipCount,omitempty"`
// Unix timestamp of when the item was last viewed.
LastViewedAt *int64 `json:"lastViewedAt,omitempty"`
// The release year.
Year int `json:"year"`
// The general rating
Rating *float32 `json:"rating,omitempty"`
// The URL or identifier for the rating image (e.g., Rotten Tomatoes rating image).
RatingImage *string `json:"ratingImage,omitempty"`
// The tagline of the content.
Tagline *string `json:"tagline,omitempty"`
ChapterSource *string `json:"chapterSource,omitempty"`
PrimaryExtraKey *string `json:"primaryExtraKey,omitempty"`
// URL of the thumbnail image.
Thumb string `json:"thumb"`
// URL of the art image.
Art string `json:"art"`
// URL of the theme image.
Theme *string `json:"theme,omitempty"`
// Duration of the content in milliseconds.
Duration int `json:"duration"`
// The original release date.
OriginallyAvailableAt *types.Date `json:"originallyAvailableAt,omitempty"`
// The total number of episodes (or leaves).
LeafCount *int64 `json:"leafCount,omitempty"`
// The number of episodes that have been viewed.
ViewedLeafCount *int64 `json:"viewedLeafCount,omitempty"`
// The number of child items.
ChildCount *int `json:"childCount,omitempty"`
AddedAt int64 `json:"addedAt"`
UpdatedAt int64 `json:"updatedAt"`
// The URL for the audience rating image.
AudienceRatingImage *string `json:"audienceRatingImage,omitempty"`
// The index number of the parent entity, which could indicate its order or position.
ParentIndex *int64 `json:"parentIndex,omitempty"`
// The URL of the parent's thumbnail image.
ParentThumb *string `json:"parentThumb,omitempty"`
// The URL of the grandparent's thumbnail image.
GrandparentThumb *string `json:"grandparentThumb,omitempty"`
// The URL of the grandparent's art image.
GrandparentArt *string `json:"grandparentArt,omitempty"`
Media []GetMediaMetaDataMedia `json:"Media,omitempty"`
// An array of image objects.
Image []GetMediaMetaDataImage `json:"Image"`
UltraBlurColors GetMediaMetaDataUltraBlurColors `json:"UltraBlurColors"`
// An array of genre tags.
Genre []GetMediaMetaDataGenre `json:"Genre,omitempty"`
// An array of country tags.
Country []GetMediaMetaDataCountry `json:"Country,omitempty"`
// An array of GUID objects.
Guids []GetMediaMetaDataGuids `json:"Guid,omitempty"`
// An array of rating objects.
Ratings []Ratings `json:"Rating,omitempty"`
// An array of Actor roles.
Role []GetMediaMetaDataRole `json:"Role,omitempty"`
// An array of Director roles.
Director []GetMediaMetaDataDirector `json:"Director,omitempty"`
// An array of Writer roles.
Writer []GetMediaMetaDataWriter `json:"Writer,omitempty"`
// An array of Writer roles.
Producer []Producer `json:"Producer,omitempty"`
// An array of similar content objects.
Similar []Similar `json:"Similar,omitempty"`
// An array of location objects.
Location []GetMediaMetaDataLocation `json:"Location,omitempty"`
}
func (g GetMediaMetaDataMetadata) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(g, "", false)
}
func (g *GetMediaMetaDataMetadata) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &g, "", false, false); err != nil {
return err
}
return nil
}
func (o *GetMediaMetaDataMetadata) GetRatingKey() string {
if o == nil {
return ""
}
return o.RatingKey
}
func (o *GetMediaMetaDataMetadata) GetParentRatingKey() *string {
if o == nil {
return nil
}
return o.ParentRatingKey
}
func (o *GetMediaMetaDataMetadata) GetGrandparentRatingKey() *string {
if o == nil {
return nil
}
return o.GrandparentRatingKey
}
func (o *GetMediaMetaDataMetadata) GetParentGUID() *string {
if o == nil {
return nil
}
return o.ParentGUID
}
func (o *GetMediaMetaDataMetadata) GetGrandparentGUID() *string {
if o == nil {
return nil
}
return o.GrandparentGUID
}
func (o *GetMediaMetaDataMetadata) GetGrandparentSlug() *string {
if o == nil {
return nil
}
return o.GrandparentSlug
}
func (o *GetMediaMetaDataMetadata) GetGrandparentKey() *string {
if o == nil {
return nil
}
return o.GrandparentKey
}
func (o *GetMediaMetaDataMetadata) GetParentKey() *string {
if o == nil {
return nil
}
return o.ParentKey
}
func (o *GetMediaMetaDataMetadata) GetKey() string {
if o == nil {
return ""
}
return o.Key
}
func (o *GetMediaMetaDataMetadata) GetGUID() string {
if o == nil {
return ""
}
return o.GUID
}
func (o *GetMediaMetaDataMetadata) GetSlug() *string {
if o == nil {
return nil
}
return o.Slug
}
func (o *GetMediaMetaDataMetadata) GetStudio() *string {
if o == nil {
return nil
}
return o.Studio
}
func (o *GetMediaMetaDataMetadata) GetType() string {
if o == nil {
return ""
}
return o.Type
}
func (o *GetMediaMetaDataMetadata) GetTitle() string {
if o == nil {
return ""
}
return o.Title
}
func (o *GetMediaMetaDataMetadata) GetOriginalTitle() *string {
if o == nil {
return nil
}
return o.OriginalTitle
}
func (o *GetMediaMetaDataMetadata) GetLibrarySectionTitle() string {
if o == nil {
return ""
}
return o.LibrarySectionTitle
}
func (o *GetMediaMetaDataMetadata) GetLibrarySectionID() int64 {
if o == nil {
return 0
}
return o.LibrarySectionID
}
func (o *GetMediaMetaDataMetadata) GetLibrarySectionKey() string {
if o == nil {
return ""
}
return o.LibrarySectionKey
}
func (o *GetMediaMetaDataMetadata) GetContentRating() *string {
if o == nil {
return nil
}
return o.ContentRating
}
func (o *GetMediaMetaDataMetadata) GetSummary() string {
if o == nil {
return ""
}
return o.Summary
}
func (o *GetMediaMetaDataMetadata) GetIndex() *int64 {
if o == nil {
return nil
}
return o.Index
}
func (o *GetMediaMetaDataMetadata) GetGrandparentTitle() *string {
if o == nil {
return nil
}
return o.GrandparentTitle
}
func (o *GetMediaMetaDataMetadata) GetParentTitle() *string {
if o == nil {
return nil
}
return o.ParentTitle
}
func (o *GetMediaMetaDataMetadata) GetAudienceRating() *float32 {
if o == nil {
return nil
}
return o.AudienceRating
}
func (o *GetMediaMetaDataMetadata) GetViewCount() *int64 {
if o == nil {
return nil
}
return o.ViewCount
}
func (o *GetMediaMetaDataMetadata) GetSkipCount() *int64 {
if o == nil {
return nil
}
return o.SkipCount
}
func (o *GetMediaMetaDataMetadata) GetLastViewedAt() *int64 {
if o == nil {
return nil
}
return o.LastViewedAt
}
func (o *GetMediaMetaDataMetadata) GetYear() int {
if o == nil {
return 0
}
return o.Year
}
func (o *GetMediaMetaDataMetadata) GetRating() *float32 {
if o == nil {
return nil
}
return o.Rating
}
func (o *GetMediaMetaDataMetadata) GetRatingImage() *string {
if o == nil {
return nil
}
return o.RatingImage
}
func (o *GetMediaMetaDataMetadata) GetTagline() *string {
if o == nil {
return nil
}
return o.Tagline
}
func (o *GetMediaMetaDataMetadata) GetChapterSource() *string {
if o == nil {
return nil
}
return o.ChapterSource
}
func (o *GetMediaMetaDataMetadata) GetPrimaryExtraKey() *string {
if o == nil {
return nil
}
return o.PrimaryExtraKey
}
func (o *GetMediaMetaDataMetadata) GetThumb() string {
if o == nil {
return ""
}
return o.Thumb
}
func (o *GetMediaMetaDataMetadata) GetArt() string {
if o == nil {
return ""
}
return o.Art
}
func (o *GetMediaMetaDataMetadata) GetTheme() *string {
if o == nil {
return nil
}
return o.Theme
}
func (o *GetMediaMetaDataMetadata) GetDuration() int {
if o == nil {
return 0
}
return o.Duration
}
func (o *GetMediaMetaDataMetadata) GetOriginallyAvailableAt() *types.Date {
if o == nil {
return nil
}
return o.OriginallyAvailableAt
}
func (o *GetMediaMetaDataMetadata) GetLeafCount() *int64 {
if o == nil {
return nil
}
return o.LeafCount
}
func (o *GetMediaMetaDataMetadata) GetViewedLeafCount() *int64 {
if o == nil {
return nil
}
return o.ViewedLeafCount
}
func (o *GetMediaMetaDataMetadata) GetChildCount() *int {
if o == nil {
return nil
}
return o.ChildCount
}
func (o *GetMediaMetaDataMetadata) GetAddedAt() int64 {
if o == nil {
return 0
}
return o.AddedAt
}
func (o *GetMediaMetaDataMetadata) GetUpdatedAt() int64 {
if o == nil {
return 0
}
return o.UpdatedAt
}
func (o *GetMediaMetaDataMetadata) GetAudienceRatingImage() *string {
if o == nil {
return nil
}
return o.AudienceRatingImage
}
func (o *GetMediaMetaDataMetadata) GetParentIndex() *int64 {
if o == nil {
return nil
}
return o.ParentIndex
}
func (o *GetMediaMetaDataMetadata) GetParentThumb() *string {
if o == nil {
return nil
}
return o.ParentThumb
}
func (o *GetMediaMetaDataMetadata) GetGrandparentThumb() *string {
if o == nil {
return nil
}
return o.GrandparentThumb
}
func (o *GetMediaMetaDataMetadata) GetGrandparentArt() *string {
if o == nil {
return nil
}
return o.GrandparentArt
}
func (o *GetMediaMetaDataMetadata) GetMedia() []GetMediaMetaDataMedia {
if o == nil {
return nil
}
return o.Media
}
func (o *GetMediaMetaDataMetadata) GetImage() []GetMediaMetaDataImage {
if o == nil {
return []GetMediaMetaDataImage{}
}
return o.Image
}
func (o *GetMediaMetaDataMetadata) GetUltraBlurColors() GetMediaMetaDataUltraBlurColors {
if o == nil {
return GetMediaMetaDataUltraBlurColors{}
}
return o.UltraBlurColors
}
func (o *GetMediaMetaDataMetadata) GetGenre() []GetMediaMetaDataGenre {
if o == nil {
return nil
}
return o.Genre
}
func (o *GetMediaMetaDataMetadata) GetCountry() []GetMediaMetaDataCountry {
if o == nil {
return nil
}
return o.Country
}
func (o *GetMediaMetaDataMetadata) GetGuids() []GetMediaMetaDataGuids {
if o == nil {
return nil
}
return o.Guids
}
func (o *GetMediaMetaDataMetadata) GetRatings() []Ratings {
if o == nil {
return nil
}
return o.Ratings
}
func (o *GetMediaMetaDataMetadata) GetRole() []GetMediaMetaDataRole {
if o == nil {
return nil
}
return o.Role
}
func (o *GetMediaMetaDataMetadata) GetDirector() []GetMediaMetaDataDirector {
if o == nil {
return nil
}
return o.Director
}
func (o *GetMediaMetaDataMetadata) GetWriter() []GetMediaMetaDataWriter {
if o == nil {
return nil
}
return o.Writer
}
func (o *GetMediaMetaDataMetadata) GetProducer() []Producer {
if o == nil {
return nil
}
return o.Producer
}
func (o *GetMediaMetaDataMetadata) GetSimilar() []Similar {
if o == nil {
return nil
}
return o.Similar
}
func (o *GetMediaMetaDataMetadata) GetLocation() []GetMediaMetaDataLocation {
if o == nil {
return nil
}
return o.Location
}
type GetMediaMetaDataMediaContainer struct {
// Number of media items returned in this response.
Size int `json:"size"`
// Indicates whether syncing is allowed.
AllowSync bool `json:"allowSync"`
// An plugin identifier for the media container.
Identifier string `json:"identifier"`
// The unique identifier for the library section.
LibrarySectionID int64 `json:"librarySectionID"`
// The title of the library section.
LibrarySectionTitle string `json:"librarySectionTitle"`
// The universally unique identifier for the library section.
LibrarySectionUUID *string `json:"librarySectionUUID,omitempty"`
// The prefix used for media tag resource paths.
MediaTagPrefix string `json:"mediaTagPrefix"`
// The version number for media tags.
MediaTagVersion int64 `json:"mediaTagVersion"`
// An array of metadata items.
Metadata []GetMediaMetaDataMetadata `json:"Metadata"`
}
func (o *GetMediaMetaDataMediaContainer) GetSize() int {
if o == nil {
return 0
}
return o.Size
}
func (o *GetMediaMetaDataMediaContainer) GetAllowSync() bool {
if o == nil {
return false
}
return o.AllowSync
}
func (o *GetMediaMetaDataMediaContainer) GetIdentifier() string {
if o == nil {
return ""
}
return o.Identifier
}
func (o *GetMediaMetaDataMediaContainer) GetLibrarySectionID() int64 {
if o == nil {
return 0
}
return o.LibrarySectionID
}
func (o *GetMediaMetaDataMediaContainer) GetLibrarySectionTitle() string {
if o == nil {
return ""
}
return o.LibrarySectionTitle
}
func (o *GetMediaMetaDataMediaContainer) GetLibrarySectionUUID() *string {
if o == nil {
return nil
}
return o.LibrarySectionUUID
}
func (o *GetMediaMetaDataMediaContainer) GetMediaTagPrefix() string {
if o == nil {
return ""
}
return o.MediaTagPrefix
}
func (o *GetMediaMetaDataMediaContainer) GetMediaTagVersion() int64 {
if o == nil {
return 0
}
return o.MediaTagVersion
}
func (o *GetMediaMetaDataMediaContainer) GetMetadata() []GetMediaMetaDataMetadata {
if o == nil {
return []GetMediaMetaDataMetadata{}
}
return o.Metadata
}
// GetMediaMetaDataResponseBody - The metadata of the library item.
type GetMediaMetaDataResponseBody struct {
MediaContainer *GetMediaMetaDataMediaContainer `json:"MediaContainer,omitempty"`
}
func (o *GetMediaMetaDataResponseBody) GetMediaContainer() *GetMediaMetaDataMediaContainer {
if o == nil {
return nil
}
return o.MediaContainer
}
type GetMediaMetaDataResponse struct {
// HTTP response content type for this operation
ContentType string
// HTTP response status code for this operation
StatusCode int
// Raw HTTP response; suitable for custom response parsing
RawResponse *http.Response
// The metadata of the library item.
Object *GetMediaMetaDataResponseBody
}
func (o *GetMediaMetaDataResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *GetMediaMetaDataResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *GetMediaMetaDataResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *GetMediaMetaDataResponse) GetObject() *GetMediaMetaDataResponseBody {
if o == nil {
return nil
}
return o.Object
}