mirror of
https://github.com/LukeHagar/plexgo.git
synced 2025-12-06 04:20:46 +00:00
1144 lines
26 KiB
Go
1144 lines
26 KiB
Go
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
|
|
package operations
|
|
|
|
import (
|
|
"encoding/json"
|
|
"fmt"
|
|
"github.com/LukeHagar/plexgo/internal/utils"
|
|
"net/http"
|
|
"time"
|
|
)
|
|
|
|
// QueryParamType - 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 QueryParamType int64
|
|
|
|
const (
|
|
QueryParamTypeMovie QueryParamType = 1
|
|
QueryParamTypeTvShow QueryParamType = 2
|
|
QueryParamTypeSeason QueryParamType = 3
|
|
QueryParamTypeEpisode QueryParamType = 4
|
|
QueryParamTypeArtist QueryParamType = 5
|
|
QueryParamTypeAlbum QueryParamType = 6
|
|
QueryParamTypeTrack QueryParamType = 7
|
|
QueryParamTypePhotoAlbum QueryParamType = 8
|
|
QueryParamTypePhoto QueryParamType = 9
|
|
)
|
|
|
|
func (e QueryParamType) ToPointer() *QueryParamType {
|
|
return &e
|
|
}
|
|
|
|
// QueryParamIncludeMeta - Adds the Meta object to the response
|
|
type QueryParamIncludeMeta int
|
|
|
|
const (
|
|
QueryParamIncludeMetaDisable QueryParamIncludeMeta = 0
|
|
QueryParamIncludeMetaEnable QueryParamIncludeMeta = 1
|
|
)
|
|
|
|
func (e QueryParamIncludeMeta) ToPointer() *QueryParamIncludeMeta {
|
|
return &e
|
|
}
|
|
func (e *QueryParamIncludeMeta) 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 = QueryParamIncludeMeta(v)
|
|
return nil
|
|
default:
|
|
return fmt.Errorf("invalid value for QueryParamIncludeMeta: %v", v)
|
|
}
|
|
}
|
|
|
|
type GetRecentlyAddedLibraryRequest struct {
|
|
ContentDirectoryID *int64 `queryParam:"style=form,explode=true,name=contentDirectoryID"`
|
|
PinnedContentDirectoryID []int64 `queryParam:"style=form,explode=true,name=pinnedContentDirectoryID"`
|
|
// The library section ID for filtering content.
|
|
SectionID *int64 `queryParam:"style=form,explode=true,name=sectionID"`
|
|
// 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 QueryParamType `queryParam:"style=form,explode=true,name=type"`
|
|
// Adds the Meta object to the response
|
|
//
|
|
IncludeMeta *QueryParamIncludeMeta `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 GetRecentlyAddedLibraryRequest) MarshalJSON() ([]byte, error) {
|
|
return utils.MarshalJSON(g, "", false)
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryRequest) UnmarshalJSON(data []byte) error {
|
|
if err := utils.UnmarshalJSON(data, &g, "", false, []string{"type"}); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryRequest) GetContentDirectoryID() *int64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.ContentDirectoryID
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryRequest) GetPinnedContentDirectoryID() []int64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.PinnedContentDirectoryID
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryRequest) GetSectionID() *int64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.SectionID
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryRequest) GetType() QueryParamType {
|
|
if g == nil {
|
|
return QueryParamType(0)
|
|
}
|
|
return g.Type
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryRequest) GetIncludeMeta() *QueryParamIncludeMeta {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.IncludeMeta
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryRequest) GetXPlexContainerStart() *int {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.XPlexContainerStart
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryRequest) GetXPlexContainerSize() *int {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.XPlexContainerSize
|
|
}
|
|
|
|
type GetRecentlyAddedLibraryFilter struct {
|
|
Filter string `json:"filter"`
|
|
FilterType string `json:"filterType"`
|
|
Key string `json:"key"`
|
|
Title string `json:"title"`
|
|
Type string `json:"type"`
|
|
Advanced *bool `json:"advanced,omitempty"`
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryFilter) GetFilter() string {
|
|
if g == nil {
|
|
return ""
|
|
}
|
|
return g.Filter
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryFilter) GetFilterType() string {
|
|
if g == nil {
|
|
return ""
|
|
}
|
|
return g.FilterType
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryFilter) GetKey() string {
|
|
if g == nil {
|
|
return ""
|
|
}
|
|
return g.Key
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryFilter) GetTitle() string {
|
|
if g == nil {
|
|
return ""
|
|
}
|
|
return g.Title
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryFilter) GetType() string {
|
|
if g == nil {
|
|
return ""
|
|
}
|
|
return g.Type
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryFilter) GetAdvanced() *bool {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Advanced
|
|
}
|
|
|
|
// ActiveDirection - The direction of the sort. Can be either `asc` or `desc`.
|
|
type ActiveDirection string
|
|
|
|
const (
|
|
ActiveDirectionAscending ActiveDirection = "asc"
|
|
ActiveDirectionDescending ActiveDirection = "desc"
|
|
)
|
|
|
|
func (e ActiveDirection) ToPointer() *ActiveDirection {
|
|
return &e
|
|
}
|
|
func (e *ActiveDirection) 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 = ActiveDirection(v)
|
|
return nil
|
|
default:
|
|
return fmt.Errorf("invalid value for ActiveDirection: %v", v)
|
|
}
|
|
}
|
|
|
|
// DefaultDirection - The direction of the sort. Can be either `asc` or `desc`.
|
|
type DefaultDirection string
|
|
|
|
const (
|
|
DefaultDirectionAscending DefaultDirection = "asc"
|
|
DefaultDirectionDescending DefaultDirection = "desc"
|
|
)
|
|
|
|
func (e DefaultDirection) ToPointer() *DefaultDirection {
|
|
return &e
|
|
}
|
|
func (e *DefaultDirection) 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 = DefaultDirection(v)
|
|
return nil
|
|
default:
|
|
return fmt.Errorf("invalid value for DefaultDirection: %v", v)
|
|
}
|
|
}
|
|
|
|
type Sort struct {
|
|
Default *string `json:"default,omitempty"`
|
|
Active *bool `json:"active,omitempty"`
|
|
// The direction of the sort. Can be either `asc` or `desc`.
|
|
//
|
|
ActiveDirection *ActiveDirection `default:"asc" json:"activeDirection"`
|
|
// The direction of the sort. Can be either `asc` or `desc`.
|
|
//
|
|
DefaultDirection *DefaultDirection `default:"asc" json:"defaultDirection"`
|
|
DescKey *string `json:"descKey,omitempty"`
|
|
FirstCharacterKey *string `json:"firstCharacterKey,omitempty"`
|
|
Key string `json:"key"`
|
|
Title string `json:"title"`
|
|
}
|
|
|
|
func (s Sort) MarshalJSON() ([]byte, error) {
|
|
return utils.MarshalJSON(s, "", false)
|
|
}
|
|
|
|
func (s *Sort) UnmarshalJSON(data []byte) error {
|
|
if err := utils.UnmarshalJSON(data, &s, "", false, []string{"key", "title"}); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (s *Sort) GetDefault() *string {
|
|
if s == nil {
|
|
return nil
|
|
}
|
|
return s.Default
|
|
}
|
|
|
|
func (s *Sort) GetActive() *bool {
|
|
if s == nil {
|
|
return nil
|
|
}
|
|
return s.Active
|
|
}
|
|
|
|
func (s *Sort) GetActiveDirection() *ActiveDirection {
|
|
if s == nil {
|
|
return nil
|
|
}
|
|
return s.ActiveDirection
|
|
}
|
|
|
|
func (s *Sort) GetDefaultDirection() *DefaultDirection {
|
|
if s == nil {
|
|
return nil
|
|
}
|
|
return s.DefaultDirection
|
|
}
|
|
|
|
func (s *Sort) GetDescKey() *string {
|
|
if s == nil {
|
|
return nil
|
|
}
|
|
return s.DescKey
|
|
}
|
|
|
|
func (s *Sort) GetFirstCharacterKey() *string {
|
|
if s == nil {
|
|
return nil
|
|
}
|
|
return s.FirstCharacterKey
|
|
}
|
|
|
|
func (s *Sort) GetKey() string {
|
|
if s == nil {
|
|
return ""
|
|
}
|
|
return s.Key
|
|
}
|
|
|
|
func (s *Sort) GetTitle() string {
|
|
if s == nil {
|
|
return ""
|
|
}
|
|
return s.Title
|
|
}
|
|
|
|
type Field struct {
|
|
Key string `json:"key"`
|
|
Title string `json:"title"`
|
|
Type string `json:"type"`
|
|
SubType *string `json:"subType,omitempty"`
|
|
}
|
|
|
|
func (f *Field) GetKey() string {
|
|
if f == nil {
|
|
return ""
|
|
}
|
|
return f.Key
|
|
}
|
|
|
|
func (f *Field) GetTitle() string {
|
|
if f == nil {
|
|
return ""
|
|
}
|
|
return f.Title
|
|
}
|
|
|
|
func (f *Field) GetType() string {
|
|
if f == nil {
|
|
return ""
|
|
}
|
|
return f.Type
|
|
}
|
|
|
|
func (f *Field) GetSubType() *string {
|
|
if f == nil {
|
|
return nil
|
|
}
|
|
return f.SubType
|
|
}
|
|
|
|
type GetRecentlyAddedLibraryType struct {
|
|
Key string `json:"key"`
|
|
Type string `json:"type"`
|
|
Subtype *string `json:"subtype,omitempty"`
|
|
Title string `json:"title"`
|
|
Active bool `json:"active"`
|
|
Filter []GetRecentlyAddedLibraryFilter `json:"Filter,omitempty"`
|
|
Sort []Sort `json:"Sort,omitempty"`
|
|
Field []Field `json:"Field,omitempty"`
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryType) GetKey() string {
|
|
if g == nil {
|
|
return ""
|
|
}
|
|
return g.Key
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryType) GetType() string {
|
|
if g == nil {
|
|
return ""
|
|
}
|
|
return g.Type
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryType) GetSubtype() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Subtype
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryType) GetTitle() string {
|
|
if g == nil {
|
|
return ""
|
|
}
|
|
return g.Title
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryType) GetActive() bool {
|
|
if g == nil {
|
|
return false
|
|
}
|
|
return g.Active
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryType) GetFilter() []GetRecentlyAddedLibraryFilter {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Filter
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryType) GetSort() []Sort {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Sort
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryType) GetField() []Field {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Field
|
|
}
|
|
|
|
type Operator struct {
|
|
Key string `json:"key"`
|
|
Title string `json:"title"`
|
|
}
|
|
|
|
func (o *Operator) GetKey() string {
|
|
if o == nil {
|
|
return ""
|
|
}
|
|
return o.Key
|
|
}
|
|
|
|
func (o *Operator) GetTitle() string {
|
|
if o == nil {
|
|
return ""
|
|
}
|
|
return o.Title
|
|
}
|
|
|
|
type FieldType struct {
|
|
Type string `json:"type"`
|
|
Operator []Operator `json:"Operator"`
|
|
}
|
|
|
|
func (f *FieldType) GetType() string {
|
|
if f == nil {
|
|
return ""
|
|
}
|
|
return f.Type
|
|
}
|
|
|
|
func (f *FieldType) GetOperator() []Operator {
|
|
if f == nil {
|
|
return []Operator{}
|
|
}
|
|
return f.Operator
|
|
}
|
|
|
|
type GetRecentlyAddedLibraryPart struct {
|
|
ID *float64 `json:"id,omitempty"`
|
|
Key *string `json:"key,omitempty"`
|
|
Duration *float64 `json:"duration,omitempty"`
|
|
File *string `json:"file,omitempty"`
|
|
Size *float64 `json:"size,omitempty"`
|
|
Container *string `json:"container,omitempty"`
|
|
Has64bitOffsets *bool `json:"has64bitOffsets,omitempty"`
|
|
HasThumbnail *float64 `json:"hasThumbnail,omitempty"`
|
|
OptimizedForStreaming *bool `json:"optimizedForStreaming,omitempty"`
|
|
VideoProfile *string `json:"videoProfile,omitempty"`
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryPart) GetID() *float64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.ID
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryPart) GetKey() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Key
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryPart) GetDuration() *float64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Duration
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryPart) GetFile() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.File
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryPart) GetSize() *float64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Size
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryPart) GetContainer() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Container
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryPart) GetHas64bitOffsets() *bool {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Has64bitOffsets
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryPart) GetHasThumbnail() *float64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.HasThumbnail
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryPart) GetOptimizedForStreaming() *bool {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.OptimizedForStreaming
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryPart) GetVideoProfile() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.VideoProfile
|
|
}
|
|
|
|
type GetRecentlyAddedLibraryMedia struct {
|
|
ID *float64 `json:"id,omitempty"`
|
|
Duration *float64 `json:"duration,omitempty"`
|
|
Bitrate *float64 `json:"bitrate,omitempty"`
|
|
Width *float64 `json:"width,omitempty"`
|
|
Height *float64 `json:"height,omitempty"`
|
|
AspectRatio *float64 `json:"aspectRatio,omitempty"`
|
|
AudioChannels *float64 `json:"audioChannels,omitempty"`
|
|
AudioCodec *string `json:"audioCodec,omitempty"`
|
|
VideoCodec *string `json:"videoCodec,omitempty"`
|
|
VideoResolution *float64 `json:"videoResolution,omitempty"`
|
|
Container *string `json:"container,omitempty"`
|
|
VideoFrameRate *string `json:"videoFrameRate,omitempty"`
|
|
OptimizedForStreaming *float64 `json:"optimizedForStreaming,omitempty"`
|
|
Has64bitOffsets *bool `json:"has64bitOffsets,omitempty"`
|
|
VideoProfile *string `json:"videoProfile,omitempty"`
|
|
Part []GetRecentlyAddedLibraryPart `json:"Part,omitempty"`
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMedia) GetID() *float64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.ID
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMedia) GetDuration() *float64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Duration
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMedia) GetBitrate() *float64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Bitrate
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMedia) GetWidth() *float64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Width
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMedia) GetHeight() *float64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Height
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMedia) GetAspectRatio() *float64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.AspectRatio
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMedia) GetAudioChannels() *float64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.AudioChannels
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMedia) GetAudioCodec() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.AudioCodec
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMedia) GetVideoCodec() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.VideoCodec
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMedia) GetVideoResolution() *float64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.VideoResolution
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMedia) GetContainer() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Container
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMedia) GetVideoFrameRate() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.VideoFrameRate
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMedia) GetOptimizedForStreaming() *float64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.OptimizedForStreaming
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMedia) GetHas64bitOffsets() *bool {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Has64bitOffsets
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMedia) GetVideoProfile() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.VideoProfile
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMedia) GetPart() []GetRecentlyAddedLibraryPart {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Part
|
|
}
|
|
|
|
type GetRecentlyAddedLibraryGenre struct {
|
|
Tag *string `json:"tag,omitempty"`
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryGenre) GetTag() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Tag
|
|
}
|
|
|
|
type GetRecentlyAddedLibraryDirector struct {
|
|
Tag *string `json:"tag,omitempty"`
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryDirector) GetTag() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Tag
|
|
}
|
|
|
|
type GetRecentlyAddedLibraryWriter struct {
|
|
Tag *string `json:"tag,omitempty"`
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryWriter) GetTag() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Tag
|
|
}
|
|
|
|
type GetRecentlyAddedLibraryCountry struct {
|
|
Tag *string `json:"tag,omitempty"`
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryCountry) GetTag() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Tag
|
|
}
|
|
|
|
type GetRecentlyAddedLibraryRole struct {
|
|
Tag *string `json:"tag,omitempty"`
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryRole) GetTag() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Tag
|
|
}
|
|
|
|
type GetRecentlyAddedLibraryMetadata struct {
|
|
AllowSync *bool `json:"allowSync,omitempty"`
|
|
LibrarySectionID *float64 `json:"librarySectionID,omitempty"`
|
|
LibrarySectionTitle *string `json:"librarySectionTitle,omitempty"`
|
|
LibrarySectionUUID *string `json:"librarySectionUUID,omitempty"`
|
|
RatingKey *float64 `json:"ratingKey,omitempty"`
|
|
Key *string `json:"key,omitempty"`
|
|
GUID *string `json:"guid,omitempty"`
|
|
Studio *string `json:"studio,omitempty"`
|
|
Type *string `json:"type,omitempty"`
|
|
Title *string `json:"title,omitempty"`
|
|
ContentRating *string `json:"contentRating,omitempty"`
|
|
Summary *string `json:"summary,omitempty"`
|
|
Rating *float64 `json:"rating,omitempty"`
|
|
AudienceRating *float64 `json:"audienceRating,omitempty"`
|
|
Year *float64 `json:"year,omitempty"`
|
|
Tagline *string `json:"tagline,omitempty"`
|
|
Thumb *string `json:"thumb,omitempty"`
|
|
Art *string `json:"art,omitempty"`
|
|
Duration *float64 `json:"duration,omitempty"`
|
|
OriginallyAvailableAt *time.Time `json:"originallyAvailableAt,omitempty"`
|
|
AddedAt *float64 `json:"addedAt,omitempty"`
|
|
UpdatedAt *float64 `json:"updatedAt,omitempty"`
|
|
AudienceRatingImage *string `json:"audienceRatingImage,omitempty"`
|
|
ChapterSource *string `json:"chapterSource,omitempty"`
|
|
PrimaryExtraKey *string `json:"primaryExtraKey,omitempty"`
|
|
RatingImage *string `json:"ratingImage,omitempty"`
|
|
Media []GetRecentlyAddedLibraryMedia `json:"Media,omitempty"`
|
|
Genre []GetRecentlyAddedLibraryGenre `json:"Genre,omitempty"`
|
|
Director []GetRecentlyAddedLibraryDirector `json:"Director,omitempty"`
|
|
Writer []GetRecentlyAddedLibraryWriter `json:"Writer,omitempty"`
|
|
Country []GetRecentlyAddedLibraryCountry `json:"Country,omitempty"`
|
|
Role []GetRecentlyAddedLibraryRole `json:"Role,omitempty"`
|
|
}
|
|
|
|
func (g GetRecentlyAddedLibraryMetadata) MarshalJSON() ([]byte, error) {
|
|
return utils.MarshalJSON(g, "", false)
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMetadata) UnmarshalJSON(data []byte) error {
|
|
if err := utils.UnmarshalJSON(data, &g, "", false, nil); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMetadata) GetAllowSync() *bool {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.AllowSync
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMetadata) GetLibrarySectionID() *float64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.LibrarySectionID
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMetadata) GetLibrarySectionTitle() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.LibrarySectionTitle
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMetadata) GetLibrarySectionUUID() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.LibrarySectionUUID
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMetadata) GetRatingKey() *float64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.RatingKey
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMetadata) GetKey() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Key
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMetadata) GetGUID() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.GUID
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMetadata) GetStudio() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Studio
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMetadata) GetType() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Type
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMetadata) GetTitle() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Title
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMetadata) GetContentRating() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.ContentRating
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMetadata) GetSummary() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Summary
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMetadata) GetRating() *float64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Rating
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMetadata) GetAudienceRating() *float64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.AudienceRating
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMetadata) GetYear() *float64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Year
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMetadata) GetTagline() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Tagline
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMetadata) GetThumb() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Thumb
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMetadata) GetArt() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Art
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMetadata) GetDuration() *float64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Duration
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMetadata) GetOriginallyAvailableAt() *time.Time {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.OriginallyAvailableAt
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMetadata) GetAddedAt() *float64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.AddedAt
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMetadata) GetUpdatedAt() *float64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.UpdatedAt
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMetadata) GetAudienceRatingImage() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.AudienceRatingImage
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMetadata) GetChapterSource() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.ChapterSource
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMetadata) GetPrimaryExtraKey() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.PrimaryExtraKey
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMetadata) GetRatingImage() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.RatingImage
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMetadata) GetMedia() []GetRecentlyAddedLibraryMedia {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Media
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMetadata) GetGenre() []GetRecentlyAddedLibraryGenre {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Genre
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMetadata) GetDirector() []GetRecentlyAddedLibraryDirector {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Director
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMetadata) GetWriter() []GetRecentlyAddedLibraryWriter {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Writer
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMetadata) GetCountry() []GetRecentlyAddedLibraryCountry {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Country
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMetadata) GetRole() []GetRecentlyAddedLibraryRole {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Role
|
|
}
|
|
|
|
// GetRecentlyAddedLibraryMediaContainer - The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
|
|
type GetRecentlyAddedLibraryMediaContainer struct {
|
|
Type []GetRecentlyAddedLibraryType `json:"Type,omitempty"`
|
|
FieldType []FieldType `json:"FieldType,omitempty"`
|
|
Size *float64 `json:"size,omitempty"`
|
|
AllowSync *bool `json:"allowSync,omitempty"`
|
|
Identifier *string `json:"identifier,omitempty"`
|
|
MediaTagPrefix *string `json:"mediaTagPrefix,omitempty"`
|
|
MediaTagVersion *float64 `json:"mediaTagVersion,omitempty"`
|
|
MixedParents *bool `json:"mixedParents,omitempty"`
|
|
Metadata []GetRecentlyAddedLibraryMetadata `json:"Metadata,omitempty"`
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMediaContainer) GetType() []GetRecentlyAddedLibraryType {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Type
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMediaContainer) GetFieldType() []FieldType {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.FieldType
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMediaContainer) GetSize() *float64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Size
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMediaContainer) GetAllowSync() *bool {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.AllowSync
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMediaContainer) GetIdentifier() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Identifier
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMediaContainer) GetMediaTagPrefix() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.MediaTagPrefix
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMediaContainer) GetMediaTagVersion() *float64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.MediaTagVersion
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMediaContainer) GetMixedParents() *bool {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.MixedParents
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryMediaContainer) GetMetadata() []GetRecentlyAddedLibraryMetadata {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Metadata
|
|
}
|
|
|
|
// GetRecentlyAddedLibraryResponseBody - The recently added content
|
|
type GetRecentlyAddedLibraryResponseBody struct {
|
|
MediaContainer *GetRecentlyAddedLibraryMediaContainer `json:"MediaContainer,omitempty"`
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryResponseBody) GetMediaContainer() *GetRecentlyAddedLibraryMediaContainer {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.MediaContainer
|
|
}
|
|
|
|
type GetRecentlyAddedLibraryResponse 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 recently added content
|
|
Object *GetRecentlyAddedLibraryResponseBody
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryResponse) GetContentType() string {
|
|
if g == nil {
|
|
return ""
|
|
}
|
|
return g.ContentType
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryResponse) GetStatusCode() int {
|
|
if g == nil {
|
|
return 0
|
|
}
|
|
return g.StatusCode
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryResponse) GetRawResponse() *http.Response {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.RawResponse
|
|
}
|
|
|
|
func (g *GetRecentlyAddedLibraryResponse) GetObject() *GetRecentlyAddedLibraryResponseBody {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Object
|
|
}
|