Files
plexgo/models/operations/getlibraryitems.go

2589 lines
61 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// 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"
)
// Tag - A key representing a specific tag within the section.
type Tag string
const (
TagUnwatched Tag = "unwatched"
TagNewest Tag = "newest"
TagRecentlyAdded Tag = "recentlyAdded"
TagRecentlyViewed Tag = "recentlyViewed"
TagOnDeck Tag = "onDeck"
TagCollection Tag = "collection"
TagEdition Tag = "edition"
TagYear Tag = "year"
TagDecade Tag = "decade"
TagDirector Tag = "director"
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
}
// 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
GetLibraryItemsQueryParamTypeArtist GetLibraryItemsQueryParamType = 5
GetLibraryItemsQueryParamTypeAlbum GetLibraryItemsQueryParamType = 6
GetLibraryItemsQueryParamTypeTrack GetLibraryItemsQueryParamType = 7
GetLibraryItemsQueryParamTypePhotoAlbum GetLibraryItemsQueryParamType = 8
GetLibraryItemsQueryParamTypePhoto GetLibraryItemsQueryParamType = 9
)
func (e GetLibraryItemsQueryParamType) ToPointer() *GetLibraryItemsQueryParamType {
return &e
}
// 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, []string{"tag", "type", "sectionKey"}); err != nil {
return err
}
return nil
}
func (g *GetLibraryItemsRequest) GetTag() Tag {
if g == nil {
return Tag("")
}
return g.Tag
}
func (g *GetLibraryItemsRequest) GetIncludeGuids() *IncludeGuids {
if g == nil {
return nil
}
return g.IncludeGuids
}
func (g *GetLibraryItemsRequest) GetType() GetLibraryItemsQueryParamType {
if g == nil {
return GetLibraryItemsQueryParamType(0)
}
return g.Type
}
func (g *GetLibraryItemsRequest) GetSectionKey() int {
if g == nil {
return 0
}
return g.SectionKey
}
func (g *GetLibraryItemsRequest) GetIncludeMeta() *GetLibraryItemsQueryParamIncludeMeta {
if g == nil {
return nil
}
return g.IncludeMeta
}
func (g *GetLibraryItemsRequest) GetXPlexContainerStart() *int {
if g == nil {
return nil
}
return g.XPlexContainerStart
}
func (g *GetLibraryItemsRequest) GetXPlexContainerSize() *int {
if g == nil {
return nil
}
return g.XPlexContainerSize
}
// GetLibraryItemsType - The type of media content in the Plex library. This can represent videos, music, or photos.
type GetLibraryItemsType string
const (
GetLibraryItemsTypeMovie GetLibraryItemsType = "movie"
GetLibraryItemsTypeTvShow GetLibraryItemsType = "show"
GetLibraryItemsTypeSeason GetLibraryItemsType = "season"
GetLibraryItemsTypeEpisode GetLibraryItemsType = "episode"
GetLibraryItemsTypeArtist GetLibraryItemsType = "artist"
GetLibraryItemsTypeAlbum GetLibraryItemsType = "album"
GetLibraryItemsTypeTrack GetLibraryItemsType = "track"
GetLibraryItemsTypePhotoAlbum GetLibraryItemsType = "photoalbum"
GetLibraryItemsTypePhoto GetLibraryItemsType = "photo"
GetLibraryItemsTypeCollection GetLibraryItemsType = "collection"
)
func (e GetLibraryItemsType) ToPointer() *GetLibraryItemsType {
return &e
}
type GetLibraryItemsLibraryResponseType string
const (
GetLibraryItemsLibraryResponseTypeCoverPoster GetLibraryItemsLibraryResponseType = "coverPoster"
GetLibraryItemsLibraryResponseTypeBackground GetLibraryItemsLibraryResponseType = "background"
GetLibraryItemsLibraryResponseTypeSnapshot GetLibraryItemsLibraryResponseType = "snapshot"
GetLibraryItemsLibraryResponseTypeClearLogo GetLibraryItemsLibraryResponseType = "clearLogo"
)
func (e GetLibraryItemsLibraryResponseType) ToPointer() *GetLibraryItemsLibraryResponseType {
return &e
}
type GetLibraryItemsImage struct {
Alt string `json:"alt"`
Type GetLibraryItemsLibraryResponseType `json:"type"`
URL string `json:"url"`
}
func (g *GetLibraryItemsImage) GetAlt() string {
if g == nil {
return ""
}
return g.Alt
}
func (g *GetLibraryItemsImage) GetType() GetLibraryItemsLibraryResponseType {
if g == nil {
return GetLibraryItemsLibraryResponseType("")
}
return g.Type
}
func (g *GetLibraryItemsImage) GetURL() string {
if g == nil {
return ""
}
return g.URL
}
type GetLibraryItemsUltraBlurColors struct {
TopLeft string `json:"topLeft"`
TopRight string `json:"topRight"`
BottomRight string `json:"bottomRight"`
BottomLeft string `json:"bottomLeft"`
}
func (g *GetLibraryItemsUltraBlurColors) GetTopLeft() string {
if g == nil {
return ""
}
return g.TopLeft
}
func (g *GetLibraryItemsUltraBlurColors) GetTopRight() string {
if g == nil {
return ""
}
return g.TopRight
}
func (g *GetLibraryItemsUltraBlurColors) GetBottomRight() string {
if g == nil {
return ""
}
return g.BottomRight
}
func (g *GetLibraryItemsUltraBlurColors) GetBottomLeft() string {
if g == nil {
return ""
}
return g.BottomLeft
}
type GetLibraryItemsGuids struct {
// The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb://
//
ID string `json:"id"`
}
func (g *GetLibraryItemsGuids) GetID() string {
if g == nil {
return ""
}
return g.ID
}
// ShowOrdering - Setting that indicates the episode ordering for the show.
// Options:
// - None = Library default
// - tmdbAiring = The Movie Database (Aired)
// - aired = TheTVDB (Aired)
// - dvd = TheTVDB (DVD)
// - absolute = TheTVDB (Absolute)
type ShowOrdering string
const (
ShowOrderingNone ShowOrdering = "None"
ShowOrderingTmdbAiring ShowOrdering = "tmdbAiring"
ShowOrderingTvdbAired ShowOrdering = "aired"
ShowOrderingTvdbDvd ShowOrdering = "dvd"
ShowOrderingTvdbAbsolute ShowOrdering = "absolute"
)
func (e ShowOrdering) ToPointer() *ShowOrdering {
return &e
}
// FlattenSeasons - Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
type FlattenSeasons string
const (
FlattenSeasonsLibraryDefault FlattenSeasons = "-1"
FlattenSeasonsHide FlattenSeasons = "0"
FlattenSeasonsShow FlattenSeasons = "1"
)
func (e FlattenSeasons) ToPointer() *FlattenSeasons {
return &e
}
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 GetLibraryItemsOptimizedForStreamingType string
const (
GetLibraryItemsOptimizedForStreamingTypeOptimizedForStreaming1 GetLibraryItemsOptimizedForStreamingType = "optimizedForStreaming_1"
GetLibraryItemsOptimizedForStreamingTypeBoolean GetLibraryItemsOptimizedForStreamingType = "boolean"
)
// GetLibraryItemsOptimizedForStreaming - Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
type GetLibraryItemsOptimizedForStreaming struct {
OptimizedForStreaming1 *OptimizedForStreaming1 `queryParam:"inline,name=optimizedForStreaming"`
Boolean *bool `queryParam:"inline,name=optimizedForStreaming"`
Type GetLibraryItemsOptimizedForStreamingType
}
func CreateGetLibraryItemsOptimizedForStreamingOptimizedForStreaming1(optimizedForStreaming1 OptimizedForStreaming1) GetLibraryItemsOptimizedForStreaming {
typ := GetLibraryItemsOptimizedForStreamingTypeOptimizedForStreaming1
return GetLibraryItemsOptimizedForStreaming{
OptimizedForStreaming1: &optimizedForStreaming1,
Type: typ,
}
}
func CreateGetLibraryItemsOptimizedForStreamingBoolean(boolean bool) GetLibraryItemsOptimizedForStreaming {
typ := GetLibraryItemsOptimizedForStreamingTypeBoolean
return GetLibraryItemsOptimizedForStreaming{
Boolean: &boolean,
Type: typ,
}
}
func (u *GetLibraryItemsOptimizedForStreaming) UnmarshalJSON(data []byte) error {
var optimizedForStreaming1 OptimizedForStreaming1 = OptimizedForStreaming1(0)
if err := utils.UnmarshalJSON(data, &optimizedForStreaming1, "", true, nil); err == nil {
u.OptimizedForStreaming1 = &optimizedForStreaming1
u.Type = GetLibraryItemsOptimizedForStreamingTypeOptimizedForStreaming1
return nil
}
var boolean bool = false
if err := utils.UnmarshalJSON(data, &boolean, "", true, nil); err == nil {
u.Boolean = &boolean
u.Type = GetLibraryItemsOptimizedForStreamingTypeBoolean
return nil
}
return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetLibraryItemsOptimizedForStreaming", string(data))
}
func (u GetLibraryItemsOptimizedForStreaming) 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 GetLibraryItemsOptimizedForStreaming: all fields are null")
}
type GetLibraryItemsOptimizedForStreaming1 int
const (
GetLibraryItemsOptimizedForStreaming1Zero GetLibraryItemsOptimizedForStreaming1 = 0
GetLibraryItemsOptimizedForStreaming1One GetLibraryItemsOptimizedForStreaming1 = 1
)
func (e GetLibraryItemsOptimizedForStreaming1) ToPointer() *GetLibraryItemsOptimizedForStreaming1 {
return &e
}
func (e *GetLibraryItemsOptimizedForStreaming1) 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 = GetLibraryItemsOptimizedForStreaming1(v)
return nil
default:
return fmt.Errorf("invalid value for GetLibraryItemsOptimizedForStreaming1: %v", v)
}
}
type GetLibraryItemsLibraryOptimizedForStreamingType string
const (
GetLibraryItemsLibraryOptimizedForStreamingTypeGetLibraryItemsOptimizedForStreaming1 GetLibraryItemsLibraryOptimizedForStreamingType = "get-library-items_optimizedForStreaming_1"
GetLibraryItemsLibraryOptimizedForStreamingTypeBoolean GetLibraryItemsLibraryOptimizedForStreamingType = "boolean"
)
// GetLibraryItemsLibraryOptimizedForStreaming - Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
type GetLibraryItemsLibraryOptimizedForStreaming struct {
GetLibraryItemsOptimizedForStreaming1 *GetLibraryItemsOptimizedForStreaming1 `queryParam:"inline,name=optimizedForStreaming"`
Boolean *bool `queryParam:"inline,name=optimizedForStreaming"`
Type GetLibraryItemsLibraryOptimizedForStreamingType
}
func CreateGetLibraryItemsLibraryOptimizedForStreamingGetLibraryItemsOptimizedForStreaming1(getLibraryItemsOptimizedForStreaming1 GetLibraryItemsOptimizedForStreaming1) GetLibraryItemsLibraryOptimizedForStreaming {
typ := GetLibraryItemsLibraryOptimizedForStreamingTypeGetLibraryItemsOptimizedForStreaming1
return GetLibraryItemsLibraryOptimizedForStreaming{
GetLibraryItemsOptimizedForStreaming1: &getLibraryItemsOptimizedForStreaming1,
Type: typ,
}
}
func CreateGetLibraryItemsLibraryOptimizedForStreamingBoolean(boolean bool) GetLibraryItemsLibraryOptimizedForStreaming {
typ := GetLibraryItemsLibraryOptimizedForStreamingTypeBoolean
return GetLibraryItemsLibraryOptimizedForStreaming{
Boolean: &boolean,
Type: typ,
}
}
func (u *GetLibraryItemsLibraryOptimizedForStreaming) UnmarshalJSON(data []byte) error {
var getLibraryItemsOptimizedForStreaming1 GetLibraryItemsOptimizedForStreaming1 = GetLibraryItemsOptimizedForStreaming1(0)
if err := utils.UnmarshalJSON(data, &getLibraryItemsOptimizedForStreaming1, "", true, nil); err == nil {
u.GetLibraryItemsOptimizedForStreaming1 = &getLibraryItemsOptimizedForStreaming1
u.Type = GetLibraryItemsLibraryOptimizedForStreamingTypeGetLibraryItemsOptimizedForStreaming1
return nil
}
var boolean bool = false
if err := utils.UnmarshalJSON(data, &boolean, "", true, nil); err == nil {
u.Boolean = &boolean
u.Type = GetLibraryItemsLibraryOptimizedForStreamingTypeBoolean
return nil
}
return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetLibraryItemsLibraryOptimizedForStreaming", string(data))
}
func (u GetLibraryItemsLibraryOptimizedForStreaming) MarshalJSON() ([]byte, error) {
if u.GetLibraryItemsOptimizedForStreaming1 != nil {
return utils.MarshalJSON(u.GetLibraryItemsOptimizedForStreaming1, "", true)
}
if u.Boolean != nil {
return utils.MarshalJSON(u.Boolean, "", true)
}
return nil, errors.New("could not marshal union type GetLibraryItemsLibraryOptimizedForStreaming: all fields are null")
}
// GetLibraryItemsHasThumbnail - Indicates if the part has a thumbnail.
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 GetLibraryItemsPart 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,omitempty"`
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,omitempty"`
// File size in bytes.
Size *int64 `json:"size,omitempty"`
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 *GetLibraryItemsLibraryOptimizedForStreaming `json:"optimizedForStreaming,omitempty"`
HasThumbnail *GetLibraryItemsHasThumbnail `default:"0" json:"hasThumbnail"`
}
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, []string{"id"}); err != nil {
return err
}
return nil
}
func (g *GetLibraryItemsPart) GetAccessible() *bool {
if g == nil {
return nil
}
return g.Accessible
}
func (g *GetLibraryItemsPart) GetExists() *bool {
if g == nil {
return nil
}
return g.Exists
}
func (g *GetLibraryItemsPart) GetID() int64 {
if g == nil {
return 0
}
return g.ID
}
func (g *GetLibraryItemsPart) GetKey() *string {
if g == nil {
return nil
}
return g.Key
}
func (g *GetLibraryItemsPart) GetIndexes() *string {
if g == nil {
return nil
}
return g.Indexes
}
func (g *GetLibraryItemsPart) GetDuration() *int {
if g == nil {
return nil
}
return g.Duration
}
func (g *GetLibraryItemsPart) GetFile() *string {
if g == nil {
return nil
}
return g.File
}
func (g *GetLibraryItemsPart) GetSize() *int64 {
if g == nil {
return nil
}
return g.Size
}
func (g *GetLibraryItemsPart) GetPacketLength() *int {
if g == nil {
return nil
}
return g.PacketLength
}
func (g *GetLibraryItemsPart) GetContainer() *string {
if g == nil {
return nil
}
return g.Container
}
func (g *GetLibraryItemsPart) GetVideoProfile() *string {
if g == nil {
return nil
}
return g.VideoProfile
}
func (g *GetLibraryItemsPart) GetAudioProfile() *string {
if g == nil {
return nil
}
return g.AudioProfile
}
func (g *GetLibraryItemsPart) GetHas64bitOffsets() *bool {
if g == nil {
return nil
}
return g.Has64bitOffsets
}
func (g *GetLibraryItemsPart) GetOptimizedForStreaming() *GetLibraryItemsLibraryOptimizedForStreaming {
if g == nil {
return nil
}
return g.OptimizedForStreaming
}
func (g *GetLibraryItemsPart) GetHasThumbnail() *GetLibraryItemsHasThumbnail {
if g == nil {
return nil
}
return g.HasThumbnail
}
type GetLibraryItemsMedia 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"`
// Container format of the media.
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,omitempty"`
// 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 *GetLibraryItemsOptimizedForStreaming `json:"optimizedForStreaming,omitempty"`
// Indicates whether the media has 64-bit offsets.
// This is relevant for media files that may require larger offsets than what 32-bit integers can provide.
//
Has64bitOffsets *bool `json:"has64bitOffsets,omitempty"`
Part []GetLibraryItemsPart `json:"Part,omitempty"`
}
func (g *GetLibraryItemsMedia) GetID() int64 {
if g == nil {
return 0
}
return g.ID
}
func (g *GetLibraryItemsMedia) GetDuration() *int {
if g == nil {
return nil
}
return g.Duration
}
func (g *GetLibraryItemsMedia) GetBitrate() *int {
if g == nil {
return nil
}
return g.Bitrate
}
func (g *GetLibraryItemsMedia) GetWidth() *int {
if g == nil {
return nil
}
return g.Width
}
func (g *GetLibraryItemsMedia) GetHeight() *int {
if g == nil {
return nil
}
return g.Height
}
func (g *GetLibraryItemsMedia) GetAspectRatio() *float32 {
if g == nil {
return nil
}
return g.AspectRatio
}
func (g *GetLibraryItemsMedia) GetAudioChannels() *int {
if g == nil {
return nil
}
return g.AudioChannels
}
func (g *GetLibraryItemsMedia) GetDisplayOffset() *int {
if g == nil {
return nil
}
return g.DisplayOffset
}
func (g *GetLibraryItemsMedia) GetAudioCodec() *string {
if g == nil {
return nil
}
return g.AudioCodec
}
func (g *GetLibraryItemsMedia) GetVideoCodec() *string {
if g == nil {
return nil
}
return g.VideoCodec
}
func (g *GetLibraryItemsMedia) GetVideoResolution() *string {
if g == nil {
return nil
}
return g.VideoResolution
}
func (g *GetLibraryItemsMedia) GetContainer() *string {
if g == nil {
return nil
}
return g.Container
}
func (g *GetLibraryItemsMedia) GetVideoFrameRate() *string {
if g == nil {
return nil
}
return g.VideoFrameRate
}
func (g *GetLibraryItemsMedia) GetVideoProfile() *string {
if g == nil {
return nil
}
return g.VideoProfile
}
func (g *GetLibraryItemsMedia) GetHasVoiceActivity() *bool {
if g == nil {
return nil
}
return g.HasVoiceActivity
}
func (g *GetLibraryItemsMedia) GetAudioProfile() *string {
if g == nil {
return nil
}
return g.AudioProfile
}
func (g *GetLibraryItemsMedia) GetOptimizedForStreaming() *GetLibraryItemsOptimizedForStreaming {
if g == nil {
return nil
}
return g.OptimizedForStreaming
}
func (g *GetLibraryItemsMedia) GetHas64bitOffsets() *bool {
if g == nil {
return nil
}
return g.Has64bitOffsets
}
func (g *GetLibraryItemsMedia) GetPart() []GetLibraryItemsPart {
if g == nil {
return nil
}
return g.Part
}
type GetLibraryItemsGenre struct {
// The unique identifier for the genre.
// NOTE: This is different for each Plex server and is not globally unique.
//
ID int `json:"id"`
// The genre name of this media-item
//
Tag string `json:"tag"`
}
func (g *GetLibraryItemsGenre) GetID() int {
if g == nil {
return 0
}
return g.ID
}
func (g *GetLibraryItemsGenre) GetTag() string {
if g == nil {
return ""
}
return g.Tag
}
type GetLibraryItemsCountry struct {
// The unique identifier for the country.
// NOTE: This is different for each Plex server and is not globally unique.
//
ID int `json:"id"`
// The country of origin of this media item
Tag string `json:"tag"`
}
func (g *GetLibraryItemsCountry) GetID() int {
if g == nil {
return 0
}
return g.ID
}
func (g *GetLibraryItemsCountry) GetTag() string {
if g == nil {
return ""
}
return g.Tag
}
type GetLibraryItemsDirector struct {
// Unique identifier for the director.
ID int `json:"id"`
// The role of Director
Tag string `json:"tag"`
// The absolute URL of the thumbnail image for the director.
Thumb *string `json:"thumb,omitempty"`
}
func (g *GetLibraryItemsDirector) GetID() int {
if g == nil {
return 0
}
return g.ID
}
func (g *GetLibraryItemsDirector) GetTag() string {
if g == nil {
return ""
}
return g.Tag
}
func (g *GetLibraryItemsDirector) GetThumb() *string {
if g == nil {
return nil
}
return g.Thumb
}
type GetLibraryItemsWriter struct {
// Unique identifier for the writer.
ID int `json:"id"`
// The role of Writer
Tag string `json:"tag"`
// The absolute URL of the thumbnail image for the writer.
Thumb *string `json:"thumb,omitempty"`
}
func (g *GetLibraryItemsWriter) GetID() int {
if g == nil {
return 0
}
return g.ID
}
func (g *GetLibraryItemsWriter) GetTag() string {
if g == nil {
return ""
}
return g.Tag
}
func (g *GetLibraryItemsWriter) GetThumb() *string {
if g == nil {
return nil
}
return g.Thumb
}
type GetLibraryItemsProducer 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 (g *GetLibraryItemsProducer) GetID() int64 {
if g == nil {
return 0
}
return g.ID
}
func (g *GetLibraryItemsProducer) GetFilter() string {
if g == nil {
return ""
}
return g.Filter
}
func (g *GetLibraryItemsProducer) GetTag() string {
if g == nil {
return ""
}
return g.Tag
}
func (g *GetLibraryItemsProducer) GetTagKey() string {
if g == nil {
return ""
}
return g.TagKey
}
func (g *GetLibraryItemsProducer) GetRole() *string {
if g == nil {
return nil
}
return g.Role
}
func (g *GetLibraryItemsProducer) GetThumb() *string {
if g == nil {
return nil
}
return g.Thumb
}
type GetLibraryItemsCollection struct {
// The user-made collection this media item belongs to
Tag string `json:"tag"`
}
func (g *GetLibraryItemsCollection) GetTag() string {
if g == nil {
return ""
}
return g.Tag
}
type GetLibraryItemsRole struct {
// The unique identifier for the role.
// NOTE: This is different for each Plex server and is not globally unique.
//
ID int `json:"id"`
// The display tag for the actor (typically the actor's name).
Tag string `json:"tag"`
// The role played by the actor in the media item.
Role *string `json:"role,omitempty"`
// The absolute URL of the thumbnail image for the actor.
Thumb *string `json:"thumb,omitempty"`
}
func (g *GetLibraryItemsRole) GetID() int {
if g == nil {
return 0
}
return g.ID
}
func (g *GetLibraryItemsRole) GetTag() string {
if g == nil {
return ""
}
return g.Tag
}
func (g *GetLibraryItemsRole) GetRole() *string {
if g == nil {
return nil
}
return g.Role
}
func (g *GetLibraryItemsRole) GetThumb() *string {
if g == nil {
return nil
}
return g.Thumb
}
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 (r *Ratings) GetImage() string {
if r == nil {
return ""
}
return r.Image
}
func (r *Ratings) GetValue() float32 {
if r == nil {
return 0.0
}
return r.Value
}
func (r *Ratings) GetType() string {
if r == nil {
return ""
}
return r.Type
}
type GetLibraryItemsSimilar 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 (g *GetLibraryItemsSimilar) GetID() int64 {
if g == nil {
return 0
}
return g.ID
}
func (g *GetLibraryItemsSimilar) GetFilter() string {
if g == nil {
return ""
}
return g.Filter
}
func (g *GetLibraryItemsSimilar) GetTag() string {
if g == nil {
return ""
}
return g.Tag
}
// GetLibraryItemsLocation - The folder path for the media item.
type GetLibraryItemsLocation struct {
Path string `json:"path"`
}
func (g *GetLibraryItemsLocation) GetPath() string {
if g == nil {
return ""
}
return g.Path
}
// Chapter - The thumbnail for the chapter
type Chapter struct {
ID int64 `json:"id"`
Filter string `json:"filter"`
Index int64 `json:"index"`
StartTimeOffset int64 `json:"startTimeOffset"`
EndTimeOffset int64 `json:"endTimeOffset"`
Thumb string `json:"thumb"`
}
func (c *Chapter) GetID() int64 {
if c == nil {
return 0
}
return c.ID
}
func (c *Chapter) GetFilter() string {
if c == nil {
return ""
}
return c.Filter
}
func (c *Chapter) GetIndex() int64 {
if c == nil {
return 0
}
return c.Index
}
func (c *Chapter) GetStartTimeOffset() int64 {
if c == nil {
return 0
}
return c.StartTimeOffset
}
func (c *Chapter) GetEndTimeOffset() int64 {
if c == nil {
return 0
}
return c.EndTimeOffset
}
func (c *Chapter) GetThumb() string {
if c == nil {
return ""
}
return c.Thumb
}
// Attributes associated with the marker.
type Attributes struct {
// The identifier for the attributes.
ID int64 `json:"id"`
// The version number of the marker attributes.
Version *int64 `json:"version,omitempty"`
}
func (a *Attributes) GetID() int64 {
if a == nil {
return 0
}
return a.ID
}
func (a *Attributes) GetVersion() *int64 {
if a == nil {
return nil
}
return a.Version
}
// Marker - The final status of the marker
type Marker struct {
ID int64 `json:"id"`
Type string `json:"type"`
StartTimeOffset int64 `json:"startTimeOffset"`
EndTimeOffset int64 `json:"endTimeOffset"`
Final *bool `json:"final,omitempty"`
// Attributes associated with the marker.
Attributes *Attributes `json:"Attributes,omitempty"`
}
func (m *Marker) GetID() int64 {
if m == nil {
return 0
}
return m.ID
}
func (m *Marker) GetType() string {
if m == nil {
return ""
}
return m.Type
}
func (m *Marker) GetStartTimeOffset() int64 {
if m == nil {
return 0
}
return m.StartTimeOffset
}
func (m *Marker) GetEndTimeOffset() int64 {
if m == nil {
return 0
}
return m.EndTimeOffset
}
func (m *Marker) GetFinal() *bool {
if m == nil {
return nil
}
return m.Final
}
func (m *Marker) GetAttributes() *Attributes {
if m == nil {
return nil
}
return m.Attributes
}
type Extras struct {
// The size of the extras.
Size *int64 `json:"size,omitempty"`
}
func (e *Extras) GetSize() *int64 {
if e == nil {
return nil
}
return e.Size
}
// GetLibraryItemsMetadata - Unknown
type GetLibraryItemsMetadata struct {
// The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API.
RatingKey string `json:"ratingKey"`
// The unique key for the media item.
Key string `json:"key"`
// The globally unique identifier for the media item.
GUID string `json:"guid"`
// A URLfriendly version of the media title.
Slug string `json:"slug"`
// The studio that produced the media item.
Studio *string `json:"studio,omitempty"`
Type GetLibraryItemsType `json:"type"`
// The title of the media item.
Title string `json:"title"`
// The banner image URL for the media item.
Banner string `json:"banner"`
// The sort title used for ordering media items.
TitleSort string `json:"titleSort"`
// The content rating for the media item.
ContentRating *string `json:"contentRating,omitempty"`
// A synopsis of the media item.
Summary string `json:"summary"`
// The critic rating for the media item.
Rating float32 `json:"rating"`
// The audience rating for the media item.
AudienceRating float64 `json:"audienceRating"`
// The release year of the media item.
Year *int `json:"year,omitempty"`
// A brief tagline for the media item.
Tagline string `json:"tagline"`
// The thumbnail image URL for the media item.
Thumb string `json:"thumb"`
// The art image URL for the media item.
Art string `json:"art"`
// The theme URL for the media item.
Theme string `json:"theme"`
// The index position of the media item.
Index int `json:"index"`
// The number of leaf items (end nodes) under this media item.
LeafCount *int `json:"leafCount,omitempty"`
// The number of leaf items that have been viewed.
ViewedLeafCount *int `json:"viewedLeafCount,omitempty"`
// The number of child items associated with this media item.
ChildCount int `json:"childCount"`
// The total number of seasons (for TV shows).
SeasonCount int `json:"seasonCount"`
// The duration of the media item in milliseconds.
Duration int `json:"duration"`
// The original release date of the media item.
OriginallyAvailableAt *types.Date `json:"originallyAvailableAt,omitempty"`
AddedAt int64 `json:"addedAt"`
// Unix epoch datetime in seconds
UpdatedAt *int64 `json:"updatedAt,omitempty"`
// The URL for the audience rating image.
AudienceRatingImage *string `json:"audienceRatingImage,omitempty"`
// The source from which chapter data is derived.
ChapterSource *string `json:"chapterSource,omitempty"`
// The primary extra key associated with this media item.
PrimaryExtraKey *string `json:"primaryExtraKey,omitempty"`
// The original title of the media item (if different).
OriginalTitle *string `json:"originalTitle,omitempty"`
// The rating key of the parent media item.
ParentRatingKey *string `json:"parentRatingKey,omitempty"`
// The rating key of the grandparent media item.
GrandparentRatingKey *string `json:"grandparentRatingKey,omitempty"`
// The GUID of the parent media item.
ParentGUID *string `json:"parentGuid,omitempty"`
// The GUID of the grandparent media item.
GrandparentGUID *string `json:"grandparentGuid,omitempty"`
// The slug for the grandparent media item.
GrandparentSlug *string `json:"grandparentSlug,omitempty"`
// The key of the grandparent media item.
GrandparentKey *string `json:"grandparentKey,omitempty"`
// The key of the parent media item.
ParentKey *string `json:"parentKey,omitempty"`
// The title of the grandparent media item.
GrandparentTitle *string `json:"grandparentTitle,omitempty"`
// The thumbnail URL for the grandparent media item.
GrandparentThumb *string `json:"grandparentThumb,omitempty"`
// The theme URL for the grandparent media item.
GrandparentTheme *string `json:"grandparentTheme,omitempty"`
// The art URL for the grandparent media item.
GrandparentArt *string `json:"grandparentArt,omitempty"`
// The title of the parent media item.
ParentTitle *string `json:"parentTitle,omitempty"`
// The index position of the parent media item.
ParentIndex *int `json:"parentIndex,omitempty"`
// The thumbnail URL for the parent media item.
ParentThumb *string `json:"parentThumb,omitempty"`
// The URL for the rating image.
RatingImage *string `json:"ratingImage,omitempty"`
// The number of times this media item has been viewed.
ViewCount *int `json:"viewCount,omitempty"`
// The current playback offset (in milliseconds).
ViewOffset *int `json:"viewOffset,omitempty"`
// The number of times this media item has been skipped.
SkipCount *int `json:"skipCount,omitempty"`
// A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip.
Subtype *string `json:"subtype,omitempty"`
// The Unix timestamp representing the last time the item was rated.
LastRatedAt *int64 `json:"lastRatedAt,omitempty"`
// The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available).
CreatedAtAccuracy *string `json:"createdAtAccuracy,omitempty"`
// The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC.
CreatedAtTZOffset *string `json:"createdAtTZOffset,omitempty"`
// Unix timestamp for when the media item was last viewed.
LastViewedAt *int `json:"lastViewedAt,omitempty"`
// The rating provided by a user for the item. This value is expressed as a decimal number.
UserRating *float32 `json:"userRating,omitempty"`
Image []GetLibraryItemsImage `json:"Image,omitempty"`
UltraBlurColors *GetLibraryItemsUltraBlurColors `json:"UltraBlurColors,omitempty"`
Guids []GetLibraryItemsGuids `json:"Guid,omitempty"`
// The identifier for the library section.
LibrarySectionID *int64 `json:"librarySectionID,omitempty"`
// The title of the library section.
LibrarySectionTitle *string `json:"librarySectionTitle,omitempty"`
// The key corresponding to the library section.
LibrarySectionKey *string `json:"librarySectionKey,omitempty"`
// Setting that indicates the episode ordering for the show.
// Options:
// - None = Library default
// - tmdbAiring = The Movie Database (Aired)
// - aired = TheTVDB (Aired)
// - dvd = TheTVDB (DVD)
// - absolute = TheTVDB (Absolute)
//
ShowOrdering *ShowOrdering `json:"showOrdering,omitempty"`
// Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
//
FlattenSeasons *FlattenSeasons `json:"flattenSeasons,omitempty"`
// Indicates whether child items should be skipped.
SkipChildren *bool `json:"skipChildren,omitempty"`
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"`
Producer []GetLibraryItemsProducer `json:"Producer,omitempty"`
Collection []GetLibraryItemsCollection `json:"Collection,omitempty"`
Role []GetLibraryItemsRole `json:"Role,omitempty"`
Ratings []Ratings `json:"Rating,omitempty"`
Similar []GetLibraryItemsSimilar `json:"Similar,omitempty"`
Location []GetLibraryItemsLocation `json:"Location,omitempty"`
Chapter []Chapter `json:"Chapter,omitempty"`
Marker []Marker `json:"Marker,omitempty"`
Extras *Extras `json:"Extras,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, []string{"ratingKey", "key", "guid", "slug", "type", "title", "banner", "titleSort", "summary", "rating", "audienceRating", "tagline", "thumb", "art", "theme", "index", "childCount", "seasonCount", "duration", "addedAt"}); err != nil {
return err
}
return nil
}
func (g *GetLibraryItemsMetadata) GetRatingKey() string {
if g == nil {
return ""
}
return g.RatingKey
}
func (g *GetLibraryItemsMetadata) GetKey() string {
if g == nil {
return ""
}
return g.Key
}
func (g *GetLibraryItemsMetadata) GetGUID() string {
if g == nil {
return ""
}
return g.GUID
}
func (g *GetLibraryItemsMetadata) GetSlug() string {
if g == nil {
return ""
}
return g.Slug
}
func (g *GetLibraryItemsMetadata) GetStudio() *string {
if g == nil {
return nil
}
return g.Studio
}
func (g *GetLibraryItemsMetadata) GetType() GetLibraryItemsType {
if g == nil {
return GetLibraryItemsType("")
}
return g.Type
}
func (g *GetLibraryItemsMetadata) GetTitle() string {
if g == nil {
return ""
}
return g.Title
}
func (g *GetLibraryItemsMetadata) GetBanner() string {
if g == nil {
return ""
}
return g.Banner
}
func (g *GetLibraryItemsMetadata) GetTitleSort() string {
if g == nil {
return ""
}
return g.TitleSort
}
func (g *GetLibraryItemsMetadata) GetContentRating() *string {
if g == nil {
return nil
}
return g.ContentRating
}
func (g *GetLibraryItemsMetadata) GetSummary() string {
if g == nil {
return ""
}
return g.Summary
}
func (g *GetLibraryItemsMetadata) GetRating() float32 {
if g == nil {
return 0.0
}
return g.Rating
}
func (g *GetLibraryItemsMetadata) GetAudienceRating() float64 {
if g == nil {
return 0.0
}
return g.AudienceRating
}
func (g *GetLibraryItemsMetadata) GetYear() *int {
if g == nil {
return nil
}
return g.Year
}
func (g *GetLibraryItemsMetadata) GetTagline() string {
if g == nil {
return ""
}
return g.Tagline
}
func (g *GetLibraryItemsMetadata) GetThumb() string {
if g == nil {
return ""
}
return g.Thumb
}
func (g *GetLibraryItemsMetadata) GetArt() string {
if g == nil {
return ""
}
return g.Art
}
func (g *GetLibraryItemsMetadata) GetTheme() string {
if g == nil {
return ""
}
return g.Theme
}
func (g *GetLibraryItemsMetadata) GetIndex() int {
if g == nil {
return 0
}
return g.Index
}
func (g *GetLibraryItemsMetadata) GetLeafCount() *int {
if g == nil {
return nil
}
return g.LeafCount
}
func (g *GetLibraryItemsMetadata) GetViewedLeafCount() *int {
if g == nil {
return nil
}
return g.ViewedLeafCount
}
func (g *GetLibraryItemsMetadata) GetChildCount() int {
if g == nil {
return 0
}
return g.ChildCount
}
func (g *GetLibraryItemsMetadata) GetSeasonCount() int {
if g == nil {
return 0
}
return g.SeasonCount
}
func (g *GetLibraryItemsMetadata) GetDuration() int {
if g == nil {
return 0
}
return g.Duration
}
func (g *GetLibraryItemsMetadata) GetOriginallyAvailableAt() *types.Date {
if g == nil {
return nil
}
return g.OriginallyAvailableAt
}
func (g *GetLibraryItemsMetadata) GetAddedAt() int64 {
if g == nil {
return 0
}
return g.AddedAt
}
func (g *GetLibraryItemsMetadata) GetUpdatedAt() *int64 {
if g == nil {
return nil
}
return g.UpdatedAt
}
func (g *GetLibraryItemsMetadata) GetAudienceRatingImage() *string {
if g == nil {
return nil
}
return g.AudienceRatingImage
}
func (g *GetLibraryItemsMetadata) GetChapterSource() *string {
if g == nil {
return nil
}
return g.ChapterSource
}
func (g *GetLibraryItemsMetadata) GetPrimaryExtraKey() *string {
if g == nil {
return nil
}
return g.PrimaryExtraKey
}
func (g *GetLibraryItemsMetadata) GetOriginalTitle() *string {
if g == nil {
return nil
}
return g.OriginalTitle
}
func (g *GetLibraryItemsMetadata) GetParentRatingKey() *string {
if g == nil {
return nil
}
return g.ParentRatingKey
}
func (g *GetLibraryItemsMetadata) GetGrandparentRatingKey() *string {
if g == nil {
return nil
}
return g.GrandparentRatingKey
}
func (g *GetLibraryItemsMetadata) GetParentGUID() *string {
if g == nil {
return nil
}
return g.ParentGUID
}
func (g *GetLibraryItemsMetadata) GetGrandparentGUID() *string {
if g == nil {
return nil
}
return g.GrandparentGUID
}
func (g *GetLibraryItemsMetadata) GetGrandparentSlug() *string {
if g == nil {
return nil
}
return g.GrandparentSlug
}
func (g *GetLibraryItemsMetadata) GetGrandparentKey() *string {
if g == nil {
return nil
}
return g.GrandparentKey
}
func (g *GetLibraryItemsMetadata) GetParentKey() *string {
if g == nil {
return nil
}
return g.ParentKey
}
func (g *GetLibraryItemsMetadata) GetGrandparentTitle() *string {
if g == nil {
return nil
}
return g.GrandparentTitle
}
func (g *GetLibraryItemsMetadata) GetGrandparentThumb() *string {
if g == nil {
return nil
}
return g.GrandparentThumb
}
func (g *GetLibraryItemsMetadata) GetGrandparentTheme() *string {
if g == nil {
return nil
}
return g.GrandparentTheme
}
func (g *GetLibraryItemsMetadata) GetGrandparentArt() *string {
if g == nil {
return nil
}
return g.GrandparentArt
}
func (g *GetLibraryItemsMetadata) GetParentTitle() *string {
if g == nil {
return nil
}
return g.ParentTitle
}
func (g *GetLibraryItemsMetadata) GetParentIndex() *int {
if g == nil {
return nil
}
return g.ParentIndex
}
func (g *GetLibraryItemsMetadata) GetParentThumb() *string {
if g == nil {
return nil
}
return g.ParentThumb
}
func (g *GetLibraryItemsMetadata) GetRatingImage() *string {
if g == nil {
return nil
}
return g.RatingImage
}
func (g *GetLibraryItemsMetadata) GetViewCount() *int {
if g == nil {
return nil
}
return g.ViewCount
}
func (g *GetLibraryItemsMetadata) GetViewOffset() *int {
if g == nil {
return nil
}
return g.ViewOffset
}
func (g *GetLibraryItemsMetadata) GetSkipCount() *int {
if g == nil {
return nil
}
return g.SkipCount
}
func (g *GetLibraryItemsMetadata) GetSubtype() *string {
if g == nil {
return nil
}
return g.Subtype
}
func (g *GetLibraryItemsMetadata) GetLastRatedAt() *int64 {
if g == nil {
return nil
}
return g.LastRatedAt
}
func (g *GetLibraryItemsMetadata) GetCreatedAtAccuracy() *string {
if g == nil {
return nil
}
return g.CreatedAtAccuracy
}
func (g *GetLibraryItemsMetadata) GetCreatedAtTZOffset() *string {
if g == nil {
return nil
}
return g.CreatedAtTZOffset
}
func (g *GetLibraryItemsMetadata) GetLastViewedAt() *int {
if g == nil {
return nil
}
return g.LastViewedAt
}
func (g *GetLibraryItemsMetadata) GetUserRating() *float32 {
if g == nil {
return nil
}
return g.UserRating
}
func (g *GetLibraryItemsMetadata) GetImage() []GetLibraryItemsImage {
if g == nil {
return nil
}
return g.Image
}
func (g *GetLibraryItemsMetadata) GetUltraBlurColors() *GetLibraryItemsUltraBlurColors {
if g == nil {
return nil
}
return g.UltraBlurColors
}
func (g *GetLibraryItemsMetadata) GetGuids() []GetLibraryItemsGuids {
if g == nil {
return nil
}
return g.Guids
}
func (g *GetLibraryItemsMetadata) GetLibrarySectionID() *int64 {
if g == nil {
return nil
}
return g.LibrarySectionID
}
func (g *GetLibraryItemsMetadata) GetLibrarySectionTitle() *string {
if g == nil {
return nil
}
return g.LibrarySectionTitle
}
func (g *GetLibraryItemsMetadata) GetLibrarySectionKey() *string {
if g == nil {
return nil
}
return g.LibrarySectionKey
}
func (g *GetLibraryItemsMetadata) GetShowOrdering() *ShowOrdering {
if g == nil {
return nil
}
return g.ShowOrdering
}
func (g *GetLibraryItemsMetadata) GetFlattenSeasons() *FlattenSeasons {
if g == nil {
return nil
}
return g.FlattenSeasons
}
func (g *GetLibraryItemsMetadata) GetSkipChildren() *bool {
if g == nil {
return nil
}
return g.SkipChildren
}
func (g *GetLibraryItemsMetadata) GetMedia() []GetLibraryItemsMedia {
if g == nil {
return nil
}
return g.Media
}
func (g *GetLibraryItemsMetadata) GetGenre() []GetLibraryItemsGenre {
if g == nil {
return nil
}
return g.Genre
}
func (g *GetLibraryItemsMetadata) GetCountry() []GetLibraryItemsCountry {
if g == nil {
return nil
}
return g.Country
}
func (g *GetLibraryItemsMetadata) GetDirector() []GetLibraryItemsDirector {
if g == nil {
return nil
}
return g.Director
}
func (g *GetLibraryItemsMetadata) GetWriter() []GetLibraryItemsWriter {
if g == nil {
return nil
}
return g.Writer
}
func (g *GetLibraryItemsMetadata) GetProducer() []GetLibraryItemsProducer {
if g == nil {
return nil
}
return g.Producer
}
func (g *GetLibraryItemsMetadata) GetCollection() []GetLibraryItemsCollection {
if g == nil {
return nil
}
return g.Collection
}
func (g *GetLibraryItemsMetadata) GetRole() []GetLibraryItemsRole {
if g == nil {
return nil
}
return g.Role
}
func (g *GetLibraryItemsMetadata) GetRatings() []Ratings {
if g == nil {
return nil
}
return g.Ratings
}
func (g *GetLibraryItemsMetadata) GetSimilar() []GetLibraryItemsSimilar {
if g == nil {
return nil
}
return g.Similar
}
func (g *GetLibraryItemsMetadata) GetLocation() []GetLibraryItemsLocation {
if g == nil {
return nil
}
return g.Location
}
func (g *GetLibraryItemsMetadata) GetChapter() []Chapter {
if g == nil {
return nil
}
return g.Chapter
}
func (g *GetLibraryItemsMetadata) GetMarker() []Marker {
if g == nil {
return nil
}
return g.Marker
}
func (g *GetLibraryItemsMetadata) GetExtras() *Extras {
if g == nil {
return nil
}
return g.Extras
}
type GetLibraryItemsFilter struct {
Filter string `json:"filter"`
FilterType string `json:"filterType"`
Key string `json:"key"`
Title string `json:"title"`
Type string `json:"type"`
}
func (g *GetLibraryItemsFilter) GetFilter() string {
if g == nil {
return ""
}
return g.Filter
}
func (g *GetLibraryItemsFilter) GetFilterType() string {
if g == nil {
return ""
}
return g.FilterType
}
func (g *GetLibraryItemsFilter) GetKey() string {
if g == nil {
return ""
}
return g.Key
}
func (g *GetLibraryItemsFilter) GetTitle() string {
if g == nil {
return ""
}
return g.Title
}
func (g *GetLibraryItemsFilter) GetType() string {
if g == nil {
return ""
}
return g.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, []string{"key", "title"}); err != nil {
return err
}
return nil
}
func (g *GetLibraryItemsSort) GetDefault() *string {
if g == nil {
return nil
}
return g.Default
}
func (g *GetLibraryItemsSort) GetActive() *bool {
if g == nil {
return nil
}
return g.Active
}
func (g *GetLibraryItemsSort) GetActiveDirection() *GetLibraryItemsActiveDirection {
if g == nil {
return nil
}
return g.ActiveDirection
}
func (g *GetLibraryItemsSort) GetDefaultDirection() *GetLibraryItemsDefaultDirection {
if g == nil {
return nil
}
return g.DefaultDirection
}
func (g *GetLibraryItemsSort) GetDescKey() *string {
if g == nil {
return nil
}
return g.DescKey
}
func (g *GetLibraryItemsSort) GetFirstCharacterKey() *string {
if g == nil {
return nil
}
return g.FirstCharacterKey
}
func (g *GetLibraryItemsSort) GetKey() string {
if g == nil {
return ""
}
return g.Key
}
func (g *GetLibraryItemsSort) GetTitle() string {
if g == nil {
return ""
}
return g.Title
}
type GetLibraryItemsField struct {
Key string `json:"key"`
Title string `json:"title"`
Type string `json:"type"`
SubType *string `json:"subType,omitempty"`
}
func (g *GetLibraryItemsField) GetKey() string {
if g == nil {
return ""
}
return g.Key
}
func (g *GetLibraryItemsField) GetTitle() string {
if g == nil {
return ""
}
return g.Title
}
func (g *GetLibraryItemsField) GetType() string {
if g == nil {
return ""
}
return g.Type
}
func (g *GetLibraryItemsField) GetSubType() *string {
if g == nil {
return nil
}
return g.SubType
}
type GetLibraryItemsLibraryType 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 (g *GetLibraryItemsLibraryType) GetKey() string {
if g == nil {
return ""
}
return g.Key
}
func (g *GetLibraryItemsLibraryType) GetType() string {
if g == nil {
return ""
}
return g.Type
}
func (g *GetLibraryItemsLibraryType) GetTitle() string {
if g == nil {
return ""
}
return g.Title
}
func (g *GetLibraryItemsLibraryType) GetActive() bool {
if g == nil {
return false
}
return g.Active
}
func (g *GetLibraryItemsLibraryType) GetFilter() []GetLibraryItemsFilter {
if g == nil {
return nil
}
return g.Filter
}
func (g *GetLibraryItemsLibraryType) GetSort() []GetLibraryItemsSort {
if g == nil {
return nil
}
return g.Sort
}
func (g *GetLibraryItemsLibraryType) GetField() []GetLibraryItemsField {
if g == nil {
return nil
}
return g.Field
}
type GetLibraryItemsOperator struct {
Key string `json:"key"`
Title string `json:"title"`
}
func (g *GetLibraryItemsOperator) GetKey() string {
if g == nil {
return ""
}
return g.Key
}
func (g *GetLibraryItemsOperator) GetTitle() string {
if g == nil {
return ""
}
return g.Title
}
type GetLibraryItemsFieldType struct {
Type string `json:"type"`
Operator []GetLibraryItemsOperator `json:"Operator"`
}
func (g *GetLibraryItemsFieldType) GetType() string {
if g == nil {
return ""
}
return g.Type
}
func (g *GetLibraryItemsFieldType) GetOperator() []GetLibraryItemsOperator {
if g == nil {
return []GetLibraryItemsOperator{}
}
return g.Operator
}
// GetLibraryItemsMeta - The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
type GetLibraryItemsMeta struct {
Type []GetLibraryItemsLibraryType `json:"Type,omitempty"`
FieldType []GetLibraryItemsFieldType `json:"FieldType,omitempty"`
}
func (g *GetLibraryItemsMeta) GetType() []GetLibraryItemsLibraryType {
if g == nil {
return nil
}
return g.Type
}
func (g *GetLibraryItemsMeta) GetFieldType() []GetLibraryItemsFieldType {
if g == nil {
return nil
}
return g.FieldType
}
type GetLibraryItemsMediaContainer struct {
// Number of media items returned in this response.
Size int `json:"size"`
// Total number of media items in the library.
TotalSize int `json:"totalSize"`
// Offset value for pagination.
Offset int64 `json:"offset"`
// The content type or mode.
Content string `json:"content"`
// Indicates whether syncing is allowed.
AllowSync bool `json:"allowSync"`
// Specifies whether caching is disabled.
Nocache bool `json:"nocache"`
// URL for the background artwork of the media container.
Art string `json:"art"`
// An plugin identifier for the media container.
Identifier string `json:"identifier"`
// The unique identifier for the library section.
LibrarySectionID *int64 `json:"librarySectionID,omitempty"`
// The title of the library section.
LibrarySectionTitle *string `json:"librarySectionTitle,omitempty"`
// 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"`
// URL for the thumbnail image of the media container.
Thumb string `json:"thumb"`
// The primary title of the media container.
Title1 string `json:"title1"`
// The secondary title of the media container.
Title2 string `json:"title2"`
// Identifier for the view group layout.
ViewGroup string `json:"viewGroup"`
// Identifier for the view mode.
ViewMode *string `json:"viewMode,omitempty"`
// Indicates if the media container has mixed parents.
MixedParents *bool `json:"mixedParents,omitempty"`
// An array of metadata items.
Metadata []GetLibraryItemsMetadata `json:"Metadata"`
// The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
//
Meta *GetLibraryItemsMeta `json:"Meta,omitempty"`
}
func (g *GetLibraryItemsMediaContainer) GetSize() int {
if g == nil {
return 0
}
return g.Size
}
func (g *GetLibraryItemsMediaContainer) GetTotalSize() int {
if g == nil {
return 0
}
return g.TotalSize
}
func (g *GetLibraryItemsMediaContainer) GetOffset() int64 {
if g == nil {
return 0
}
return g.Offset
}
func (g *GetLibraryItemsMediaContainer) GetContent() string {
if g == nil {
return ""
}
return g.Content
}
func (g *GetLibraryItemsMediaContainer) GetAllowSync() bool {
if g == nil {
return false
}
return g.AllowSync
}
func (g *GetLibraryItemsMediaContainer) GetNocache() bool {
if g == nil {
return false
}
return g.Nocache
}
func (g *GetLibraryItemsMediaContainer) GetArt() string {
if g == nil {
return ""
}
return g.Art
}
func (g *GetLibraryItemsMediaContainer) GetIdentifier() string {
if g == nil {
return ""
}
return g.Identifier
}
func (g *GetLibraryItemsMediaContainer) GetLibrarySectionID() *int64 {
if g == nil {
return nil
}
return g.LibrarySectionID
}
func (g *GetLibraryItemsMediaContainer) GetLibrarySectionTitle() *string {
if g == nil {
return nil
}
return g.LibrarySectionTitle
}
func (g *GetLibraryItemsMediaContainer) GetLibrarySectionUUID() *string {
if g == nil {
return nil
}
return g.LibrarySectionUUID
}
func (g *GetLibraryItemsMediaContainer) GetMediaTagPrefix() string {
if g == nil {
return ""
}
return g.MediaTagPrefix
}
func (g *GetLibraryItemsMediaContainer) GetMediaTagVersion() int64 {
if g == nil {
return 0
}
return g.MediaTagVersion
}
func (g *GetLibraryItemsMediaContainer) GetThumb() string {
if g == nil {
return ""
}
return g.Thumb
}
func (g *GetLibraryItemsMediaContainer) GetTitle1() string {
if g == nil {
return ""
}
return g.Title1
}
func (g *GetLibraryItemsMediaContainer) GetTitle2() string {
if g == nil {
return ""
}
return g.Title2
}
func (g *GetLibraryItemsMediaContainer) GetViewGroup() string {
if g == nil {
return ""
}
return g.ViewGroup
}
func (g *GetLibraryItemsMediaContainer) GetViewMode() *string {
if g == nil {
return nil
}
return g.ViewMode
}
func (g *GetLibraryItemsMediaContainer) GetMixedParents() *bool {
if g == nil {
return nil
}
return g.MixedParents
}
func (g *GetLibraryItemsMediaContainer) GetMetadata() []GetLibraryItemsMetadata {
if g == nil {
return []GetLibraryItemsMetadata{}
}
return g.Metadata
}
func (g *GetLibraryItemsMediaContainer) GetMeta() *GetLibraryItemsMeta {
if g == nil {
return nil
}
return g.Meta
}
// GetLibraryItemsResponseBody - The contents of the library by section and tag
type GetLibraryItemsResponseBody struct {
MediaContainer *GetLibraryItemsMediaContainer `json:"MediaContainer,omitempty"`
}
func (g *GetLibraryItemsResponseBody) GetMediaContainer() *GetLibraryItemsMediaContainer {
if g == nil {
return nil
}
return g.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 (g *GetLibraryItemsResponse) GetContentType() string {
if g == nil {
return ""
}
return g.ContentType
}
func (g *GetLibraryItemsResponse) GetStatusCode() int {
if g == nil {
return 0
}
return g.StatusCode
}
func (g *GetLibraryItemsResponse) GetRawResponse() *http.Response {
if g == nil {
return nil
}
return g.RawResponse
}
func (g *GetLibraryItemsResponse) GetObject() *GetLibraryItemsResponseBody {
if g == nil {
return nil
}
return g.Object
}