// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. package operations import ( "encoding/json" "fmt" "github.com/LukeHagar/plexgo/internal/utils" "github.com/LukeHagar/plexgo/types" "net/http" ) // Tag - A key representing a specific tag within the section. type Tag string const ( TagAll Tag = "all" TagUnwatched Tag = "unwatched" TagNewest Tag = "newest" TagRecentlyAdded Tag = "recentlyAdded" TagRecentlyViewed Tag = "recentlyViewed" TagOnDeck Tag = "onDeck" TagCollection Tag = "collection" TagEdition Tag = "edition" TagGenre Tag = "genre" TagYear Tag = "year" TagDecade Tag = "decade" TagDirector Tag = "director" TagActor Tag = "actor" TagCountry Tag = "country" TagContentRating Tag = "contentRating" TagRating Tag = "rating" TagResolution Tag = "resolution" TagFirstCharacter Tag = "firstCharacter" TagFolder Tag = "folder" TagAlbums Tag = "albums" ) func (e Tag) ToPointer() *Tag { return &e } func (e *Tag) UnmarshalJSON(data []byte) error { var v string if err := json.Unmarshal(data, &v); err != nil { return err } switch v { case "all": fallthrough case "unwatched": fallthrough case "newest": fallthrough case "recentlyAdded": fallthrough case "recentlyViewed": fallthrough case "onDeck": fallthrough case "collection": fallthrough case "edition": fallthrough case "genre": fallthrough case "year": fallthrough case "decade": fallthrough case "director": fallthrough case "actor": fallthrough case "country": fallthrough case "contentRating": fallthrough case "rating": fallthrough case "resolution": fallthrough case "firstCharacter": fallthrough case "folder": fallthrough case "albums": *e = Tag(v) return nil default: return fmt.Errorf("invalid value for Tag: %v", v) } } // IncludeGuids - Adds the Guids object to the response type IncludeGuids int const ( IncludeGuidsDisable IncludeGuids = 0 IncludeGuidsEnable IncludeGuids = 1 ) func (e IncludeGuids) ToPointer() *IncludeGuids { return &e } func (e *IncludeGuids) 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 = IncludeGuids(v) return nil default: return fmt.Errorf("invalid value for IncludeGuids: %v", v) } } // GetLibraryItemsQueryParamType - The type of media to retrieve or filter by. // 1 = movie // 2 = show // 3 = season // 4 = episode // E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries type GetLibraryItemsQueryParamType int64 const ( GetLibraryItemsQueryParamTypeMovie GetLibraryItemsQueryParamType = 1 GetLibraryItemsQueryParamTypeTvShow GetLibraryItemsQueryParamType = 2 GetLibraryItemsQueryParamTypeSeason GetLibraryItemsQueryParamType = 3 GetLibraryItemsQueryParamTypeEpisode GetLibraryItemsQueryParamType = 4 GetLibraryItemsQueryParamTypeAudio GetLibraryItemsQueryParamType = 8 GetLibraryItemsQueryParamTypeAlbum GetLibraryItemsQueryParamType = 9 GetLibraryItemsQueryParamTypeTrack GetLibraryItemsQueryParamType = 10 ) func (e GetLibraryItemsQueryParamType) ToPointer() *GetLibraryItemsQueryParamType { return &e } func (e *GetLibraryItemsQueryParamType) UnmarshalJSON(data []byte) error { var v int64 if err := json.Unmarshal(data, &v); err != nil { return err } switch v { case 1: fallthrough case 2: fallthrough case 3: fallthrough case 4: fallthrough case 8: fallthrough case 9: fallthrough case 10: *e = GetLibraryItemsQueryParamType(v) return nil default: return fmt.Errorf("invalid value for GetLibraryItemsQueryParamType: %v", v) } } // GetLibraryItemsQueryParamIncludeMeta - Adds the Meta object to the response type GetLibraryItemsQueryParamIncludeMeta int const ( GetLibraryItemsQueryParamIncludeMetaDisable GetLibraryItemsQueryParamIncludeMeta = 0 GetLibraryItemsQueryParamIncludeMetaEnable GetLibraryItemsQueryParamIncludeMeta = 1 ) func (e GetLibraryItemsQueryParamIncludeMeta) ToPointer() *GetLibraryItemsQueryParamIncludeMeta { return &e } func (e *GetLibraryItemsQueryParamIncludeMeta) 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 = GetLibraryItemsQueryParamIncludeMeta(v) return nil default: return fmt.Errorf("invalid value for GetLibraryItemsQueryParamIncludeMeta: %v", v) } } type GetLibraryItemsRequest struct { // A key representing a specific tag within the section. Tag Tag `pathParam:"style=simple,explode=false,name=tag"` // Adds the Guids object to the response // IncludeGuids *IncludeGuids `default:"0" queryParam:"style=form,explode=true,name=includeGuids"` // The type of media to retrieve or filter by. // 1 = movie // 2 = show // 3 = season // 4 = episode // E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries // Type GetLibraryItemsQueryParamType `queryParam:"style=form,explode=true,name=type"` // The unique key of the Plex library. // Note: This is unique in the context of the Plex server. // SectionKey int `pathParam:"style=simple,explode=false,name=sectionKey"` // Adds the Meta object to the response // IncludeMeta *GetLibraryItemsQueryParamIncludeMeta `default:"0" queryParam:"style=form,explode=true,name=includeMeta"` // The index of the first item to return. If not specified, the first item will be returned. // If the number of items exceeds the limit, the response will be paginated. // By default this is 0 // XPlexContainerStart *int `default:"0" queryParam:"style=form,explode=true,name=X-Plex-Container-Start"` // The number of items to return. If not specified, all items will be returned. // If the number of items exceeds the limit, the response will be paginated. // By default this is 50 // XPlexContainerSize *int `default:"50" queryParam:"style=form,explode=true,name=X-Plex-Container-Size"` } func (g GetLibraryItemsRequest) MarshalJSON() ([]byte, error) { return utils.MarshalJSON(g, "", false) } func (g *GetLibraryItemsRequest) UnmarshalJSON(data []byte) error { if err := utils.UnmarshalJSON(data, &g, "", false, false); err != nil { return err } return nil } func (o *GetLibraryItemsRequest) GetTag() Tag { if o == nil { return Tag("") } return o.Tag } func (o *GetLibraryItemsRequest) GetIncludeGuids() *IncludeGuids { if o == nil { return nil } return o.IncludeGuids } func (o *GetLibraryItemsRequest) GetType() GetLibraryItemsQueryParamType { if o == nil { return GetLibraryItemsQueryParamType(0) } return o.Type } func (o *GetLibraryItemsRequest) GetSectionKey() int { if o == nil { return 0 } return o.SectionKey } func (o *GetLibraryItemsRequest) GetIncludeMeta() *GetLibraryItemsQueryParamIncludeMeta { if o == nil { return nil } return o.IncludeMeta } func (o *GetLibraryItemsRequest) GetXPlexContainerStart() *int { if o == nil { return nil } return o.XPlexContainerStart } func (o *GetLibraryItemsRequest) GetXPlexContainerSize() *int { if o == nil { return nil } return o.XPlexContainerSize } type GetLibraryItemsFilter struct { Filter string `json:"filter"` FilterType string `json:"filterType"` Key string `json:"key"` Title string `json:"title"` Type string `json:"type"` } func (o *GetLibraryItemsFilter) GetFilter() string { if o == nil { return "" } return o.Filter } func (o *GetLibraryItemsFilter) GetFilterType() string { if o == nil { return "" } return o.FilterType } func (o *GetLibraryItemsFilter) GetKey() string { if o == nil { return "" } return o.Key } func (o *GetLibraryItemsFilter) GetTitle() string { if o == nil { return "" } return o.Title } func (o *GetLibraryItemsFilter) GetType() string { if o == nil { return "" } return o.Type } // GetLibraryItemsActiveDirection - The direction of the sort. Can be either `asc` or `desc`. type GetLibraryItemsActiveDirection string const ( GetLibraryItemsActiveDirectionAscending GetLibraryItemsActiveDirection = "asc" GetLibraryItemsActiveDirectionDescending GetLibraryItemsActiveDirection = "desc" ) func (e GetLibraryItemsActiveDirection) ToPointer() *GetLibraryItemsActiveDirection { return &e } func (e *GetLibraryItemsActiveDirection) UnmarshalJSON(data []byte) error { var v string if err := json.Unmarshal(data, &v); err != nil { return err } switch v { case "asc": fallthrough case "desc": *e = GetLibraryItemsActiveDirection(v) return nil default: return fmt.Errorf("invalid value for GetLibraryItemsActiveDirection: %v", v) } } // GetLibraryItemsDefaultDirection - The direction of the sort. Can be either `asc` or `desc`. type GetLibraryItemsDefaultDirection string const ( GetLibraryItemsDefaultDirectionAscending GetLibraryItemsDefaultDirection = "asc" GetLibraryItemsDefaultDirectionDescending GetLibraryItemsDefaultDirection = "desc" ) func (e GetLibraryItemsDefaultDirection) ToPointer() *GetLibraryItemsDefaultDirection { return &e } func (e *GetLibraryItemsDefaultDirection) UnmarshalJSON(data []byte) error { var v string if err := json.Unmarshal(data, &v); err != nil { return err } switch v { case "asc": fallthrough case "desc": *e = GetLibraryItemsDefaultDirection(v) return nil default: return fmt.Errorf("invalid value for GetLibraryItemsDefaultDirection: %v", v) } } type GetLibraryItemsSort struct { Default *string `json:"default,omitempty"` Active *bool `json:"active,omitempty"` // The direction of the sort. Can be either `asc` or `desc`. // ActiveDirection *GetLibraryItemsActiveDirection `default:"asc" json:"activeDirection"` // The direction of the sort. Can be either `asc` or `desc`. // DefaultDirection *GetLibraryItemsDefaultDirection `default:"asc" json:"defaultDirection"` DescKey *string `json:"descKey,omitempty"` FirstCharacterKey *string `json:"firstCharacterKey,omitempty"` Key string `json:"key"` Title string `json:"title"` } func (g GetLibraryItemsSort) MarshalJSON() ([]byte, error) { return utils.MarshalJSON(g, "", false) } func (g *GetLibraryItemsSort) UnmarshalJSON(data []byte) error { if err := utils.UnmarshalJSON(data, &g, "", false, false); err != nil { return err } return nil } func (o *GetLibraryItemsSort) GetDefault() *string { if o == nil { return nil } return o.Default } func (o *GetLibraryItemsSort) GetActive() *bool { if o == nil { return nil } return o.Active } func (o *GetLibraryItemsSort) GetActiveDirection() *GetLibraryItemsActiveDirection { if o == nil { return nil } return o.ActiveDirection } func (o *GetLibraryItemsSort) GetDefaultDirection() *GetLibraryItemsDefaultDirection { if o == nil { return nil } return o.DefaultDirection } func (o *GetLibraryItemsSort) GetDescKey() *string { if o == nil { return nil } return o.DescKey } func (o *GetLibraryItemsSort) GetFirstCharacterKey() *string { if o == nil { return nil } return o.FirstCharacterKey } func (o *GetLibraryItemsSort) GetKey() string { if o == nil { return "" } return o.Key } func (o *GetLibraryItemsSort) GetTitle() string { if o == nil { return "" } return o.Title } type GetLibraryItemsField struct { Key string `json:"key"` Title string `json:"title"` Type string `json:"type"` SubType *string `json:"subType,omitempty"` } func (o *GetLibraryItemsField) GetKey() string { if o == nil { return "" } return o.Key } func (o *GetLibraryItemsField) GetTitle() string { if o == nil { return "" } return o.Title } func (o *GetLibraryItemsField) GetType() string { if o == nil { return "" } return o.Type } func (o *GetLibraryItemsField) GetSubType() *string { if o == nil { return nil } return o.SubType } type GetLibraryItemsType struct { Key string `json:"key"` Type string `json:"type"` Title string `json:"title"` Active bool `json:"active"` Filter []GetLibraryItemsFilter `json:"Filter,omitempty"` Sort []GetLibraryItemsSort `json:"Sort,omitempty"` Field []GetLibraryItemsField `json:"Field,omitempty"` } func (o *GetLibraryItemsType) GetKey() string { if o == nil { return "" } return o.Key } func (o *GetLibraryItemsType) GetType() string { if o == nil { return "" } return o.Type } func (o *GetLibraryItemsType) GetTitle() string { if o == nil { return "" } return o.Title } func (o *GetLibraryItemsType) GetActive() bool { if o == nil { return false } return o.Active } func (o *GetLibraryItemsType) GetFilter() []GetLibraryItemsFilter { if o == nil { return nil } return o.Filter } func (o *GetLibraryItemsType) GetSort() []GetLibraryItemsSort { if o == nil { return nil } return o.Sort } func (o *GetLibraryItemsType) GetField() []GetLibraryItemsField { if o == nil { return nil } return o.Field } type GetLibraryItemsOperator struct { Key string `json:"key"` Title string `json:"title"` } func (o *GetLibraryItemsOperator) GetKey() string { if o == nil { return "" } return o.Key } func (o *GetLibraryItemsOperator) GetTitle() string { if o == nil { return "" } return o.Title } type GetLibraryItemsFieldType struct { Type string `json:"type"` Operator []GetLibraryItemsOperator `json:"Operator"` } func (o *GetLibraryItemsFieldType) GetType() string { if o == nil { return "" } return o.Type } func (o *GetLibraryItemsFieldType) GetOperator() []GetLibraryItemsOperator { if o == nil { return []GetLibraryItemsOperator{} } return o.Operator } // GetLibraryItemsLibraryType - The type of media content type GetLibraryItemsLibraryType string const ( GetLibraryItemsLibraryTypeMovie GetLibraryItemsLibraryType = "movie" GetLibraryItemsLibraryTypeTvShow GetLibraryItemsLibraryType = "show" GetLibraryItemsLibraryTypeSeason GetLibraryItemsLibraryType = "season" GetLibraryItemsLibraryTypeEpisode GetLibraryItemsLibraryType = "episode" ) func (e GetLibraryItemsLibraryType) ToPointer() *GetLibraryItemsLibraryType { return &e } func (e *GetLibraryItemsLibraryType) UnmarshalJSON(data []byte) error { var v string if err := json.Unmarshal(data, &v); err != nil { return err } switch v { case "movie": fallthrough case "show": fallthrough case "season": fallthrough case "episode": *e = GetLibraryItemsLibraryType(v) return nil default: return fmt.Errorf("invalid value for GetLibraryItemsLibraryType: %v", v) } } // GetLibraryItemsFlattenSeasons - Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). type GetLibraryItemsFlattenSeasons string const ( GetLibraryItemsFlattenSeasonsLibraryDefault GetLibraryItemsFlattenSeasons = "-1" GetLibraryItemsFlattenSeasonsHide GetLibraryItemsFlattenSeasons = "0" GetLibraryItemsFlattenSeasonsShow GetLibraryItemsFlattenSeasons = "1" ) func (e GetLibraryItemsFlattenSeasons) ToPointer() *GetLibraryItemsFlattenSeasons { return &e } func (e *GetLibraryItemsFlattenSeasons) UnmarshalJSON(data []byte) error { var v string if err := json.Unmarshal(data, &v); err != nil { return err } switch v { case "-1": fallthrough case "0": fallthrough case "1": *e = GetLibraryItemsFlattenSeasons(v) return nil default: return fmt.Errorf("invalid value for GetLibraryItemsFlattenSeasons: %v", v) } } // GetLibraryItemsEpisodeSort - Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first). type GetLibraryItemsEpisodeSort string const ( GetLibraryItemsEpisodeSortLibraryDefault GetLibraryItemsEpisodeSort = "-1" GetLibraryItemsEpisodeSortOldestFirst GetLibraryItemsEpisodeSort = "0" GetLibraryItemsEpisodeSortNewestFirst GetLibraryItemsEpisodeSort = "1" ) func (e GetLibraryItemsEpisodeSort) ToPointer() *GetLibraryItemsEpisodeSort { return &e } func (e *GetLibraryItemsEpisodeSort) UnmarshalJSON(data []byte) error { var v string if err := json.Unmarshal(data, &v); err != nil { return err } switch v { case "-1": fallthrough case "0": fallthrough case "1": *e = GetLibraryItemsEpisodeSort(v) return nil default: return fmt.Errorf("invalid value for GetLibraryItemsEpisodeSort: %v", v) } } // GetLibraryItemsEnableCreditsMarkerGeneration - Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled). type GetLibraryItemsEnableCreditsMarkerGeneration string const ( GetLibraryItemsEnableCreditsMarkerGenerationLibraryDefault GetLibraryItemsEnableCreditsMarkerGeneration = "-1" GetLibraryItemsEnableCreditsMarkerGenerationDisabled GetLibraryItemsEnableCreditsMarkerGeneration = "0" ) func (e GetLibraryItemsEnableCreditsMarkerGeneration) ToPointer() *GetLibraryItemsEnableCreditsMarkerGeneration { return &e } func (e *GetLibraryItemsEnableCreditsMarkerGeneration) UnmarshalJSON(data []byte) error { var v string if err := json.Unmarshal(data, &v); err != nil { return err } switch v { case "-1": fallthrough case "0": *e = GetLibraryItemsEnableCreditsMarkerGeneration(v) return nil default: return fmt.Errorf("invalid value for GetLibraryItemsEnableCreditsMarkerGeneration: %v", v) } } // GetLibraryItemsShowOrdering - Setting that indicates the episode ordering for the show. // None = Library default, // tmdbAiring = The Movie Database (Aired), // aired = TheTVDB (Aired), // dvd = TheTVDB (DVD), // absolute = TheTVDB (Absolute)). type GetLibraryItemsShowOrdering string const ( GetLibraryItemsShowOrderingNone GetLibraryItemsShowOrdering = "None" GetLibraryItemsShowOrderingTmdbAiring GetLibraryItemsShowOrdering = "tmdbAiring" GetLibraryItemsShowOrderingTvdbAired GetLibraryItemsShowOrdering = "aired" GetLibraryItemsShowOrderingTvdbDvd GetLibraryItemsShowOrdering = "dvd" GetLibraryItemsShowOrderingTvdbAbsolute GetLibraryItemsShowOrdering = "absolute" ) func (e GetLibraryItemsShowOrdering) ToPointer() *GetLibraryItemsShowOrdering { return &e } func (e *GetLibraryItemsShowOrdering) UnmarshalJSON(data []byte) error { var v string if err := json.Unmarshal(data, &v); err != nil { return err } switch v { case "None": fallthrough case "tmdbAiring": fallthrough case "aired": fallthrough case "dvd": fallthrough case "absolute": *e = GetLibraryItemsShowOrdering(v) return nil default: return fmt.Errorf("invalid value for GetLibraryItemsShowOrdering: %v", v) } } type GetLibraryItemsOptimizedForStreaming int const ( GetLibraryItemsOptimizedForStreamingDisable GetLibraryItemsOptimizedForStreaming = 0 GetLibraryItemsOptimizedForStreamingEnable GetLibraryItemsOptimizedForStreaming = 1 ) func (e GetLibraryItemsOptimizedForStreaming) ToPointer() *GetLibraryItemsOptimizedForStreaming { return &e } func (e *GetLibraryItemsOptimizedForStreaming) 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 = GetLibraryItemsOptimizedForStreaming(v) return nil default: return fmt.Errorf("invalid value for GetLibraryItemsOptimizedForStreaming: %v", v) } } type GetLibraryItemsHasThumbnail string const ( GetLibraryItemsHasThumbnailFalse GetLibraryItemsHasThumbnail = "0" GetLibraryItemsHasThumbnailTrue GetLibraryItemsHasThumbnail = "1" ) func (e GetLibraryItemsHasThumbnail) ToPointer() *GetLibraryItemsHasThumbnail { return &e } func (e *GetLibraryItemsHasThumbnail) 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 = GetLibraryItemsHasThumbnail(v) return nil default: return fmt.Errorf("invalid value for GetLibraryItemsHasThumbnail: %v", v) } } type GetLibraryItemsStream struct { ID int64 `json:"id"` // Type of stream (1 = video, 2 = audio, 3 = subtitle) StreamType int64 `json:"streamType"` // Indicates if this is the default stream Default *bool `json:"default,omitempty"` // Indicates if the stream is selected Selected *bool `json:"selected,omitempty"` // Codec used by the stream Codec string `json:"codec"` // The index of the stream Index int64 `json:"index"` // The bitrate of the stream in kbps Bitrate *int64 `json:"bitrate,omitempty"` // The color primaries of the video stream ColorPrimaries *string `json:"colorPrimaries,omitempty"` // The color range of the video stream ColorRange *string `json:"colorRange,omitempty"` // The color space of the video stream ColorSpace *string `json:"colorSpace,omitempty"` // The transfer characteristics (TRC) of the video stream ColorTrc *string `json:"colorTrc,omitempty"` // The bit depth of the video stream BitDepth *int64 `json:"bitDepth,omitempty"` // The chroma location of the video stream ChromaLocation *string `json:"chromaLocation,omitempty"` // The identifier of the video stream StreamIdentifier *string `json:"streamIdentifier,omitempty"` // The chroma subsampling format ChromaSubsampling *string `json:"chromaSubsampling,omitempty"` // The coded height of the video stream CodedHeight *int64 `json:"codedHeight,omitempty"` // The coded width of the video stream CodedWidth *int64 `json:"codedWidth,omitempty"` // The frame rate of the video stream FrameRate *float64 `json:"frameRate,omitempty"` // Indicates if the stream has a scaling matrix HasScalingMatrix *bool `json:"hasScalingMatrix,omitempty"` HearingImpaired *bool `json:"hearingImpaired,omitempty"` ClosedCaptions *bool `json:"closedCaptions,omitempty"` EmbeddedInVideo *string `json:"embeddedInVideo,omitempty"` // The height of the video stream Height *int64 `json:"height,omitempty"` // The level of the video codec Level *int64 `json:"level,omitempty"` // The profile of the video codec Profile *string `json:"profile,omitempty"` // Number of reference frames RefFrames *int64 `json:"refFrames,omitempty"` // The scan type (progressive or interlaced) ScanType *string `json:"scanType,omitempty"` // The width of the video stream Width *int64 `json:"width,omitempty"` // Display title of the stream DisplayTitle *string `json:"displayTitle,omitempty"` // Extended display title of the stream ExtendedDisplayTitle *string `json:"extendedDisplayTitle,omitempty"` // Number of audio channels (for audio streams) Channels *int64 `json:"channels,omitempty"` // The language of the stream (for audio/subtitle streams) Language *string `json:"language,omitempty"` // Language tag of the stream LanguageTag *string `json:"languageTag,omitempty"` // Language code of the stream LanguageCode *string `json:"languageCode,omitempty"` // The audio channel layout AudioChannelLayout *string `json:"audioChannelLayout,omitempty"` // Sampling rate of the audio stream in Hz SamplingRate *int64 `json:"samplingRate,omitempty"` // Title of the subtitle track (for subtitle streams) Title *string `json:"title,omitempty"` // Indicates if the subtitle stream can auto-sync CanAutoSync *bool `json:"canAutoSync,omitempty"` } func (o *GetLibraryItemsStream) GetID() int64 { if o == nil { return 0 } return o.ID } func (o *GetLibraryItemsStream) GetStreamType() int64 { if o == nil { return 0 } return o.StreamType } func (o *GetLibraryItemsStream) GetDefault() *bool { if o == nil { return nil } return o.Default } func (o *GetLibraryItemsStream) GetSelected() *bool { if o == nil { return nil } return o.Selected } func (o *GetLibraryItemsStream) GetCodec() string { if o == nil { return "" } return o.Codec } func (o *GetLibraryItemsStream) GetIndex() int64 { if o == nil { return 0 } return o.Index } func (o *GetLibraryItemsStream) GetBitrate() *int64 { if o == nil { return nil } return o.Bitrate } func (o *GetLibraryItemsStream) GetColorPrimaries() *string { if o == nil { return nil } return o.ColorPrimaries } func (o *GetLibraryItemsStream) GetColorRange() *string { if o == nil { return nil } return o.ColorRange } func (o *GetLibraryItemsStream) GetColorSpace() *string { if o == nil { return nil } return o.ColorSpace } func (o *GetLibraryItemsStream) GetColorTrc() *string { if o == nil { return nil } return o.ColorTrc } func (o *GetLibraryItemsStream) GetBitDepth() *int64 { if o == nil { return nil } return o.BitDepth } func (o *GetLibraryItemsStream) GetChromaLocation() *string { if o == nil { return nil } return o.ChromaLocation } func (o *GetLibraryItemsStream) GetStreamIdentifier() *string { if o == nil { return nil } return o.StreamIdentifier } func (o *GetLibraryItemsStream) GetChromaSubsampling() *string { if o == nil { return nil } return o.ChromaSubsampling } func (o *GetLibraryItemsStream) GetCodedHeight() *int64 { if o == nil { return nil } return o.CodedHeight } func (o *GetLibraryItemsStream) GetCodedWidth() *int64 { if o == nil { return nil } return o.CodedWidth } func (o *GetLibraryItemsStream) GetFrameRate() *float64 { if o == nil { return nil } return o.FrameRate } func (o *GetLibraryItemsStream) GetHasScalingMatrix() *bool { if o == nil { return nil } return o.HasScalingMatrix } func (o *GetLibraryItemsStream) GetHearingImpaired() *bool { if o == nil { return nil } return o.HearingImpaired } func (o *GetLibraryItemsStream) GetClosedCaptions() *bool { if o == nil { return nil } return o.ClosedCaptions } func (o *GetLibraryItemsStream) GetEmbeddedInVideo() *string { if o == nil { return nil } return o.EmbeddedInVideo } func (o *GetLibraryItemsStream) GetHeight() *int64 { if o == nil { return nil } return o.Height } func (o *GetLibraryItemsStream) GetLevel() *int64 { if o == nil { return nil } return o.Level } func (o *GetLibraryItemsStream) GetProfile() *string { if o == nil { return nil } return o.Profile } func (o *GetLibraryItemsStream) GetRefFrames() *int64 { if o == nil { return nil } return o.RefFrames } func (o *GetLibraryItemsStream) GetScanType() *string { if o == nil { return nil } return o.ScanType } func (o *GetLibraryItemsStream) GetWidth() *int64 { if o == nil { return nil } return o.Width } func (o *GetLibraryItemsStream) GetDisplayTitle() *string { if o == nil { return nil } return o.DisplayTitle } func (o *GetLibraryItemsStream) GetExtendedDisplayTitle() *string { if o == nil { return nil } return o.ExtendedDisplayTitle } func (o *GetLibraryItemsStream) GetChannels() *int64 { if o == nil { return nil } return o.Channels } func (o *GetLibraryItemsStream) GetLanguage() *string { if o == nil { return nil } return o.Language } func (o *GetLibraryItemsStream) GetLanguageTag() *string { if o == nil { return nil } return o.LanguageTag } func (o *GetLibraryItemsStream) GetLanguageCode() *string { if o == nil { return nil } return o.LanguageCode } func (o *GetLibraryItemsStream) GetAudioChannelLayout() *string { if o == nil { return nil } return o.AudioChannelLayout } func (o *GetLibraryItemsStream) GetSamplingRate() *int64 { if o == nil { return nil } return o.SamplingRate } func (o *GetLibraryItemsStream) GetTitle() *string { if o == nil { return nil } return o.Title } func (o *GetLibraryItemsStream) GetCanAutoSync() *bool { if o == nil { return nil } return o.CanAutoSync } type GetLibraryItemsPart struct { ID int `json:"id"` Key string `json:"key"` Duration *int `json:"duration,omitempty"` File string `json:"file"` Size int64 `json:"size"` // The container format of the media file. // Container string `json:"container"` AudioProfile *string `json:"audioProfile,omitempty"` Has64bitOffsets *bool `json:"has64bitOffsets,omitempty"` OptimizedForStreaming *bool `json:"optimizedForStreaming,omitempty"` VideoProfile *string `json:"videoProfile,omitempty"` Indexes *string `json:"indexes,omitempty"` HasThumbnail *GetLibraryItemsHasThumbnail `default:"0" json:"hasThumbnail"` Stream []GetLibraryItemsStream `json:"Stream,omitempty"` } func (g GetLibraryItemsPart) MarshalJSON() ([]byte, error) { return utils.MarshalJSON(g, "", false) } func (g *GetLibraryItemsPart) UnmarshalJSON(data []byte) error { if err := utils.UnmarshalJSON(data, &g, "", false, false); err != nil { return err } return nil } func (o *GetLibraryItemsPart) GetID() int { if o == nil { return 0 } return o.ID } func (o *GetLibraryItemsPart) GetKey() string { if o == nil { return "" } return o.Key } func (o *GetLibraryItemsPart) GetDuration() *int { if o == nil { return nil } return o.Duration } func (o *GetLibraryItemsPart) GetFile() string { if o == nil { return "" } return o.File } func (o *GetLibraryItemsPart) GetSize() int64 { if o == nil { return 0 } return o.Size } func (o *GetLibraryItemsPart) GetContainer() string { if o == nil { return "" } return o.Container } func (o *GetLibraryItemsPart) GetAudioProfile() *string { if o == nil { return nil } return o.AudioProfile } func (o *GetLibraryItemsPart) GetHas64bitOffsets() *bool { if o == nil { return nil } return o.Has64bitOffsets } func (o *GetLibraryItemsPart) GetOptimizedForStreaming() *bool { if o == nil { return nil } return o.OptimizedForStreaming } func (o *GetLibraryItemsPart) GetVideoProfile() *string { if o == nil { return nil } return o.VideoProfile } func (o *GetLibraryItemsPart) GetIndexes() *string { if o == nil { return nil } return o.Indexes } func (o *GetLibraryItemsPart) GetHasThumbnail() *GetLibraryItemsHasThumbnail { if o == nil { return nil } return o.HasThumbnail } func (o *GetLibraryItemsPart) GetStream() []GetLibraryItemsStream { if o == nil { return nil } return o.Stream } type GetLibraryItemsMedia struct { ID int `json:"id"` Duration *int `json:"duration,omitempty"` Bitrate *int `json:"bitrate,omitempty"` Width *int `json:"width,omitempty"` Height *int `json:"height,omitempty"` AspectRatio *float64 `json:"aspectRatio,omitempty"` AudioProfile *string `json:"audioProfile,omitempty"` AudioChannels *int `json:"audioChannels,omitempty"` AudioCodec *string `json:"audioCodec,omitempty"` VideoCodec *string `json:"videoCodec,omitempty"` VideoResolution *string `json:"videoResolution,omitempty"` Container string `json:"container"` VideoFrameRate *string `json:"videoFrameRate,omitempty"` VideoProfile *string `json:"videoProfile,omitempty"` HasVoiceActivity *bool `json:"hasVoiceActivity,omitempty"` OptimizedForStreaming *GetLibraryItemsOptimizedForStreaming `default:"0" json:"optimizedForStreaming"` Has64bitOffsets *bool `json:"has64bitOffsets,omitempty"` Part []GetLibraryItemsPart `json:"Part"` } func (g GetLibraryItemsMedia) MarshalJSON() ([]byte, error) { return utils.MarshalJSON(g, "", false) } func (g *GetLibraryItemsMedia) UnmarshalJSON(data []byte) error { if err := utils.UnmarshalJSON(data, &g, "", false, false); err != nil { return err } return nil } func (o *GetLibraryItemsMedia) GetID() int { if o == nil { return 0 } return o.ID } func (o *GetLibraryItemsMedia) GetDuration() *int { if o == nil { return nil } return o.Duration } func (o *GetLibraryItemsMedia) GetBitrate() *int { if o == nil { return nil } return o.Bitrate } func (o *GetLibraryItemsMedia) GetWidth() *int { if o == nil { return nil } return o.Width } func (o *GetLibraryItemsMedia) GetHeight() *int { if o == nil { return nil } return o.Height } func (o *GetLibraryItemsMedia) GetAspectRatio() *float64 { if o == nil { return nil } return o.AspectRatio } func (o *GetLibraryItemsMedia) GetAudioProfile() *string { if o == nil { return nil } return o.AudioProfile } func (o *GetLibraryItemsMedia) GetAudioChannels() *int { if o == nil { return nil } return o.AudioChannels } func (o *GetLibraryItemsMedia) GetAudioCodec() *string { if o == nil { return nil } return o.AudioCodec } func (o *GetLibraryItemsMedia) GetVideoCodec() *string { if o == nil { return nil } return o.VideoCodec } func (o *GetLibraryItemsMedia) GetVideoResolution() *string { if o == nil { return nil } return o.VideoResolution } func (o *GetLibraryItemsMedia) GetContainer() string { if o == nil { return "" } return o.Container } func (o *GetLibraryItemsMedia) GetVideoFrameRate() *string { if o == nil { return nil } return o.VideoFrameRate } func (o *GetLibraryItemsMedia) GetVideoProfile() *string { if o == nil { return nil } return o.VideoProfile } func (o *GetLibraryItemsMedia) GetHasVoiceActivity() *bool { if o == nil { return nil } return o.HasVoiceActivity } func (o *GetLibraryItemsMedia) GetOptimizedForStreaming() *GetLibraryItemsOptimizedForStreaming { if o == nil { return nil } return o.OptimizedForStreaming } func (o *GetLibraryItemsMedia) GetHas64bitOffsets() *bool { if o == nil { return nil } return o.Has64bitOffsets } func (o *GetLibraryItemsMedia) GetPart() []GetLibraryItemsPart { if o == nil { return []GetLibraryItemsPart{} } return o.Part } type GetLibraryItemsGenre struct { Tag *string `json:"tag,omitempty"` } func (o *GetLibraryItemsGenre) GetTag() *string { if o == nil { return nil } return o.Tag } type GetLibraryItemsCountry struct { Tag *string `json:"tag,omitempty"` } func (o *GetLibraryItemsCountry) GetTag() *string { if o == nil { return nil } return o.Tag } type GetLibraryItemsDirector struct { Tag *string `json:"tag,omitempty"` } func (o *GetLibraryItemsDirector) GetTag() *string { if o == nil { return nil } return o.Tag } type GetLibraryItemsWriter struct { Tag *string `json:"tag,omitempty"` } func (o *GetLibraryItemsWriter) GetTag() *string { if o == nil { return nil } return o.Tag } type GetLibraryItemsCollection struct { Tag *string `json:"tag,omitempty"` } func (o *GetLibraryItemsCollection) GetTag() *string { if o == nil { return nil } return o.Tag } type GetLibraryItemsRole struct { // The ID of the tag or actor. ID *int64 `json:"id,omitempty"` // The filter used to find the actor or tag. Filter *string `json:"filter,omitempty"` // The thumbnail of the actor Thumb *string `json:"thumb,omitempty"` // The name of the tag or actor. Tag *string `json:"tag,omitempty"` // Unique identifier for the tag. TagKey *string `json:"tagKey,omitempty"` // The role of the actor or tag in the media. Role *string `json:"role,omitempty"` } func (o *GetLibraryItemsRole) GetID() *int64 { if o == nil { return nil } return o.ID } func (o *GetLibraryItemsRole) GetFilter() *string { if o == nil { return nil } return o.Filter } func (o *GetLibraryItemsRole) GetThumb() *string { if o == nil { return nil } return o.Thumb } func (o *GetLibraryItemsRole) GetTag() *string { if o == nil { return nil } return o.Tag } func (o *GetLibraryItemsRole) GetTagKey() *string { if o == nil { return nil } return o.TagKey } func (o *GetLibraryItemsRole) GetRole() *string { if o == nil { return nil } return o.Role } type GetLibraryItemsLocation struct { Path *string `json:"path,omitempty"` } func (o *GetLibraryItemsLocation) GetPath() *string { if o == nil { return nil } return o.Path } type GetLibraryItemsMediaGUID struct { // Can be one of the following formats: // imdb://tt13015952, tmdb://2434012, tvdb://7945991 // ID string `json:"id"` } func (o *GetLibraryItemsMediaGUID) GetID() string { if o == nil { return "" } return o.ID } type GetLibraryItemsUltraBlurColors struct { TopLeft string `json:"topLeft"` TopRight string `json:"topRight"` BottomRight string `json:"bottomRight"` BottomLeft string `json:"bottomLeft"` } func (o *GetLibraryItemsUltraBlurColors) GetTopLeft() string { if o == nil { return "" } return o.TopLeft } func (o *GetLibraryItemsUltraBlurColors) GetTopRight() string { if o == nil { return "" } return o.TopRight } func (o *GetLibraryItemsUltraBlurColors) GetBottomRight() string { if o == nil { return "" } return o.BottomRight } func (o *GetLibraryItemsUltraBlurColors) GetBottomLeft() string { if o == nil { return "" } return o.BottomLeft } type GetLibraryItemsMetaDataRating struct { // A URI or path to the rating image. Image string `json:"image"` // The value of the rating. Value float32 `json:"value"` // The type of rating (e.g., audience, critic). Type string `json:"type"` } func (o *GetLibraryItemsMetaDataRating) GetImage() string { if o == nil { return "" } return o.Image } func (o *GetLibraryItemsMetaDataRating) GetValue() float32 { if o == nil { return 0.0 } return o.Value } func (o *GetLibraryItemsMetaDataRating) GetType() string { if o == nil { return "" } return o.Type } type GetLibraryItemsLibraryResponse200Type string const ( GetLibraryItemsLibraryResponse200TypeCoverPoster GetLibraryItemsLibraryResponse200Type = "coverPoster" GetLibraryItemsLibraryResponse200TypeBackground GetLibraryItemsLibraryResponse200Type = "background" GetLibraryItemsLibraryResponse200TypeSnapshot GetLibraryItemsLibraryResponse200Type = "snapshot" GetLibraryItemsLibraryResponse200TypeClearLogo GetLibraryItemsLibraryResponse200Type = "clearLogo" ) func (e GetLibraryItemsLibraryResponse200Type) ToPointer() *GetLibraryItemsLibraryResponse200Type { return &e } func (e *GetLibraryItemsLibraryResponse200Type) UnmarshalJSON(data []byte) error { var v string if err := json.Unmarshal(data, &v); err != nil { return err } switch v { case "coverPoster": fallthrough case "background": fallthrough case "snapshot": fallthrough case "clearLogo": *e = GetLibraryItemsLibraryResponse200Type(v) return nil default: return fmt.Errorf("invalid value for GetLibraryItemsLibraryResponse200Type: %v", v) } } type GetLibraryItemsImage struct { Alt string `json:"alt"` Type GetLibraryItemsLibraryResponse200Type `json:"type"` URL string `json:"url"` } func (o *GetLibraryItemsImage) GetAlt() string { if o == nil { return "" } return o.Alt } func (o *GetLibraryItemsImage) GetType() GetLibraryItemsLibraryResponse200Type { if o == nil { return GetLibraryItemsLibraryResponse200Type("") } return o.Type } func (o *GetLibraryItemsImage) GetURL() string { if o == nil { return "" } return o.URL } type GetLibraryItemsMetadata struct { // The rating key (Media ID) of this media item. // Note: This is always an integer, but is represented as a string in the API. // RatingKey string `json:"ratingKey"` Key string `json:"key"` GUID string `json:"guid"` Studio *string `json:"studio,omitempty"` SkipChildren *bool `json:"skipChildren,omitempty"` LibrarySectionID *int64 `json:"librarySectionID,omitempty"` LibrarySectionTitle *string `json:"librarySectionTitle,omitempty"` LibrarySectionKey *string `json:"librarySectionKey,omitempty"` // The type of media content // Type GetLibraryItemsLibraryType `json:"type"` Title string `json:"title"` Slug *string `json:"slug,omitempty"` ContentRating *string `json:"contentRating,omitempty"` Summary string `json:"summary"` Rating *float64 `json:"rating,omitempty"` AudienceRating *float64 `json:"audienceRating,omitempty"` Year *int `json:"year,omitempty"` SeasonCount *int `json:"seasonCount,omitempty"` Tagline *string `json:"tagline,omitempty"` // Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). FlattenSeasons *GetLibraryItemsFlattenSeasons `json:"flattenSeasons,omitempty"` // Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first). EpisodeSort *GetLibraryItemsEpisodeSort `json:"episodeSort,omitempty"` // Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled). EnableCreditsMarkerGeneration *GetLibraryItemsEnableCreditsMarkerGeneration `json:"enableCreditsMarkerGeneration,omitempty"` // Setting that indicates the episode ordering for the show. // None = Library default, // tmdbAiring = The Movie Database (Aired), // aired = TheTVDB (Aired), // dvd = TheTVDB (DVD), // absolute = TheTVDB (Absolute)). // ShowOrdering *GetLibraryItemsShowOrdering `json:"showOrdering,omitempty"` Thumb *string `json:"thumb,omitempty"` Art *string `json:"art,omitempty"` Banner *string `json:"banner,omitempty"` Duration *int `json:"duration,omitempty"` OriginallyAvailableAt *types.Date `json:"originallyAvailableAt,omitempty"` // Unix epoch datetime in seconds AddedAt int64 `json:"addedAt"` // Unix epoch datetime in seconds UpdatedAt *int64 `json:"updatedAt,omitempty"` AudienceRatingImage *string `json:"audienceRatingImage,omitempty"` ChapterSource *string `json:"chapterSource,omitempty"` PrimaryExtraKey *string `json:"primaryExtraKey,omitempty"` RatingImage *string `json:"ratingImage,omitempty"` GrandparentRatingKey *string `json:"grandparentRatingKey,omitempty"` GrandparentGUID *string `json:"grandparentGuid,omitempty"` GrandparentKey *string `json:"grandparentKey,omitempty"` GrandparentTitle *string `json:"grandparentTitle,omitempty"` GrandparentThumb *string `json:"grandparentThumb,omitempty"` ParentSlug *string `json:"parentSlug,omitempty"` GrandparentSlug *string `json:"grandparentSlug,omitempty"` GrandparentArt *string `json:"grandparentArt,omitempty"` GrandparentTheme *string `json:"grandparentTheme,omitempty"` // The Media object is only included when type query is `4` or higher. // Media []GetLibraryItemsMedia `json:"Media,omitempty"` Genre []GetLibraryItemsGenre `json:"Genre,omitempty"` Country []GetLibraryItemsCountry `json:"Country,omitempty"` Director []GetLibraryItemsDirector `json:"Director,omitempty"` Writer []GetLibraryItemsWriter `json:"Writer,omitempty"` Collection []GetLibraryItemsCollection `json:"Collection,omitempty"` Role []GetLibraryItemsRole `json:"Role,omitempty"` Location []GetLibraryItemsLocation `json:"Location,omitempty"` // The Guid object is only included in the response if the `includeGuids` parameter is set to `1`. // MediaGUID []GetLibraryItemsMediaGUID `json:"Guid,omitempty"` UltraBlurColors *GetLibraryItemsUltraBlurColors `json:"UltraBlurColors,omitempty"` MetaDataRating []GetLibraryItemsMetaDataRating `json:"Rating,omitempty"` Image []GetLibraryItemsImage `json:"Image,omitempty"` TitleSort *string `json:"titleSort,omitempty"` ViewCount *int `json:"viewCount,omitempty"` LastViewedAt *int `json:"lastViewedAt,omitempty"` OriginalTitle *string `json:"originalTitle,omitempty"` ViewOffset *int `json:"viewOffset,omitempty"` SkipCount *int `json:"skipCount,omitempty"` Index *int `json:"index,omitempty"` Theme *string `json:"theme,omitempty"` LeafCount *int `json:"leafCount,omitempty"` ViewedLeafCount *int `json:"viewedLeafCount,omitempty"` ChildCount *int `json:"childCount,omitempty"` HasPremiumExtras *string `json:"hasPremiumExtras,omitempty"` HasPremiumPrimaryExtra *string `json:"hasPremiumPrimaryExtra,omitempty"` // The rating key of the parent item. // ParentRatingKey *string `json:"parentRatingKey,omitempty"` ParentGUID *string `json:"parentGuid,omitempty"` ParentStudio *string `json:"parentStudio,omitempty"` ParentKey *string `json:"parentKey,omitempty"` ParentTitle *string `json:"parentTitle,omitempty"` ParentIndex *int `json:"parentIndex,omitempty"` ParentYear *int `json:"parentYear,omitempty"` ParentThumb *string `json:"parentThumb,omitempty"` ParentTheme *string `json:"parentTheme,omitempty"` } func (g GetLibraryItemsMetadata) MarshalJSON() ([]byte, error) { return utils.MarshalJSON(g, "", false) } func (g *GetLibraryItemsMetadata) UnmarshalJSON(data []byte) error { if err := utils.UnmarshalJSON(data, &g, "", false, false); err != nil { return err } return nil } func (o *GetLibraryItemsMetadata) GetRatingKey() string { if o == nil { return "" } return o.RatingKey } func (o *GetLibraryItemsMetadata) GetKey() string { if o == nil { return "" } return o.Key } func (o *GetLibraryItemsMetadata) GetGUID() string { if o == nil { return "" } return o.GUID } func (o *GetLibraryItemsMetadata) GetStudio() *string { if o == nil { return nil } return o.Studio } func (o *GetLibraryItemsMetadata) GetSkipChildren() *bool { if o == nil { return nil } return o.SkipChildren } func (o *GetLibraryItemsMetadata) GetLibrarySectionID() *int64 { if o == nil { return nil } return o.LibrarySectionID } func (o *GetLibraryItemsMetadata) GetLibrarySectionTitle() *string { if o == nil { return nil } return o.LibrarySectionTitle } func (o *GetLibraryItemsMetadata) GetLibrarySectionKey() *string { if o == nil { return nil } return o.LibrarySectionKey } func (o *GetLibraryItemsMetadata) GetType() GetLibraryItemsLibraryType { if o == nil { return GetLibraryItemsLibraryType("") } return o.Type } func (o *GetLibraryItemsMetadata) GetTitle() string { if o == nil { return "" } return o.Title } func (o *GetLibraryItemsMetadata) GetSlug() *string { if o == nil { return nil } return o.Slug } func (o *GetLibraryItemsMetadata) GetContentRating() *string { if o == nil { return nil } return o.ContentRating } func (o *GetLibraryItemsMetadata) GetSummary() string { if o == nil { return "" } return o.Summary } func (o *GetLibraryItemsMetadata) GetRating() *float64 { if o == nil { return nil } return o.Rating } func (o *GetLibraryItemsMetadata) GetAudienceRating() *float64 { if o == nil { return nil } return o.AudienceRating } func (o *GetLibraryItemsMetadata) GetYear() *int { if o == nil { return nil } return o.Year } func (o *GetLibraryItemsMetadata) GetSeasonCount() *int { if o == nil { return nil } return o.SeasonCount } func (o *GetLibraryItemsMetadata) GetTagline() *string { if o == nil { return nil } return o.Tagline } func (o *GetLibraryItemsMetadata) GetFlattenSeasons() *GetLibraryItemsFlattenSeasons { if o == nil { return nil } return o.FlattenSeasons } func (o *GetLibraryItemsMetadata) GetEpisodeSort() *GetLibraryItemsEpisodeSort { if o == nil { return nil } return o.EpisodeSort } func (o *GetLibraryItemsMetadata) GetEnableCreditsMarkerGeneration() *GetLibraryItemsEnableCreditsMarkerGeneration { if o == nil { return nil } return o.EnableCreditsMarkerGeneration } func (o *GetLibraryItemsMetadata) GetShowOrdering() *GetLibraryItemsShowOrdering { if o == nil { return nil } return o.ShowOrdering } func (o *GetLibraryItemsMetadata) GetThumb() *string { if o == nil { return nil } return o.Thumb } func (o *GetLibraryItemsMetadata) GetArt() *string { if o == nil { return nil } return o.Art } func (o *GetLibraryItemsMetadata) GetBanner() *string { if o == nil { return nil } return o.Banner } func (o *GetLibraryItemsMetadata) GetDuration() *int { if o == nil { return nil } return o.Duration } func (o *GetLibraryItemsMetadata) GetOriginallyAvailableAt() *types.Date { if o == nil { return nil } return o.OriginallyAvailableAt } func (o *GetLibraryItemsMetadata) GetAddedAt() int64 { if o == nil { return 0 } return o.AddedAt } func (o *GetLibraryItemsMetadata) GetUpdatedAt() *int64 { if o == nil { return nil } return o.UpdatedAt } func (o *GetLibraryItemsMetadata) GetAudienceRatingImage() *string { if o == nil { return nil } return o.AudienceRatingImage } func (o *GetLibraryItemsMetadata) GetChapterSource() *string { if o == nil { return nil } return o.ChapterSource } func (o *GetLibraryItemsMetadata) GetPrimaryExtraKey() *string { if o == nil { return nil } return o.PrimaryExtraKey } func (o *GetLibraryItemsMetadata) GetRatingImage() *string { if o == nil { return nil } return o.RatingImage } func (o *GetLibraryItemsMetadata) GetGrandparentRatingKey() *string { if o == nil { return nil } return o.GrandparentRatingKey } func (o *GetLibraryItemsMetadata) GetGrandparentGUID() *string { if o == nil { return nil } return o.GrandparentGUID } func (o *GetLibraryItemsMetadata) GetGrandparentKey() *string { if o == nil { return nil } return o.GrandparentKey } func (o *GetLibraryItemsMetadata) GetGrandparentTitle() *string { if o == nil { return nil } return o.GrandparentTitle } func (o *GetLibraryItemsMetadata) GetGrandparentThumb() *string { if o == nil { return nil } return o.GrandparentThumb } func (o *GetLibraryItemsMetadata) GetParentSlug() *string { if o == nil { return nil } return o.ParentSlug } func (o *GetLibraryItemsMetadata) GetGrandparentSlug() *string { if o == nil { return nil } return o.GrandparentSlug } func (o *GetLibraryItemsMetadata) GetGrandparentArt() *string { if o == nil { return nil } return o.GrandparentArt } func (o *GetLibraryItemsMetadata) GetGrandparentTheme() *string { if o == nil { return nil } return o.GrandparentTheme } func (o *GetLibraryItemsMetadata) GetMedia() []GetLibraryItemsMedia { if o == nil { return nil } return o.Media } func (o *GetLibraryItemsMetadata) GetGenre() []GetLibraryItemsGenre { if o == nil { return nil } return o.Genre } func (o *GetLibraryItemsMetadata) GetCountry() []GetLibraryItemsCountry { if o == nil { return nil } return o.Country } func (o *GetLibraryItemsMetadata) GetDirector() []GetLibraryItemsDirector { if o == nil { return nil } return o.Director } func (o *GetLibraryItemsMetadata) GetWriter() []GetLibraryItemsWriter { if o == nil { return nil } return o.Writer } func (o *GetLibraryItemsMetadata) GetCollection() []GetLibraryItemsCollection { if o == nil { return nil } return o.Collection } func (o *GetLibraryItemsMetadata) GetRole() []GetLibraryItemsRole { if o == nil { return nil } return o.Role } func (o *GetLibraryItemsMetadata) GetLocation() []GetLibraryItemsLocation { if o == nil { return nil } return o.Location } func (o *GetLibraryItemsMetadata) GetMediaGUID() []GetLibraryItemsMediaGUID { if o == nil { return nil } return o.MediaGUID } func (o *GetLibraryItemsMetadata) GetUltraBlurColors() *GetLibraryItemsUltraBlurColors { if o == nil { return nil } return o.UltraBlurColors } func (o *GetLibraryItemsMetadata) GetMetaDataRating() []GetLibraryItemsMetaDataRating { if o == nil { return nil } return o.MetaDataRating } func (o *GetLibraryItemsMetadata) GetImage() []GetLibraryItemsImage { if o == nil { return nil } return o.Image } func (o *GetLibraryItemsMetadata) GetTitleSort() *string { if o == nil { return nil } return o.TitleSort } func (o *GetLibraryItemsMetadata) GetViewCount() *int { if o == nil { return nil } return o.ViewCount } func (o *GetLibraryItemsMetadata) GetLastViewedAt() *int { if o == nil { return nil } return o.LastViewedAt } func (o *GetLibraryItemsMetadata) GetOriginalTitle() *string { if o == nil { return nil } return o.OriginalTitle } func (o *GetLibraryItemsMetadata) GetViewOffset() *int { if o == nil { return nil } return o.ViewOffset } func (o *GetLibraryItemsMetadata) GetSkipCount() *int { if o == nil { return nil } return o.SkipCount } func (o *GetLibraryItemsMetadata) GetIndex() *int { if o == nil { return nil } return o.Index } func (o *GetLibraryItemsMetadata) GetTheme() *string { if o == nil { return nil } return o.Theme } func (o *GetLibraryItemsMetadata) GetLeafCount() *int { if o == nil { return nil } return o.LeafCount } func (o *GetLibraryItemsMetadata) GetViewedLeafCount() *int { if o == nil { return nil } return o.ViewedLeafCount } func (o *GetLibraryItemsMetadata) GetChildCount() *int { if o == nil { return nil } return o.ChildCount } func (o *GetLibraryItemsMetadata) GetHasPremiumExtras() *string { if o == nil { return nil } return o.HasPremiumExtras } func (o *GetLibraryItemsMetadata) GetHasPremiumPrimaryExtra() *string { if o == nil { return nil } return o.HasPremiumPrimaryExtra } func (o *GetLibraryItemsMetadata) GetParentRatingKey() *string { if o == nil { return nil } return o.ParentRatingKey } func (o *GetLibraryItemsMetadata) GetParentGUID() *string { if o == nil { return nil } return o.ParentGUID } func (o *GetLibraryItemsMetadata) GetParentStudio() *string { if o == nil { return nil } return o.ParentStudio } func (o *GetLibraryItemsMetadata) GetParentKey() *string { if o == nil { return nil } return o.ParentKey } func (o *GetLibraryItemsMetadata) GetParentTitle() *string { if o == nil { return nil } return o.ParentTitle } func (o *GetLibraryItemsMetadata) GetParentIndex() *int { if o == nil { return nil } return o.ParentIndex } func (o *GetLibraryItemsMetadata) GetParentYear() *int { if o == nil { return nil } return o.ParentYear } func (o *GetLibraryItemsMetadata) GetParentThumb() *string { if o == nil { return nil } return o.ParentThumb } func (o *GetLibraryItemsMetadata) GetParentTheme() *string { if o == nil { return nil } return o.ParentTheme } type GetLibraryItemsLibraryFilter struct { Filter string `json:"filter"` FilterType string `json:"filterType"` Key string `json:"key"` Title string `json:"title"` Type string `json:"type"` } func (o *GetLibraryItemsLibraryFilter) GetFilter() string { if o == nil { return "" } return o.Filter } func (o *GetLibraryItemsLibraryFilter) GetFilterType() string { if o == nil { return "" } return o.FilterType } func (o *GetLibraryItemsLibraryFilter) GetKey() string { if o == nil { return "" } return o.Key } func (o *GetLibraryItemsLibraryFilter) GetTitle() string { if o == nil { return "" } return o.Title } func (o *GetLibraryItemsLibraryFilter) GetType() string { if o == nil { return "" } return o.Type } // GetLibraryItemsLibraryActiveDirection - The direction of the sort. Can be either `asc` or `desc`. type GetLibraryItemsLibraryActiveDirection string const ( GetLibraryItemsLibraryActiveDirectionAscending GetLibraryItemsLibraryActiveDirection = "asc" GetLibraryItemsLibraryActiveDirectionDescending GetLibraryItemsLibraryActiveDirection = "desc" ) func (e GetLibraryItemsLibraryActiveDirection) ToPointer() *GetLibraryItemsLibraryActiveDirection { return &e } func (e *GetLibraryItemsLibraryActiveDirection) UnmarshalJSON(data []byte) error { var v string if err := json.Unmarshal(data, &v); err != nil { return err } switch v { case "asc": fallthrough case "desc": *e = GetLibraryItemsLibraryActiveDirection(v) return nil default: return fmt.Errorf("invalid value for GetLibraryItemsLibraryActiveDirection: %v", v) } } // GetLibraryItemsLibraryDefaultDirection - The direction of the sort. Can be either `asc` or `desc`. type GetLibraryItemsLibraryDefaultDirection string const ( GetLibraryItemsLibraryDefaultDirectionAscending GetLibraryItemsLibraryDefaultDirection = "asc" GetLibraryItemsLibraryDefaultDirectionDescending GetLibraryItemsLibraryDefaultDirection = "desc" ) func (e GetLibraryItemsLibraryDefaultDirection) ToPointer() *GetLibraryItemsLibraryDefaultDirection { return &e } func (e *GetLibraryItemsLibraryDefaultDirection) UnmarshalJSON(data []byte) error { var v string if err := json.Unmarshal(data, &v); err != nil { return err } switch v { case "asc": fallthrough case "desc": *e = GetLibraryItemsLibraryDefaultDirection(v) return nil default: return fmt.Errorf("invalid value for GetLibraryItemsLibraryDefaultDirection: %v", v) } } type GetLibraryItemsLibrarySort struct { Default *string `json:"default,omitempty"` Active *bool `json:"active,omitempty"` // The direction of the sort. Can be either `asc` or `desc`. // ActiveDirection *GetLibraryItemsLibraryActiveDirection `default:"asc" json:"activeDirection"` // The direction of the sort. Can be either `asc` or `desc`. // DefaultDirection *GetLibraryItemsLibraryDefaultDirection `default:"asc" json:"defaultDirection"` DescKey *string `json:"descKey,omitempty"` FirstCharacterKey *string `json:"firstCharacterKey,omitempty"` Key string `json:"key"` Title string `json:"title"` } func (g GetLibraryItemsLibrarySort) MarshalJSON() ([]byte, error) { return utils.MarshalJSON(g, "", false) } func (g *GetLibraryItemsLibrarySort) UnmarshalJSON(data []byte) error { if err := utils.UnmarshalJSON(data, &g, "", false, false); err != nil { return err } return nil } func (o *GetLibraryItemsLibrarySort) GetDefault() *string { if o == nil { return nil } return o.Default } func (o *GetLibraryItemsLibrarySort) GetActive() *bool { if o == nil { return nil } return o.Active } func (o *GetLibraryItemsLibrarySort) GetActiveDirection() *GetLibraryItemsLibraryActiveDirection { if o == nil { return nil } return o.ActiveDirection } func (o *GetLibraryItemsLibrarySort) GetDefaultDirection() *GetLibraryItemsLibraryDefaultDirection { if o == nil { return nil } return o.DefaultDirection } func (o *GetLibraryItemsLibrarySort) GetDescKey() *string { if o == nil { return nil } return o.DescKey } func (o *GetLibraryItemsLibrarySort) GetFirstCharacterKey() *string { if o == nil { return nil } return o.FirstCharacterKey } func (o *GetLibraryItemsLibrarySort) GetKey() string { if o == nil { return "" } return o.Key } func (o *GetLibraryItemsLibrarySort) GetTitle() string { if o == nil { return "" } return o.Title } type GetLibraryItemsLibraryField struct { Key string `json:"key"` Title string `json:"title"` Type string `json:"type"` SubType *string `json:"subType,omitempty"` } func (o *GetLibraryItemsLibraryField) GetKey() string { if o == nil { return "" } return o.Key } func (o *GetLibraryItemsLibraryField) GetTitle() string { if o == nil { return "" } return o.Title } func (o *GetLibraryItemsLibraryField) GetType() string { if o == nil { return "" } return o.Type } func (o *GetLibraryItemsLibraryField) GetSubType() *string { if o == nil { return nil } return o.SubType } type GetLibraryItemsLibraryResponseType struct { Key string `json:"key"` Type string `json:"type"` Title string `json:"title"` Active bool `json:"active"` Filter []GetLibraryItemsLibraryFilter `json:"Filter,omitempty"` Sort []GetLibraryItemsLibrarySort `json:"Sort,omitempty"` Field []GetLibraryItemsLibraryField `json:"Field,omitempty"` } func (o *GetLibraryItemsLibraryResponseType) GetKey() string { if o == nil { return "" } return o.Key } func (o *GetLibraryItemsLibraryResponseType) GetType() string { if o == nil { return "" } return o.Type } func (o *GetLibraryItemsLibraryResponseType) GetTitle() string { if o == nil { return "" } return o.Title } func (o *GetLibraryItemsLibraryResponseType) GetActive() bool { if o == nil { return false } return o.Active } func (o *GetLibraryItemsLibraryResponseType) GetFilter() []GetLibraryItemsLibraryFilter { if o == nil { return nil } return o.Filter } func (o *GetLibraryItemsLibraryResponseType) GetSort() []GetLibraryItemsLibrarySort { if o == nil { return nil } return o.Sort } func (o *GetLibraryItemsLibraryResponseType) GetField() []GetLibraryItemsLibraryField { if o == nil { return nil } return o.Field } type GetLibraryItemsLibraryOperator struct { Key string `json:"key"` Title string `json:"title"` } func (o *GetLibraryItemsLibraryOperator) GetKey() string { if o == nil { return "" } return o.Key } func (o *GetLibraryItemsLibraryOperator) GetTitle() string { if o == nil { return "" } return o.Title } type GetLibraryItemsLibraryFieldType struct { Type string `json:"type"` Operator []GetLibraryItemsLibraryOperator `json:"Operator"` } func (o *GetLibraryItemsLibraryFieldType) GetType() string { if o == nil { return "" } return o.Type } func (o *GetLibraryItemsLibraryFieldType) GetOperator() []GetLibraryItemsLibraryOperator { if o == nil { return []GetLibraryItemsLibraryOperator{} } return o.Operator } // GetLibraryItemsMeta - The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. type GetLibraryItemsMeta struct { Type []GetLibraryItemsLibraryResponseType `json:"Type,omitempty"` FieldType []GetLibraryItemsLibraryFieldType `json:"FieldType,omitempty"` } func (o *GetLibraryItemsMeta) GetType() []GetLibraryItemsLibraryResponseType { if o == nil { return nil } return o.Type } func (o *GetLibraryItemsMeta) GetFieldType() []GetLibraryItemsLibraryFieldType { if o == nil { return nil } return o.FieldType } // GetLibraryItemsMediaContainer - The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. type GetLibraryItemsMediaContainer struct { Type []GetLibraryItemsType `json:"Type,omitempty"` FieldType []GetLibraryItemsFieldType `json:"FieldType,omitempty"` Size int `json:"size"` TotalSize int `json:"totalSize"` Offset int `json:"offset"` Content string `json:"content"` AllowSync bool `json:"allowSync"` Nocache *bool `json:"nocache,omitempty"` Art string `json:"art"` Identifier string `json:"identifier"` LibrarySectionID int64 `json:"librarySectionID"` LibrarySectionTitle string `json:"librarySectionTitle"` LibrarySectionUUID string `json:"librarySectionUUID"` MediaTagPrefix string `json:"mediaTagPrefix"` MediaTagVersion int `json:"mediaTagVersion"` Thumb string `json:"thumb"` Title1 string `json:"title1"` Title2 string `json:"title2"` ViewGroup string `json:"viewGroup"` ViewMode *int `json:"viewMode,omitempty"` MixedParents *bool `json:"mixedParents,omitempty"` Metadata []GetLibraryItemsMetadata `json:"Metadata,omitempty"` // The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. // Meta *GetLibraryItemsMeta `json:"Meta,omitempty"` } func (o *GetLibraryItemsMediaContainer) GetType() []GetLibraryItemsType { if o == nil { return nil } return o.Type } func (o *GetLibraryItemsMediaContainer) GetFieldType() []GetLibraryItemsFieldType { if o == nil { return nil } return o.FieldType } func (o *GetLibraryItemsMediaContainer) GetSize() int { if o == nil { return 0 } return o.Size } func (o *GetLibraryItemsMediaContainer) GetTotalSize() int { if o == nil { return 0 } return o.TotalSize } func (o *GetLibraryItemsMediaContainer) GetOffset() int { if o == nil { return 0 } return o.Offset } func (o *GetLibraryItemsMediaContainer) GetContent() string { if o == nil { return "" } return o.Content } func (o *GetLibraryItemsMediaContainer) GetAllowSync() bool { if o == nil { return false } return o.AllowSync } func (o *GetLibraryItemsMediaContainer) GetNocache() *bool { if o == nil { return nil } return o.Nocache } func (o *GetLibraryItemsMediaContainer) GetArt() string { if o == nil { return "" } return o.Art } func (o *GetLibraryItemsMediaContainer) GetIdentifier() string { if o == nil { return "" } return o.Identifier } func (o *GetLibraryItemsMediaContainer) GetLibrarySectionID() int64 { if o == nil { return 0 } return o.LibrarySectionID } func (o *GetLibraryItemsMediaContainer) GetLibrarySectionTitle() string { if o == nil { return "" } return o.LibrarySectionTitle } func (o *GetLibraryItemsMediaContainer) GetLibrarySectionUUID() string { if o == nil { return "" } return o.LibrarySectionUUID } func (o *GetLibraryItemsMediaContainer) GetMediaTagPrefix() string { if o == nil { return "" } return o.MediaTagPrefix } func (o *GetLibraryItemsMediaContainer) GetMediaTagVersion() int { if o == nil { return 0 } return o.MediaTagVersion } func (o *GetLibraryItemsMediaContainer) GetThumb() string { if o == nil { return "" } return o.Thumb } func (o *GetLibraryItemsMediaContainer) GetTitle1() string { if o == nil { return "" } return o.Title1 } func (o *GetLibraryItemsMediaContainer) GetTitle2() string { if o == nil { return "" } return o.Title2 } func (o *GetLibraryItemsMediaContainer) GetViewGroup() string { if o == nil { return "" } return o.ViewGroup } func (o *GetLibraryItemsMediaContainer) GetViewMode() *int { if o == nil { return nil } return o.ViewMode } func (o *GetLibraryItemsMediaContainer) GetMixedParents() *bool { if o == nil { return nil } return o.MixedParents } func (o *GetLibraryItemsMediaContainer) GetMetadata() []GetLibraryItemsMetadata { if o == nil { return nil } return o.Metadata } func (o *GetLibraryItemsMediaContainer) GetMeta() *GetLibraryItemsMeta { if o == nil { return nil } return o.Meta } // GetLibraryItemsResponseBody - The contents of the library by section and tag type GetLibraryItemsResponseBody struct { MediaContainer *GetLibraryItemsMediaContainer `json:"MediaContainer,omitempty"` } func (o *GetLibraryItemsResponseBody) GetMediaContainer() *GetLibraryItemsMediaContainer { if o == nil { return nil } return o.MediaContainer } type GetLibraryItemsResponse 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 contents of the library by section and tag Object *GetLibraryItemsResponseBody } func (o *GetLibraryItemsResponse) GetContentType() string { if o == nil { return "" } return o.ContentType } func (o *GetLibraryItemsResponse) GetStatusCode() int { if o == nil { return 0 } return o.StatusCode } func (o *GetLibraryItemsResponse) GetRawResponse() *http.Response { if o == nil { return nil } return o.RawResponse } func (o *GetLibraryItemsResponse) GetObject() *GetLibraryItemsResponseBody { if o == nil { return nil } return o.Object }