mirror of
https://github.com/LukeHagar/plexgo.git
synced 2025-12-06 04:20:46 +00:00
2589 lines
61 KiB
Go
2589 lines
61 KiB
Go
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||
|
||
package operations
|
||
|
||
import (
|
||
"encoding/json"
|
||
"errors"
|
||
"fmt"
|
||
"github.com/LukeHagar/plexgo/internal/utils"
|
||
"github.com/LukeHagar/plexgo/types"
|
||
"net/http"
|
||
)
|
||
|
||
// 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, 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
|
||
}
|
||
|
||
// 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 (o *GetLibraryItemsImage) GetAlt() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.Alt
|
||
}
|
||
|
||
func (o *GetLibraryItemsImage) GetType() GetLibraryItemsLibraryResponseType {
|
||
if o == nil {
|
||
return GetLibraryItemsLibraryResponseType("")
|
||
}
|
||
return o.Type
|
||
}
|
||
|
||
func (o *GetLibraryItemsImage) GetURL() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.URL
|
||
}
|
||
|
||
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 GetLibraryItemsGuids struct {
|
||
// The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb://
|
||
//
|
||
ID string `json:"id"`
|
||
}
|
||
|
||
func (o *GetLibraryItemsGuids) GetID() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.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"`
|
||
Boolean *bool `queryParam:"inline"`
|
||
|
||
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, true); err == nil {
|
||
u.OptimizedForStreaming1 = &optimizedForStreaming1
|
||
u.Type = GetLibraryItemsOptimizedForStreamingTypeOptimizedForStreaming1
|
||
return nil
|
||
}
|
||
|
||
var boolean bool = false
|
||
if err := utils.UnmarshalJSON(data, &boolean, "", true, true); 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"`
|
||
Boolean *bool `queryParam:"inline"`
|
||
|
||
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, true); err == nil {
|
||
u.GetLibraryItemsOptimizedForStreaming1 = &getLibraryItemsOptimizedForStreaming1
|
||
u.Type = GetLibraryItemsLibraryOptimizedForStreamingTypeGetLibraryItemsOptimizedForStreaming1
|
||
return nil
|
||
}
|
||
|
||
var boolean bool = false
|
||
if err := utils.UnmarshalJSON(data, &boolean, "", true, true); 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, false); err != nil {
|
||
return err
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (o *GetLibraryItemsPart) GetAccessible() *bool {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Accessible
|
||
}
|
||
|
||
func (o *GetLibraryItemsPart) GetExists() *bool {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Exists
|
||
}
|
||
|
||
func (o *GetLibraryItemsPart) GetID() int64 {
|
||
if o == nil {
|
||
return 0
|
||
}
|
||
return o.ID
|
||
}
|
||
|
||
func (o *GetLibraryItemsPart) GetKey() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Key
|
||
}
|
||
|
||
func (o *GetLibraryItemsPart) GetIndexes() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Indexes
|
||
}
|
||
|
||
func (o *GetLibraryItemsPart) GetDuration() *int {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Duration
|
||
}
|
||
|
||
func (o *GetLibraryItemsPart) GetFile() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.File
|
||
}
|
||
|
||
func (o *GetLibraryItemsPart) GetSize() *int64 {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Size
|
||
}
|
||
|
||
func (o *GetLibraryItemsPart) GetPacketLength() *int {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.PacketLength
|
||
}
|
||
|
||
func (o *GetLibraryItemsPart) GetContainer() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Container
|
||
}
|
||
|
||
func (o *GetLibraryItemsPart) GetVideoProfile() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.VideoProfile
|
||
}
|
||
|
||
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() *GetLibraryItemsLibraryOptimizedForStreaming {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.OptimizedForStreaming
|
||
}
|
||
|
||
func (o *GetLibraryItemsPart) GetHasThumbnail() *GetLibraryItemsHasThumbnail {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.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 (o *GetLibraryItemsMedia) GetID() int64 {
|
||
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() *float32 {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.AspectRatio
|
||
}
|
||
|
||
func (o *GetLibraryItemsMedia) GetAudioChannels() *int {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.AudioChannels
|
||
}
|
||
|
||
func (o *GetLibraryItemsMedia) GetDisplayOffset() *int {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.DisplayOffset
|
||
}
|
||
|
||
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 nil
|
||
}
|
||
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) GetAudioProfile() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.AudioProfile
|
||
}
|
||
|
||
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 nil
|
||
}
|
||
return o.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 (o *GetLibraryItemsGenre) GetID() int {
|
||
if o == nil {
|
||
return 0
|
||
}
|
||
return o.ID
|
||
}
|
||
|
||
func (o *GetLibraryItemsGenre) GetTag() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.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 (o *GetLibraryItemsCountry) GetID() int {
|
||
if o == nil {
|
||
return 0
|
||
}
|
||
return o.ID
|
||
}
|
||
|
||
func (o *GetLibraryItemsCountry) GetTag() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.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 (o *GetLibraryItemsDirector) GetID() int {
|
||
if o == nil {
|
||
return 0
|
||
}
|
||
return o.ID
|
||
}
|
||
|
||
func (o *GetLibraryItemsDirector) GetTag() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.Tag
|
||
}
|
||
|
||
func (o *GetLibraryItemsDirector) GetThumb() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.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 (o *GetLibraryItemsWriter) GetID() int {
|
||
if o == nil {
|
||
return 0
|
||
}
|
||
return o.ID
|
||
}
|
||
|
||
func (o *GetLibraryItemsWriter) GetTag() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.Tag
|
||
}
|
||
|
||
func (o *GetLibraryItemsWriter) GetThumb() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.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 (o *GetLibraryItemsProducer) GetID() int64 {
|
||
if o == nil {
|
||
return 0
|
||
}
|
||
return o.ID
|
||
}
|
||
|
||
func (o *GetLibraryItemsProducer) GetFilter() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.Filter
|
||
}
|
||
|
||
func (o *GetLibraryItemsProducer) GetTag() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.Tag
|
||
}
|
||
|
||
func (o *GetLibraryItemsProducer) GetTagKey() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.TagKey
|
||
}
|
||
|
||
func (o *GetLibraryItemsProducer) GetRole() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Role
|
||
}
|
||
|
||
func (o *GetLibraryItemsProducer) GetThumb() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Thumb
|
||
}
|
||
|
||
type GetLibraryItemsCollection struct {
|
||
// The user-made collection this media item belongs to
|
||
Tag string `json:"tag"`
|
||
}
|
||
|
||
func (o *GetLibraryItemsCollection) GetTag() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.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 (o *GetLibraryItemsRole) GetID() int {
|
||
if o == nil {
|
||
return 0
|
||
}
|
||
return o.ID
|
||
}
|
||
|
||
func (o *GetLibraryItemsRole) GetTag() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.Tag
|
||
}
|
||
|
||
func (o *GetLibraryItemsRole) GetRole() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Role
|
||
}
|
||
|
||
func (o *GetLibraryItemsRole) GetThumb() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.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 (o *Ratings) GetImage() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.Image
|
||
}
|
||
|
||
func (o *Ratings) GetValue() float32 {
|
||
if o == nil {
|
||
return 0.0
|
||
}
|
||
return o.Value
|
||
}
|
||
|
||
func (o *Ratings) GetType() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.Type
|
||
}
|
||
|
||
type 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 (o *GetLibraryItemsSimilar) GetID() int64 {
|
||
if o == nil {
|
||
return 0
|
||
}
|
||
return o.ID
|
||
}
|
||
|
||
func (o *GetLibraryItemsSimilar) GetFilter() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.Filter
|
||
}
|
||
|
||
func (o *GetLibraryItemsSimilar) GetTag() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.Tag
|
||
}
|
||
|
||
// GetLibraryItemsLocation - The folder path for the media item.
|
||
type GetLibraryItemsLocation struct {
|
||
Path string `json:"path"`
|
||
}
|
||
|
||
func (o *GetLibraryItemsLocation) GetPath() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.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 (o *Chapter) GetID() int64 {
|
||
if o == nil {
|
||
return 0
|
||
}
|
||
return o.ID
|
||
}
|
||
|
||
func (o *Chapter) GetFilter() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.Filter
|
||
}
|
||
|
||
func (o *Chapter) GetIndex() int64 {
|
||
if o == nil {
|
||
return 0
|
||
}
|
||
return o.Index
|
||
}
|
||
|
||
func (o *Chapter) GetStartTimeOffset() int64 {
|
||
if o == nil {
|
||
return 0
|
||
}
|
||
return o.StartTimeOffset
|
||
}
|
||
|
||
func (o *Chapter) GetEndTimeOffset() int64 {
|
||
if o == nil {
|
||
return 0
|
||
}
|
||
return o.EndTimeOffset
|
||
}
|
||
|
||
func (o *Chapter) GetThumb() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.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 (o *Attributes) GetID() int64 {
|
||
if o == nil {
|
||
return 0
|
||
}
|
||
return o.ID
|
||
}
|
||
|
||
func (o *Attributes) GetVersion() *int64 {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.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 (o *Marker) GetID() int64 {
|
||
if o == nil {
|
||
return 0
|
||
}
|
||
return o.ID
|
||
}
|
||
|
||
func (o *Marker) GetType() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.Type
|
||
}
|
||
|
||
func (o *Marker) GetStartTimeOffset() int64 {
|
||
if o == nil {
|
||
return 0
|
||
}
|
||
return o.StartTimeOffset
|
||
}
|
||
|
||
func (o *Marker) GetEndTimeOffset() int64 {
|
||
if o == nil {
|
||
return 0
|
||
}
|
||
return o.EndTimeOffset
|
||
}
|
||
|
||
func (o *Marker) GetFinal() *bool {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Final
|
||
}
|
||
|
||
func (o *Marker) GetAttributes() *Attributes {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Attributes
|
||
}
|
||
|
||
type Extras struct {
|
||
// The size of the extras.
|
||
Size *int64 `json:"size,omitempty"`
|
||
}
|
||
|
||
func (o *Extras) GetSize() *int64 {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.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 URL‐friendly 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, 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) GetSlug() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.Slug
|
||
}
|
||
|
||
func (o *GetLibraryItemsMetadata) GetStudio() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Studio
|
||
}
|
||
|
||
func (o *GetLibraryItemsMetadata) GetType() GetLibraryItemsType {
|
||
if o == nil {
|
||
return GetLibraryItemsType("")
|
||
}
|
||
return o.Type
|
||
}
|
||
|
||
func (o *GetLibraryItemsMetadata) GetTitle() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.Title
|
||
}
|
||
|
||
func (o *GetLibraryItemsMetadata) GetBanner() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.Banner
|
||
}
|
||
|
||
func (o *GetLibraryItemsMetadata) GetTitleSort() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.TitleSort
|
||
}
|
||
|
||
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() float32 {
|
||
if o == nil {
|
||
return 0.0
|
||
}
|
||
return o.Rating
|
||
}
|
||
|
||
func (o *GetLibraryItemsMetadata) GetAudienceRating() float64 {
|
||
if o == nil {
|
||
return 0.0
|
||
}
|
||
return o.AudienceRating
|
||
}
|
||
|
||
func (o *GetLibraryItemsMetadata) GetYear() *int {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Year
|
||
}
|
||
|
||
func (o *GetLibraryItemsMetadata) GetTagline() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.Tagline
|
||
}
|
||
|
||
func (o *GetLibraryItemsMetadata) GetThumb() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.Thumb
|
||
}
|
||
|
||
func (o *GetLibraryItemsMetadata) GetArt() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.Art
|
||
}
|
||
|
||
func (o *GetLibraryItemsMetadata) GetTheme() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.Theme
|
||
}
|
||
|
||
func (o *GetLibraryItemsMetadata) GetIndex() int {
|
||
if o == nil {
|
||
return 0
|
||
}
|
||
return o.Index
|
||
}
|
||
|
||
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 0
|
||
}
|
||
return o.ChildCount
|
||
}
|
||
|
||
func (o *GetLibraryItemsMetadata) GetSeasonCount() int {
|
||
if o == nil {
|
||
return 0
|
||
}
|
||
return o.SeasonCount
|
||
}
|
||
|
||
func (o *GetLibraryItemsMetadata) GetDuration() int {
|
||
if o == nil {
|
||
return 0
|
||
}
|
||
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) GetOriginalTitle() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.OriginalTitle
|
||
}
|
||
|
||
func (o *GetLibraryItemsMetadata) GetParentRatingKey() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.ParentRatingKey
|
||
}
|
||
|
||
func (o *GetLibraryItemsMetadata) GetGrandparentRatingKey() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.GrandparentRatingKey
|
||
}
|
||
|
||
func (o *GetLibraryItemsMetadata) GetParentGUID() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.ParentGUID
|
||
}
|
||
|
||
func (o *GetLibraryItemsMetadata) GetGrandparentGUID() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.GrandparentGUID
|
||
}
|
||
|
||
func (o *GetLibraryItemsMetadata) GetGrandparentSlug() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.GrandparentSlug
|
||
}
|
||
|
||
func (o *GetLibraryItemsMetadata) GetGrandparentKey() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.GrandparentKey
|
||
}
|
||
|
||
func (o *GetLibraryItemsMetadata) GetParentKey() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.ParentKey
|
||
}
|
||
|
||
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) GetGrandparentTheme() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.GrandparentTheme
|
||
}
|
||
|
||
func (o *GetLibraryItemsMetadata) GetGrandparentArt() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.GrandparentArt
|
||
}
|
||
|
||
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) GetParentThumb() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.ParentThumb
|
||
}
|
||
|
||
func (o *GetLibraryItemsMetadata) GetRatingImage() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.RatingImage
|
||
}
|
||
|
||
func (o *GetLibraryItemsMetadata) GetViewCount() *int {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.ViewCount
|
||
}
|
||
|
||
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) GetSubtype() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Subtype
|
||
}
|
||
|
||
func (o *GetLibraryItemsMetadata) GetLastRatedAt() *int64 {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.LastRatedAt
|
||
}
|
||
|
||
func (o *GetLibraryItemsMetadata) GetCreatedAtAccuracy() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.CreatedAtAccuracy
|
||
}
|
||
|
||
func (o *GetLibraryItemsMetadata) GetCreatedAtTZOffset() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.CreatedAtTZOffset
|
||
}
|
||
|
||
func (o *GetLibraryItemsMetadata) GetLastViewedAt() *int {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.LastViewedAt
|
||
}
|
||
|
||
func (o *GetLibraryItemsMetadata) GetUserRating() *float32 {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.UserRating
|
||
}
|
||
|
||
func (o *GetLibraryItemsMetadata) GetImage() []GetLibraryItemsImage {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Image
|
||
}
|
||
|
||
func (o *GetLibraryItemsMetadata) GetUltraBlurColors() *GetLibraryItemsUltraBlurColors {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.UltraBlurColors
|
||
}
|
||
|
||
func (o *GetLibraryItemsMetadata) GetGuids() []GetLibraryItemsGuids {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Guids
|
||
}
|
||
|
||
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) GetShowOrdering() *ShowOrdering {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.ShowOrdering
|
||
}
|
||
|
||
func (o *GetLibraryItemsMetadata) GetFlattenSeasons() *FlattenSeasons {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.FlattenSeasons
|
||
}
|
||
|
||
func (o *GetLibraryItemsMetadata) GetSkipChildren() *bool {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.SkipChildren
|
||
}
|
||
|
||
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) GetProducer() []GetLibraryItemsProducer {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Producer
|
||
}
|
||
|
||
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) GetRatings() []Ratings {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Ratings
|
||
}
|
||
|
||
func (o *GetLibraryItemsMetadata) GetSimilar() []GetLibraryItemsSimilar {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Similar
|
||
}
|
||
|
||
func (o *GetLibraryItemsMetadata) GetLocation() []GetLibraryItemsLocation {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Location
|
||
}
|
||
|
||
func (o *GetLibraryItemsMetadata) GetChapter() []Chapter {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Chapter
|
||
}
|
||
|
||
func (o *GetLibraryItemsMetadata) GetMarker() []Marker {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Marker
|
||
}
|
||
|
||
func (o *GetLibraryItemsMetadata) GetExtras() *Extras {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.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 (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 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 (o *GetLibraryItemsLibraryType) GetKey() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.Key
|
||
}
|
||
|
||
func (o *GetLibraryItemsLibraryType) GetType() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.Type
|
||
}
|
||
|
||
func (o *GetLibraryItemsLibraryType) GetTitle() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.Title
|
||
}
|
||
|
||
func (o *GetLibraryItemsLibraryType) GetActive() bool {
|
||
if o == nil {
|
||
return false
|
||
}
|
||
return o.Active
|
||
}
|
||
|
||
func (o *GetLibraryItemsLibraryType) GetFilter() []GetLibraryItemsFilter {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Filter
|
||
}
|
||
|
||
func (o *GetLibraryItemsLibraryType) GetSort() []GetLibraryItemsSort {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Sort
|
||
}
|
||
|
||
func (o *GetLibraryItemsLibraryType) 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
|
||
}
|
||
|
||
// 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 (o *GetLibraryItemsMeta) GetType() []GetLibraryItemsLibraryType {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Type
|
||
}
|
||
|
||
func (o *GetLibraryItemsMeta) GetFieldType() []GetLibraryItemsFieldType {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.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 (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() int64 {
|
||
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 false
|
||
}
|
||
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 nil
|
||
}
|
||
return o.LibrarySectionID
|
||
}
|
||
|
||
func (o *GetLibraryItemsMediaContainer) GetLibrarySectionTitle() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.LibrarySectionTitle
|
||
}
|
||
|
||
func (o *GetLibraryItemsMediaContainer) GetLibrarySectionUUID() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.LibrarySectionUUID
|
||
}
|
||
|
||
func (o *GetLibraryItemsMediaContainer) GetMediaTagPrefix() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.MediaTagPrefix
|
||
}
|
||
|
||
func (o *GetLibraryItemsMediaContainer) GetMediaTagVersion() int64 {
|
||
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() *string {
|
||
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 []GetLibraryItemsMetadata{}
|
||
}
|
||
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
|
||
}
|