// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. package operations import ( "encoding/json" "errors" "fmt" "github.com/LukeHagar/plexgo/internal/utils" "github.com/LukeHagar/plexgo/types" "net/http" ) type SearchTypes string const ( SearchTypesMovies SearchTypes = "movies" SearchTypesMusic SearchTypes = "music" SearchTypesOtherVideos SearchTypes = "otherVideos" SearchTypesPeople SearchTypes = "people" SearchTypesTv SearchTypes = "tv" ) func (e SearchTypes) ToPointer() *SearchTypes { return &e } // GetSearchAllLibrariesQueryParamIncludeCollections - Whether to include collections in the search results. type GetSearchAllLibrariesQueryParamIncludeCollections int const ( GetSearchAllLibrariesQueryParamIncludeCollectionsDisable GetSearchAllLibrariesQueryParamIncludeCollections = 0 GetSearchAllLibrariesQueryParamIncludeCollectionsEnable GetSearchAllLibrariesQueryParamIncludeCollections = 1 ) func (e GetSearchAllLibrariesQueryParamIncludeCollections) ToPointer() *GetSearchAllLibrariesQueryParamIncludeCollections { return &e } func (e *GetSearchAllLibrariesQueryParamIncludeCollections) 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 = GetSearchAllLibrariesQueryParamIncludeCollections(v) return nil default: return fmt.Errorf("invalid value for GetSearchAllLibrariesQueryParamIncludeCollections: %v", v) } } // GetSearchAllLibrariesQueryParamIncludeExternalMedia - Whether to include external media in the search results. type GetSearchAllLibrariesQueryParamIncludeExternalMedia int const ( GetSearchAllLibrariesQueryParamIncludeExternalMediaDisable GetSearchAllLibrariesQueryParamIncludeExternalMedia = 0 GetSearchAllLibrariesQueryParamIncludeExternalMediaEnable GetSearchAllLibrariesQueryParamIncludeExternalMedia = 1 ) func (e GetSearchAllLibrariesQueryParamIncludeExternalMedia) ToPointer() *GetSearchAllLibrariesQueryParamIncludeExternalMedia { return &e } func (e *GetSearchAllLibrariesQueryParamIncludeExternalMedia) 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 = GetSearchAllLibrariesQueryParamIncludeExternalMedia(v) return nil default: return fmt.Errorf("invalid value for GetSearchAllLibrariesQueryParamIncludeExternalMedia: %v", v) } } type GetSearchAllLibrariesRequest struct { // The search query term. Query string `queryParam:"style=form,explode=true,name=query"` // An opaque identifier unique to the client (UUID, serial number, or other unique device ID) ClientID string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"` // Limit the number of results returned. Limit *int64 `queryParam:"style=form,explode=true,name=limit"` // A comma-separated list of search types to include. Valid values are: movies, music, otherVideos, people, tv. // SearchTypes []SearchTypes `queryParam:"style=form,explode=false,name=searchTypes"` // Whether to include collections in the search results. IncludeCollections *GetSearchAllLibrariesQueryParamIncludeCollections `default:"0" queryParam:"style=form,explode=true,name=includeCollections"` // Whether to include external media in the search results. IncludeExternalMedia *GetSearchAllLibrariesQueryParamIncludeExternalMedia `default:"0" queryParam:"style=form,explode=true,name=includeExternalMedia"` } func (g GetSearchAllLibrariesRequest) MarshalJSON() ([]byte, error) { return utils.MarshalJSON(g, "", false) } func (g *GetSearchAllLibrariesRequest) UnmarshalJSON(data []byte) error { if err := utils.UnmarshalJSON(data, &g, "", false, []string{"query", "X-Plex-Client-Identifier"}); err != nil { return err } return nil } func (g *GetSearchAllLibrariesRequest) GetQuery() string { if g == nil { return "" } return g.Query } func (g *GetSearchAllLibrariesRequest) GetClientID() string { if g == nil { return "" } return g.ClientID } func (g *GetSearchAllLibrariesRequest) GetLimit() *int64 { if g == nil { return nil } return g.Limit } func (g *GetSearchAllLibrariesRequest) GetSearchTypes() []SearchTypes { if g == nil { return nil } return g.SearchTypes } func (g *GetSearchAllLibrariesRequest) GetIncludeCollections() *GetSearchAllLibrariesQueryParamIncludeCollections { if g == nil { return nil } return g.IncludeCollections } func (g *GetSearchAllLibrariesRequest) GetIncludeExternalMedia() *GetSearchAllLibrariesQueryParamIncludeExternalMedia { if g == nil { return nil } return g.IncludeExternalMedia } type GetSearchAllLibrariesDirectory struct { // The unique identifier path for the search result item. Key string `json:"key"` // The identifier for the library section. LibrarySectionID int64 `json:"librarySectionID"` // The key corresponding to the library section. LibrarySectionKey string `json:"librarySectionKey"` // The title of the library section. LibrarySectionTitle string `json:"librarySectionTitle"` librarySectionType *int64 `const:"1" json:"librarySectionType,omitempty"` // The type of the directory. Type string `json:"type"` ID int64 `json:"id"` // The filter string used to query this specific item in the library. Filter *string `json:"filter,omitempty"` Tag string `json:"tag"` // The type of tag associated with this search result (e.g., Director, Actor). tagType *int64 `const:"4" json:"tagType,omitempty"` // The unique identifier for the tag associated with this search result. TagKey *string `json:"tagKey,omitempty"` // The URL to the thumbnail image associated with this search result. Thumb *string `json:"thumb,omitempty"` // The number of items associated with this search result. Count *int64 `json:"count,omitempty"` } func (g GetSearchAllLibrariesDirectory) MarshalJSON() ([]byte, error) { return utils.MarshalJSON(g, "", false) } func (g *GetSearchAllLibrariesDirectory) UnmarshalJSON(data []byte) error { if err := utils.UnmarshalJSON(data, &g, "", false, []string{"key", "librarySectionID", "librarySectionKey", "librarySectionTitle", "type", "id", "tag"}); err != nil { return err } return nil } func (g *GetSearchAllLibrariesDirectory) GetKey() string { if g == nil { return "" } return g.Key } func (g *GetSearchAllLibrariesDirectory) GetLibrarySectionID() int64 { if g == nil { return 0 } return g.LibrarySectionID } func (g *GetSearchAllLibrariesDirectory) GetLibrarySectionKey() string { if g == nil { return "" } return g.LibrarySectionKey } func (g *GetSearchAllLibrariesDirectory) GetLibrarySectionTitle() string { if g == nil { return "" } return g.LibrarySectionTitle } func (g *GetSearchAllLibrariesDirectory) GetLibrarySectionType() *int64 { return types.Pointer[int64](1) } func (g *GetSearchAllLibrariesDirectory) GetType() string { if g == nil { return "" } return g.Type } func (g *GetSearchAllLibrariesDirectory) GetID() int64 { if g == nil { return 0 } return g.ID } func (g *GetSearchAllLibrariesDirectory) GetFilter() *string { if g == nil { return nil } return g.Filter } func (g *GetSearchAllLibrariesDirectory) GetTag() string { if g == nil { return "" } return g.Tag } func (g *GetSearchAllLibrariesDirectory) GetTagType() *int64 { return types.Pointer[int64](4) } func (g *GetSearchAllLibrariesDirectory) GetTagKey() *string { if g == nil { return nil } return g.TagKey } func (g *GetSearchAllLibrariesDirectory) GetThumb() *string { if g == nil { return nil } return g.Thumb } func (g *GetSearchAllLibrariesDirectory) GetCount() *int64 { if g == nil { return nil } return g.Count } // GetSearchAllLibrariesType - The type of media content in the Plex library. This can represent videos, music, or photos. type GetSearchAllLibrariesType string const ( GetSearchAllLibrariesTypeMovie GetSearchAllLibrariesType = "movie" GetSearchAllLibrariesTypeTvShow GetSearchAllLibrariesType = "show" GetSearchAllLibrariesTypeSeason GetSearchAllLibrariesType = "season" GetSearchAllLibrariesTypeEpisode GetSearchAllLibrariesType = "episode" GetSearchAllLibrariesTypeArtist GetSearchAllLibrariesType = "artist" GetSearchAllLibrariesTypeAlbum GetSearchAllLibrariesType = "album" GetSearchAllLibrariesTypeTrack GetSearchAllLibrariesType = "track" GetSearchAllLibrariesTypePhotoAlbum GetSearchAllLibrariesType = "photoalbum" GetSearchAllLibrariesTypePhoto GetSearchAllLibrariesType = "photo" GetSearchAllLibrariesTypeCollection GetSearchAllLibrariesType = "collection" ) func (e GetSearchAllLibrariesType) ToPointer() *GetSearchAllLibrariesType { return &e } type GetSearchAllLibrariesLibraryType string const ( GetSearchAllLibrariesLibraryTypeCoverPoster GetSearchAllLibrariesLibraryType = "coverPoster" GetSearchAllLibrariesLibraryTypeBackground GetSearchAllLibrariesLibraryType = "background" GetSearchAllLibrariesLibraryTypeSnapshot GetSearchAllLibrariesLibraryType = "snapshot" GetSearchAllLibrariesLibraryTypeClearLogo GetSearchAllLibrariesLibraryType = "clearLogo" ) func (e GetSearchAllLibrariesLibraryType) ToPointer() *GetSearchAllLibrariesLibraryType { return &e } type GetSearchAllLibrariesImage struct { Alt string `json:"alt"` Type GetSearchAllLibrariesLibraryType `json:"type"` URL string `json:"url"` } func (g *GetSearchAllLibrariesImage) GetAlt() string { if g == nil { return "" } return g.Alt } func (g *GetSearchAllLibrariesImage) GetType() GetSearchAllLibrariesLibraryType { if g == nil { return GetSearchAllLibrariesLibraryType("") } return g.Type } func (g *GetSearchAllLibrariesImage) GetURL() string { if g == nil { return "" } return g.URL } type GetSearchAllLibrariesUltraBlurColors struct { TopLeft string `json:"topLeft"` TopRight string `json:"topRight"` BottomRight string `json:"bottomRight"` BottomLeft string `json:"bottomLeft"` } func (g *GetSearchAllLibrariesUltraBlurColors) GetTopLeft() string { if g == nil { return "" } return g.TopLeft } func (g *GetSearchAllLibrariesUltraBlurColors) GetTopRight() string { if g == nil { return "" } return g.TopRight } func (g *GetSearchAllLibrariesUltraBlurColors) GetBottomRight() string { if g == nil { return "" } return g.BottomRight } func (g *GetSearchAllLibrariesUltraBlurColors) GetBottomLeft() string { if g == nil { return "" } return g.BottomLeft } type GetSearchAllLibrariesGuids struct { // The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb:// // ID string `json:"id"` } func (g *GetSearchAllLibrariesGuids) GetID() string { if g == nil { return "" } return g.ID } // GetSearchAllLibrariesShowOrdering - 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 GetSearchAllLibrariesShowOrdering string const ( GetSearchAllLibrariesShowOrderingNone GetSearchAllLibrariesShowOrdering = "None" GetSearchAllLibrariesShowOrderingTmdbAiring GetSearchAllLibrariesShowOrdering = "tmdbAiring" GetSearchAllLibrariesShowOrderingTvdbAired GetSearchAllLibrariesShowOrdering = "aired" GetSearchAllLibrariesShowOrderingTvdbDvd GetSearchAllLibrariesShowOrdering = "dvd" GetSearchAllLibrariesShowOrderingTvdbAbsolute GetSearchAllLibrariesShowOrdering = "absolute" ) func (e GetSearchAllLibrariesShowOrdering) ToPointer() *GetSearchAllLibrariesShowOrdering { return &e } // GetSearchAllLibrariesFlattenSeasons - Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). type GetSearchAllLibrariesFlattenSeasons string const ( GetSearchAllLibrariesFlattenSeasonsLibraryDefault GetSearchAllLibrariesFlattenSeasons = "-1" GetSearchAllLibrariesFlattenSeasonsHide GetSearchAllLibrariesFlattenSeasons = "0" GetSearchAllLibrariesFlattenSeasonsShow GetSearchAllLibrariesFlattenSeasons = "1" ) func (e GetSearchAllLibrariesFlattenSeasons) ToPointer() *GetSearchAllLibrariesFlattenSeasons { return &e } type GetSearchAllLibrariesOptimizedForStreaming1 int const ( GetSearchAllLibrariesOptimizedForStreaming1Zero GetSearchAllLibrariesOptimizedForStreaming1 = 0 GetSearchAllLibrariesOptimizedForStreaming1One GetSearchAllLibrariesOptimizedForStreaming1 = 1 ) func (e GetSearchAllLibrariesOptimizedForStreaming1) ToPointer() *GetSearchAllLibrariesOptimizedForStreaming1 { return &e } func (e *GetSearchAllLibrariesOptimizedForStreaming1) 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 = GetSearchAllLibrariesOptimizedForStreaming1(v) return nil default: return fmt.Errorf("invalid value for GetSearchAllLibrariesOptimizedForStreaming1: %v", v) } } type GetSearchAllLibrariesOptimizedForStreamingType string const ( GetSearchAllLibrariesOptimizedForStreamingTypeGetSearchAllLibrariesOptimizedForStreaming1 GetSearchAllLibrariesOptimizedForStreamingType = "get-search-all-libraries_optimizedForStreaming_1" GetSearchAllLibrariesOptimizedForStreamingTypeBoolean GetSearchAllLibrariesOptimizedForStreamingType = "boolean" ) // GetSearchAllLibrariesOptimizedForStreaming - Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true type GetSearchAllLibrariesOptimizedForStreaming struct { GetSearchAllLibrariesOptimizedForStreaming1 *GetSearchAllLibrariesOptimizedForStreaming1 `queryParam:"inline,name=optimizedForStreaming"` Boolean *bool `queryParam:"inline,name=optimizedForStreaming"` Type GetSearchAllLibrariesOptimizedForStreamingType } func CreateGetSearchAllLibrariesOptimizedForStreamingGetSearchAllLibrariesOptimizedForStreaming1(getSearchAllLibrariesOptimizedForStreaming1 GetSearchAllLibrariesOptimizedForStreaming1) GetSearchAllLibrariesOptimizedForStreaming { typ := GetSearchAllLibrariesOptimizedForStreamingTypeGetSearchAllLibrariesOptimizedForStreaming1 return GetSearchAllLibrariesOptimizedForStreaming{ GetSearchAllLibrariesOptimizedForStreaming1: &getSearchAllLibrariesOptimizedForStreaming1, Type: typ, } } func CreateGetSearchAllLibrariesOptimizedForStreamingBoolean(boolean bool) GetSearchAllLibrariesOptimizedForStreaming { typ := GetSearchAllLibrariesOptimizedForStreamingTypeBoolean return GetSearchAllLibrariesOptimizedForStreaming{ Boolean: &boolean, Type: typ, } } func (u *GetSearchAllLibrariesOptimizedForStreaming) UnmarshalJSON(data []byte) error { var getSearchAllLibrariesOptimizedForStreaming1 GetSearchAllLibrariesOptimizedForStreaming1 = GetSearchAllLibrariesOptimizedForStreaming1(0) if err := utils.UnmarshalJSON(data, &getSearchAllLibrariesOptimizedForStreaming1, "", true, nil); err == nil { u.GetSearchAllLibrariesOptimizedForStreaming1 = &getSearchAllLibrariesOptimizedForStreaming1 u.Type = GetSearchAllLibrariesOptimizedForStreamingTypeGetSearchAllLibrariesOptimizedForStreaming1 return nil } var boolean bool = false if err := utils.UnmarshalJSON(data, &boolean, "", true, nil); err == nil { u.Boolean = &boolean u.Type = GetSearchAllLibrariesOptimizedForStreamingTypeBoolean return nil } return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetSearchAllLibrariesOptimizedForStreaming", string(data)) } func (u GetSearchAllLibrariesOptimizedForStreaming) MarshalJSON() ([]byte, error) { if u.GetSearchAllLibrariesOptimizedForStreaming1 != nil { return utils.MarshalJSON(u.GetSearchAllLibrariesOptimizedForStreaming1, "", true) } if u.Boolean != nil { return utils.MarshalJSON(u.Boolean, "", true) } return nil, errors.New("could not marshal union type GetSearchAllLibrariesOptimizedForStreaming: all fields are null") } type GetSearchAllLibrariesOptimizedForStreamingLibrary1 int const ( GetSearchAllLibrariesOptimizedForStreamingLibrary1Zero GetSearchAllLibrariesOptimizedForStreamingLibrary1 = 0 GetSearchAllLibrariesOptimizedForStreamingLibrary1One GetSearchAllLibrariesOptimizedForStreamingLibrary1 = 1 ) func (e GetSearchAllLibrariesOptimizedForStreamingLibrary1) ToPointer() *GetSearchAllLibrariesOptimizedForStreamingLibrary1 { return &e } func (e *GetSearchAllLibrariesOptimizedForStreamingLibrary1) 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 = GetSearchAllLibrariesOptimizedForStreamingLibrary1(v) return nil default: return fmt.Errorf("invalid value for GetSearchAllLibrariesOptimizedForStreamingLibrary1: %v", v) } } type GetSearchAllLibrariesLibraryOptimizedForStreamingType string const ( GetSearchAllLibrariesLibraryOptimizedForStreamingTypeGetSearchAllLibrariesOptimizedForStreamingLibrary1 GetSearchAllLibrariesLibraryOptimizedForStreamingType = "get-search-all-libraries_optimizedForStreaming_Library_1" GetSearchAllLibrariesLibraryOptimizedForStreamingTypeBoolean GetSearchAllLibrariesLibraryOptimizedForStreamingType = "boolean" ) // GetSearchAllLibrariesLibraryOptimizedForStreaming - Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true type GetSearchAllLibrariesLibraryOptimizedForStreaming struct { GetSearchAllLibrariesOptimizedForStreamingLibrary1 *GetSearchAllLibrariesOptimizedForStreamingLibrary1 `queryParam:"inline,name=optimizedForStreaming"` Boolean *bool `queryParam:"inline,name=optimizedForStreaming"` Type GetSearchAllLibrariesLibraryOptimizedForStreamingType } func CreateGetSearchAllLibrariesLibraryOptimizedForStreamingGetSearchAllLibrariesOptimizedForStreamingLibrary1(getSearchAllLibrariesOptimizedForStreamingLibrary1 GetSearchAllLibrariesOptimizedForStreamingLibrary1) GetSearchAllLibrariesLibraryOptimizedForStreaming { typ := GetSearchAllLibrariesLibraryOptimizedForStreamingTypeGetSearchAllLibrariesOptimizedForStreamingLibrary1 return GetSearchAllLibrariesLibraryOptimizedForStreaming{ GetSearchAllLibrariesOptimizedForStreamingLibrary1: &getSearchAllLibrariesOptimizedForStreamingLibrary1, Type: typ, } } func CreateGetSearchAllLibrariesLibraryOptimizedForStreamingBoolean(boolean bool) GetSearchAllLibrariesLibraryOptimizedForStreaming { typ := GetSearchAllLibrariesLibraryOptimizedForStreamingTypeBoolean return GetSearchAllLibrariesLibraryOptimizedForStreaming{ Boolean: &boolean, Type: typ, } } func (u *GetSearchAllLibrariesLibraryOptimizedForStreaming) UnmarshalJSON(data []byte) error { var getSearchAllLibrariesOptimizedForStreamingLibrary1 GetSearchAllLibrariesOptimizedForStreamingLibrary1 = GetSearchAllLibrariesOptimizedForStreamingLibrary1(0) if err := utils.UnmarshalJSON(data, &getSearchAllLibrariesOptimizedForStreamingLibrary1, "", true, nil); err == nil { u.GetSearchAllLibrariesOptimizedForStreamingLibrary1 = &getSearchAllLibrariesOptimizedForStreamingLibrary1 u.Type = GetSearchAllLibrariesLibraryOptimizedForStreamingTypeGetSearchAllLibrariesOptimizedForStreamingLibrary1 return nil } var boolean bool = false if err := utils.UnmarshalJSON(data, &boolean, "", true, nil); err == nil { u.Boolean = &boolean u.Type = GetSearchAllLibrariesLibraryOptimizedForStreamingTypeBoolean return nil } return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetSearchAllLibrariesLibraryOptimizedForStreaming", string(data)) } func (u GetSearchAllLibrariesLibraryOptimizedForStreaming) MarshalJSON() ([]byte, error) { if u.GetSearchAllLibrariesOptimizedForStreamingLibrary1 != nil { return utils.MarshalJSON(u.GetSearchAllLibrariesOptimizedForStreamingLibrary1, "", true) } if u.Boolean != nil { return utils.MarshalJSON(u.Boolean, "", true) } return nil, errors.New("could not marshal union type GetSearchAllLibrariesLibraryOptimizedForStreaming: all fields are null") } // GetSearchAllLibrariesHasThumbnail - Indicates if the part has a thumbnail. type GetSearchAllLibrariesHasThumbnail string const ( GetSearchAllLibrariesHasThumbnailFalse GetSearchAllLibrariesHasThumbnail = "0" GetSearchAllLibrariesHasThumbnailTrue GetSearchAllLibrariesHasThumbnail = "1" ) func (e GetSearchAllLibrariesHasThumbnail) ToPointer() *GetSearchAllLibrariesHasThumbnail { return &e } func (e *GetSearchAllLibrariesHasThumbnail) 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 = GetSearchAllLibrariesHasThumbnail(v) return nil default: return fmt.Errorf("invalid value for GetSearchAllLibrariesHasThumbnail: %v", v) } } type GetSearchAllLibrariesPart 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 *GetSearchAllLibrariesLibraryOptimizedForStreaming `json:"optimizedForStreaming,omitempty"` HasThumbnail *GetSearchAllLibrariesHasThumbnail `default:"0" json:"hasThumbnail"` } func (g GetSearchAllLibrariesPart) MarshalJSON() ([]byte, error) { return utils.MarshalJSON(g, "", false) } func (g *GetSearchAllLibrariesPart) UnmarshalJSON(data []byte) error { if err := utils.UnmarshalJSON(data, &g, "", false, []string{"id"}); err != nil { return err } return nil } func (g *GetSearchAllLibrariesPart) GetAccessible() *bool { if g == nil { return nil } return g.Accessible } func (g *GetSearchAllLibrariesPart) GetExists() *bool { if g == nil { return nil } return g.Exists } func (g *GetSearchAllLibrariesPart) GetID() int64 { if g == nil { return 0 } return g.ID } func (g *GetSearchAllLibrariesPart) GetKey() *string { if g == nil { return nil } return g.Key } func (g *GetSearchAllLibrariesPart) GetIndexes() *string { if g == nil { return nil } return g.Indexes } func (g *GetSearchAllLibrariesPart) GetDuration() *int { if g == nil { return nil } return g.Duration } func (g *GetSearchAllLibrariesPart) GetFile() *string { if g == nil { return nil } return g.File } func (g *GetSearchAllLibrariesPart) GetSize() *int64 { if g == nil { return nil } return g.Size } func (g *GetSearchAllLibrariesPart) GetPacketLength() *int { if g == nil { return nil } return g.PacketLength } func (g *GetSearchAllLibrariesPart) GetContainer() *string { if g == nil { return nil } return g.Container } func (g *GetSearchAllLibrariesPart) GetVideoProfile() *string { if g == nil { return nil } return g.VideoProfile } func (g *GetSearchAllLibrariesPart) GetAudioProfile() *string { if g == nil { return nil } return g.AudioProfile } func (g *GetSearchAllLibrariesPart) GetHas64bitOffsets() *bool { if g == nil { return nil } return g.Has64bitOffsets } func (g *GetSearchAllLibrariesPart) GetOptimizedForStreaming() *GetSearchAllLibrariesLibraryOptimizedForStreaming { if g == nil { return nil } return g.OptimizedForStreaming } func (g *GetSearchAllLibrariesPart) GetHasThumbnail() *GetSearchAllLibrariesHasThumbnail { if g == nil { return nil } return g.HasThumbnail } type GetSearchAllLibrariesMedia 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 *GetSearchAllLibrariesOptimizedForStreaming `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 []GetSearchAllLibrariesPart `json:"Part,omitempty"` } func (g *GetSearchAllLibrariesMedia) GetID() int64 { if g == nil { return 0 } return g.ID } func (g *GetSearchAllLibrariesMedia) GetDuration() *int { if g == nil { return nil } return g.Duration } func (g *GetSearchAllLibrariesMedia) GetBitrate() *int { if g == nil { return nil } return g.Bitrate } func (g *GetSearchAllLibrariesMedia) GetWidth() *int { if g == nil { return nil } return g.Width } func (g *GetSearchAllLibrariesMedia) GetHeight() *int { if g == nil { return nil } return g.Height } func (g *GetSearchAllLibrariesMedia) GetAspectRatio() *float32 { if g == nil { return nil } return g.AspectRatio } func (g *GetSearchAllLibrariesMedia) GetAudioChannels() *int { if g == nil { return nil } return g.AudioChannels } func (g *GetSearchAllLibrariesMedia) GetDisplayOffset() *int { if g == nil { return nil } return g.DisplayOffset } func (g *GetSearchAllLibrariesMedia) GetAudioCodec() *string { if g == nil { return nil } return g.AudioCodec } func (g *GetSearchAllLibrariesMedia) GetVideoCodec() *string { if g == nil { return nil } return g.VideoCodec } func (g *GetSearchAllLibrariesMedia) GetVideoResolution() *string { if g == nil { return nil } return g.VideoResolution } func (g *GetSearchAllLibrariesMedia) GetContainer() *string { if g == nil { return nil } return g.Container } func (g *GetSearchAllLibrariesMedia) GetVideoFrameRate() *string { if g == nil { return nil } return g.VideoFrameRate } func (g *GetSearchAllLibrariesMedia) GetVideoProfile() *string { if g == nil { return nil } return g.VideoProfile } func (g *GetSearchAllLibrariesMedia) GetHasVoiceActivity() *bool { if g == nil { return nil } return g.HasVoiceActivity } func (g *GetSearchAllLibrariesMedia) GetAudioProfile() *string { if g == nil { return nil } return g.AudioProfile } func (g *GetSearchAllLibrariesMedia) GetOptimizedForStreaming() *GetSearchAllLibrariesOptimizedForStreaming { if g == nil { return nil } return g.OptimizedForStreaming } func (g *GetSearchAllLibrariesMedia) GetHas64bitOffsets() *bool { if g == nil { return nil } return g.Has64bitOffsets } func (g *GetSearchAllLibrariesMedia) GetPart() []GetSearchAllLibrariesPart { if g == nil { return nil } return g.Part } type GetSearchAllLibrariesGenre 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 *GetSearchAllLibrariesGenre) GetID() int { if g == nil { return 0 } return g.ID } func (g *GetSearchAllLibrariesGenre) GetTag() string { if g == nil { return "" } return g.Tag } type GetSearchAllLibrariesCountry 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 *GetSearchAllLibrariesCountry) GetID() int { if g == nil { return 0 } return g.ID } func (g *GetSearchAllLibrariesCountry) GetTag() string { if g == nil { return "" } return g.Tag } type GetSearchAllLibrariesDirector 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 *GetSearchAllLibrariesDirector) GetID() int { if g == nil { return 0 } return g.ID } func (g *GetSearchAllLibrariesDirector) GetTag() string { if g == nil { return "" } return g.Tag } func (g *GetSearchAllLibrariesDirector) GetThumb() *string { if g == nil { return nil } return g.Thumb } type GetSearchAllLibrariesWriter 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 *GetSearchAllLibrariesWriter) GetID() int { if g == nil { return 0 } return g.ID } func (g *GetSearchAllLibrariesWriter) GetTag() string { if g == nil { return "" } return g.Tag } func (g *GetSearchAllLibrariesWriter) GetThumb() *string { if g == nil { return nil } return g.Thumb } type GetSearchAllLibrariesRole 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 *GetSearchAllLibrariesRole) GetID() int { if g == nil { return 0 } return g.ID } func (g *GetSearchAllLibrariesRole) GetTag() string { if g == nil { return "" } return g.Tag } func (g *GetSearchAllLibrariesRole) GetRole() *string { if g == nil { return nil } return g.Role } func (g *GetSearchAllLibrariesRole) GetThumb() *string { if g == nil { return nil } return g.Thumb } // GetSearchAllLibrariesLocation - The folder path for the media item. type GetSearchAllLibrariesLocation struct { Path string `json:"path"` } func (g *GetSearchAllLibrariesLocation) GetPath() string { if g == nil { return "" } return g.Path } // GetSearchAllLibrariesMetadata - Unknown type GetSearchAllLibrariesMetadata 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 GetSearchAllLibrariesType `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 release year of the parent media item. ParentYear *int `json:"parentYear,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 []GetSearchAllLibrariesImage `json:"Image,omitempty"` UltraBlurColors *GetSearchAllLibrariesUltraBlurColors `json:"UltraBlurColors,omitempty"` Guids []GetSearchAllLibrariesGuids `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 *GetSearchAllLibrariesShowOrdering `json:"showOrdering,omitempty"` // Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). // FlattenSeasons *GetSearchAllLibrariesFlattenSeasons `json:"flattenSeasons,omitempty"` // Indicates whether child items should be skipped. SkipChildren *bool `json:"skipChildren,omitempty"` Media []GetSearchAllLibrariesMedia `json:"Media,omitempty"` Genre []GetSearchAllLibrariesGenre `json:"Genre,omitempty"` Country []GetSearchAllLibrariesCountry `json:"Country,omitempty"` Director []GetSearchAllLibrariesDirector `json:"Director,omitempty"` Writer []GetSearchAllLibrariesWriter `json:"Writer,omitempty"` Role []GetSearchAllLibrariesRole `json:"Role,omitempty"` Location []GetSearchAllLibrariesLocation `json:"Location,omitempty"` } func (g GetSearchAllLibrariesMetadata) MarshalJSON() ([]byte, error) { return utils.MarshalJSON(g, "", false) } func (g *GetSearchAllLibrariesMetadata) 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 *GetSearchAllLibrariesMetadata) GetRatingKey() string { if g == nil { return "" } return g.RatingKey } func (g *GetSearchAllLibrariesMetadata) GetKey() string { if g == nil { return "" } return g.Key } func (g *GetSearchAllLibrariesMetadata) GetGUID() string { if g == nil { return "" } return g.GUID } func (g *GetSearchAllLibrariesMetadata) GetSlug() string { if g == nil { return "" } return g.Slug } func (g *GetSearchAllLibrariesMetadata) GetStudio() *string { if g == nil { return nil } return g.Studio } func (g *GetSearchAllLibrariesMetadata) GetType() GetSearchAllLibrariesType { if g == nil { return GetSearchAllLibrariesType("") } return g.Type } func (g *GetSearchAllLibrariesMetadata) GetTitle() string { if g == nil { return "" } return g.Title } func (g *GetSearchAllLibrariesMetadata) GetBanner() string { if g == nil { return "" } return g.Banner } func (g *GetSearchAllLibrariesMetadata) GetTitleSort() string { if g == nil { return "" } return g.TitleSort } func (g *GetSearchAllLibrariesMetadata) GetContentRating() *string { if g == nil { return nil } return g.ContentRating } func (g *GetSearchAllLibrariesMetadata) GetSummary() string { if g == nil { return "" } return g.Summary } func (g *GetSearchAllLibrariesMetadata) GetRating() float32 { if g == nil { return 0.0 } return g.Rating } func (g *GetSearchAllLibrariesMetadata) GetAudienceRating() float64 { if g == nil { return 0.0 } return g.AudienceRating } func (g *GetSearchAllLibrariesMetadata) GetYear() *int { if g == nil { return nil } return g.Year } func (g *GetSearchAllLibrariesMetadata) GetTagline() string { if g == nil { return "" } return g.Tagline } func (g *GetSearchAllLibrariesMetadata) GetThumb() string { if g == nil { return "" } return g.Thumb } func (g *GetSearchAllLibrariesMetadata) GetArt() string { if g == nil { return "" } return g.Art } func (g *GetSearchAllLibrariesMetadata) GetTheme() string { if g == nil { return "" } return g.Theme } func (g *GetSearchAllLibrariesMetadata) GetIndex() int { if g == nil { return 0 } return g.Index } func (g *GetSearchAllLibrariesMetadata) GetLeafCount() *int { if g == nil { return nil } return g.LeafCount } func (g *GetSearchAllLibrariesMetadata) GetViewedLeafCount() *int { if g == nil { return nil } return g.ViewedLeafCount } func (g *GetSearchAllLibrariesMetadata) GetChildCount() int { if g == nil { return 0 } return g.ChildCount } func (g *GetSearchAllLibrariesMetadata) GetSeasonCount() int { if g == nil { return 0 } return g.SeasonCount } func (g *GetSearchAllLibrariesMetadata) GetDuration() int { if g == nil { return 0 } return g.Duration } func (g *GetSearchAllLibrariesMetadata) GetOriginallyAvailableAt() *types.Date { if g == nil { return nil } return g.OriginallyAvailableAt } func (g *GetSearchAllLibrariesMetadata) GetAddedAt() int64 { if g == nil { return 0 } return g.AddedAt } func (g *GetSearchAllLibrariesMetadata) GetUpdatedAt() *int64 { if g == nil { return nil } return g.UpdatedAt } func (g *GetSearchAllLibrariesMetadata) GetParentYear() *int { if g == nil { return nil } return g.ParentYear } func (g *GetSearchAllLibrariesMetadata) GetAudienceRatingImage() *string { if g == nil { return nil } return g.AudienceRatingImage } func (g *GetSearchAllLibrariesMetadata) GetChapterSource() *string { if g == nil { return nil } return g.ChapterSource } func (g *GetSearchAllLibrariesMetadata) GetPrimaryExtraKey() *string { if g == nil { return nil } return g.PrimaryExtraKey } func (g *GetSearchAllLibrariesMetadata) GetOriginalTitle() *string { if g == nil { return nil } return g.OriginalTitle } func (g *GetSearchAllLibrariesMetadata) GetParentRatingKey() *string { if g == nil { return nil } return g.ParentRatingKey } func (g *GetSearchAllLibrariesMetadata) GetGrandparentRatingKey() *string { if g == nil { return nil } return g.GrandparentRatingKey } func (g *GetSearchAllLibrariesMetadata) GetParentGUID() *string { if g == nil { return nil } return g.ParentGUID } func (g *GetSearchAllLibrariesMetadata) GetGrandparentGUID() *string { if g == nil { return nil } return g.GrandparentGUID } func (g *GetSearchAllLibrariesMetadata) GetGrandparentSlug() *string { if g == nil { return nil } return g.GrandparentSlug } func (g *GetSearchAllLibrariesMetadata) GetGrandparentKey() *string { if g == nil { return nil } return g.GrandparentKey } func (g *GetSearchAllLibrariesMetadata) GetParentKey() *string { if g == nil { return nil } return g.ParentKey } func (g *GetSearchAllLibrariesMetadata) GetGrandparentTitle() *string { if g == nil { return nil } return g.GrandparentTitle } func (g *GetSearchAllLibrariesMetadata) GetGrandparentThumb() *string { if g == nil { return nil } return g.GrandparentThumb } func (g *GetSearchAllLibrariesMetadata) GetGrandparentTheme() *string { if g == nil { return nil } return g.GrandparentTheme } func (g *GetSearchAllLibrariesMetadata) GetGrandparentArt() *string { if g == nil { return nil } return g.GrandparentArt } func (g *GetSearchAllLibrariesMetadata) GetParentTitle() *string { if g == nil { return nil } return g.ParentTitle } func (g *GetSearchAllLibrariesMetadata) GetParentIndex() *int { if g == nil { return nil } return g.ParentIndex } func (g *GetSearchAllLibrariesMetadata) GetParentThumb() *string { if g == nil { return nil } return g.ParentThumb } func (g *GetSearchAllLibrariesMetadata) GetRatingImage() *string { if g == nil { return nil } return g.RatingImage } func (g *GetSearchAllLibrariesMetadata) GetViewCount() *int { if g == nil { return nil } return g.ViewCount } func (g *GetSearchAllLibrariesMetadata) GetViewOffset() *int { if g == nil { return nil } return g.ViewOffset } func (g *GetSearchAllLibrariesMetadata) GetSkipCount() *int { if g == nil { return nil } return g.SkipCount } func (g *GetSearchAllLibrariesMetadata) GetSubtype() *string { if g == nil { return nil } return g.Subtype } func (g *GetSearchAllLibrariesMetadata) GetLastRatedAt() *int64 { if g == nil { return nil } return g.LastRatedAt } func (g *GetSearchAllLibrariesMetadata) GetCreatedAtAccuracy() *string { if g == nil { return nil } return g.CreatedAtAccuracy } func (g *GetSearchAllLibrariesMetadata) GetCreatedAtTZOffset() *string { if g == nil { return nil } return g.CreatedAtTZOffset } func (g *GetSearchAllLibrariesMetadata) GetLastViewedAt() *int { if g == nil { return nil } return g.LastViewedAt } func (g *GetSearchAllLibrariesMetadata) GetUserRating() *float32 { if g == nil { return nil } return g.UserRating } func (g *GetSearchAllLibrariesMetadata) GetImage() []GetSearchAllLibrariesImage { if g == nil { return nil } return g.Image } func (g *GetSearchAllLibrariesMetadata) GetUltraBlurColors() *GetSearchAllLibrariesUltraBlurColors { if g == nil { return nil } return g.UltraBlurColors } func (g *GetSearchAllLibrariesMetadata) GetGuids() []GetSearchAllLibrariesGuids { if g == nil { return nil } return g.Guids } func (g *GetSearchAllLibrariesMetadata) GetLibrarySectionID() *int64 { if g == nil { return nil } return g.LibrarySectionID } func (g *GetSearchAllLibrariesMetadata) GetLibrarySectionTitle() *string { if g == nil { return nil } return g.LibrarySectionTitle } func (g *GetSearchAllLibrariesMetadata) GetLibrarySectionKey() *string { if g == nil { return nil } return g.LibrarySectionKey } func (g *GetSearchAllLibrariesMetadata) GetShowOrdering() *GetSearchAllLibrariesShowOrdering { if g == nil { return nil } return g.ShowOrdering } func (g *GetSearchAllLibrariesMetadata) GetFlattenSeasons() *GetSearchAllLibrariesFlattenSeasons { if g == nil { return nil } return g.FlattenSeasons } func (g *GetSearchAllLibrariesMetadata) GetSkipChildren() *bool { if g == nil { return nil } return g.SkipChildren } func (g *GetSearchAllLibrariesMetadata) GetMedia() []GetSearchAllLibrariesMedia { if g == nil { return nil } return g.Media } func (g *GetSearchAllLibrariesMetadata) GetGenre() []GetSearchAllLibrariesGenre { if g == nil { return nil } return g.Genre } func (g *GetSearchAllLibrariesMetadata) GetCountry() []GetSearchAllLibrariesCountry { if g == nil { return nil } return g.Country } func (g *GetSearchAllLibrariesMetadata) GetDirector() []GetSearchAllLibrariesDirector { if g == nil { return nil } return g.Director } func (g *GetSearchAllLibrariesMetadata) GetWriter() []GetSearchAllLibrariesWriter { if g == nil { return nil } return g.Writer } func (g *GetSearchAllLibrariesMetadata) GetRole() []GetSearchAllLibrariesRole { if g == nil { return nil } return g.Role } func (g *GetSearchAllLibrariesMetadata) GetLocation() []GetSearchAllLibrariesLocation { if g == nil { return nil } return g.Location } type SearchResult struct { // The score of the search result, typically a float value between 0 and 1. Score float32 `json:"score"` Directory *GetSearchAllLibrariesDirectory `json:"Directory,omitempty"` Metadata *GetSearchAllLibrariesMetadata `json:"Metadata,omitempty"` } func (s *SearchResult) GetScore() float32 { if s == nil { return 0.0 } return s.Score } func (s *SearchResult) GetDirectory() *GetSearchAllLibrariesDirectory { if s == nil { return nil } return s.Directory } func (s *SearchResult) GetMetadata() *GetSearchAllLibrariesMetadata { if s == nil { return nil } return s.Metadata } type GetSearchAllLibrariesMediaContainer struct { // Number of media items returned in this response. Size int `json:"size"` // Indicates whether syncing is allowed. AllowSync bool `json:"allowSync"` // An plugin identifier for the media container. Identifier string `json:"identifier"` // The unique identifier for the library section. LibrarySectionID *int64 `json:"librarySectionID,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"` SearchResult []SearchResult `json:"SearchResult"` } func (g *GetSearchAllLibrariesMediaContainer) GetSize() int { if g == nil { return 0 } return g.Size } func (g *GetSearchAllLibrariesMediaContainer) GetAllowSync() bool { if g == nil { return false } return g.AllowSync } func (g *GetSearchAllLibrariesMediaContainer) GetIdentifier() string { if g == nil { return "" } return g.Identifier } func (g *GetSearchAllLibrariesMediaContainer) GetLibrarySectionID() *int64 { if g == nil { return nil } return g.LibrarySectionID } func (g *GetSearchAllLibrariesMediaContainer) GetLibrarySectionTitle() *string { if g == nil { return nil } return g.LibrarySectionTitle } func (g *GetSearchAllLibrariesMediaContainer) GetLibrarySectionUUID() *string { if g == nil { return nil } return g.LibrarySectionUUID } func (g *GetSearchAllLibrariesMediaContainer) GetMediaTagPrefix() string { if g == nil { return "" } return g.MediaTagPrefix } func (g *GetSearchAllLibrariesMediaContainer) GetMediaTagVersion() int64 { if g == nil { return 0 } return g.MediaTagVersion } func (g *GetSearchAllLibrariesMediaContainer) GetSearchResult() []SearchResult { if g == nil { return []SearchResult{} } return g.SearchResult } // GetSearchAllLibrariesResponseBody - The libraries available on the Server type GetSearchAllLibrariesResponseBody struct { MediaContainer GetSearchAllLibrariesMediaContainer `json:"MediaContainer"` } func (g *GetSearchAllLibrariesResponseBody) GetMediaContainer() GetSearchAllLibrariesMediaContainer { if g == nil { return GetSearchAllLibrariesMediaContainer{} } return g.MediaContainer } type GetSearchAllLibrariesResponse 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 libraries available on the Server Object *GetSearchAllLibrariesResponseBody } func (g *GetSearchAllLibrariesResponse) GetContentType() string { if g == nil { return "" } return g.ContentType } func (g *GetSearchAllLibrariesResponse) GetStatusCode() int { if g == nil { return 0 } return g.StatusCode } func (g *GetSearchAllLibrariesResponse) GetRawResponse() *http.Response { if g == nil { return nil } return g.RawResponse } func (g *GetSearchAllLibrariesResponse) GetObject() *GetSearchAllLibrariesResponseBody { if g == nil { return nil } return g.Object }