Files
plexgo/models/operations/getrecentlyadded.go

2756 lines
61 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

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

// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"encoding/json"
"errors"
"fmt"
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/types"
"net/http"
)
// Type - 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 Type int64
const (
TypeMovie Type = 1
TypeTvShow Type = 2
TypeSeason Type = 3
TypeEpisode Type = 4
TypeArtist Type = 5
TypeAlbum Type = 6
TypeTrack Type = 7
TypePhotoAlbum Type = 8
TypePhoto Type = 9
)
func (e Type) ToPointer() *Type {
return &e
}
// IncludeMeta - Adds the Meta object to the response
type IncludeMeta int
const (
IncludeMetaDisable IncludeMeta = 0
IncludeMetaEnable IncludeMeta = 1
)
func (e IncludeMeta) ToPointer() *IncludeMeta {
return &e
}
func (e *IncludeMeta) 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 = IncludeMeta(v)
return nil
default:
return fmt.Errorf("invalid value for IncludeMeta: %v", v)
}
}
type GetRecentlyAddedRequest struct {
// The content directory ID.
ContentDirectoryID int64 `queryParam:"style=form,explode=true,name=contentDirectoryID"`
// Comma-separated list of pinned content directory IDs.
PinnedContentDirectoryID *string `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 Type `queryParam:"style=form,explode=true,name=type"`
// Adds the Meta object to the response
//
IncludeMeta *IncludeMeta `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 GetRecentlyAddedRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(g, "", false)
}
func (g *GetRecentlyAddedRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &g, "", false, []string{"contentDirectoryID", "type"}); err != nil {
return err
}
return nil
}
func (o *GetRecentlyAddedRequest) GetContentDirectoryID() int64 {
if o == nil {
return 0
}
return o.ContentDirectoryID
}
func (o *GetRecentlyAddedRequest) GetPinnedContentDirectoryID() *string {
if o == nil {
return nil
}
return o.PinnedContentDirectoryID
}
func (o *GetRecentlyAddedRequest) GetSectionID() *int64 {
if o == nil {
return nil
}
return o.SectionID
}
func (o *GetRecentlyAddedRequest) GetType() Type {
if o == nil {
return Type(0)
}
return o.Type
}
func (o *GetRecentlyAddedRequest) GetIncludeMeta() *IncludeMeta {
if o == nil {
return nil
}
return o.IncludeMeta
}
func (o *GetRecentlyAddedRequest) GetXPlexContainerStart() *int {
if o == nil {
return nil
}
return o.XPlexContainerStart
}
func (o *GetRecentlyAddedRequest) GetXPlexContainerSize() *int {
if o == nil {
return nil
}
return o.XPlexContainerSize
}
type GetRecentlyAddedFilter 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 (o *GetRecentlyAddedFilter) GetFilter() string {
if o == nil {
return ""
}
return o.Filter
}
func (o *GetRecentlyAddedFilter) GetFilterType() string {
if o == nil {
return ""
}
return o.FilterType
}
func (o *GetRecentlyAddedFilter) GetKey() string {
if o == nil {
return ""
}
return o.Key
}
func (o *GetRecentlyAddedFilter) GetTitle() string {
if o == nil {
return ""
}
return o.Title
}
func (o *GetRecentlyAddedFilter) GetType() string {
if o == nil {
return ""
}
return o.Type
}
func (o *GetRecentlyAddedFilter) GetAdvanced() *bool {
if o == nil {
return nil
}
return o.Advanced
}
// GetRecentlyAddedActiveDirection - The direction of the sort. Can be either `asc` or `desc`.
type GetRecentlyAddedActiveDirection string
const (
GetRecentlyAddedActiveDirectionAscending GetRecentlyAddedActiveDirection = "asc"
GetRecentlyAddedActiveDirectionDescending GetRecentlyAddedActiveDirection = "desc"
)
func (e GetRecentlyAddedActiveDirection) ToPointer() *GetRecentlyAddedActiveDirection {
return &e
}
func (e *GetRecentlyAddedActiveDirection) 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 = GetRecentlyAddedActiveDirection(v)
return nil
default:
return fmt.Errorf("invalid value for GetRecentlyAddedActiveDirection: %v", v)
}
}
// GetRecentlyAddedDefaultDirection - The direction of the sort. Can be either `asc` or `desc`.
type GetRecentlyAddedDefaultDirection string
const (
GetRecentlyAddedDefaultDirectionAscending GetRecentlyAddedDefaultDirection = "asc"
GetRecentlyAddedDefaultDirectionDescending GetRecentlyAddedDefaultDirection = "desc"
)
func (e GetRecentlyAddedDefaultDirection) ToPointer() *GetRecentlyAddedDefaultDirection {
return &e
}
func (e *GetRecentlyAddedDefaultDirection) 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 = GetRecentlyAddedDefaultDirection(v)
return nil
default:
return fmt.Errorf("invalid value for GetRecentlyAddedDefaultDirection: %v", v)
}
}
type GetRecentlyAddedSort struct {
Default *string `json:"default,omitempty"`
Active *bool `json:"active,omitempty"`
// The direction of the sort. Can be either `asc` or `desc`.
//
ActiveDirection *GetRecentlyAddedActiveDirection `default:"asc" json:"activeDirection"`
// The direction of the sort. Can be either `asc` or `desc`.
//
DefaultDirection *GetRecentlyAddedDefaultDirection `default:"asc" json:"defaultDirection"`
DescKey *string `json:"descKey,omitempty"`
FirstCharacterKey *string `json:"firstCharacterKey,omitempty"`
Key string `json:"key"`
Title string `json:"title"`
}
func (g GetRecentlyAddedSort) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(g, "", false)
}
func (g *GetRecentlyAddedSort) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &g, "", false, []string{"key", "title"}); err != nil {
return err
}
return nil
}
func (o *GetRecentlyAddedSort) GetDefault() *string {
if o == nil {
return nil
}
return o.Default
}
func (o *GetRecentlyAddedSort) GetActive() *bool {
if o == nil {
return nil
}
return o.Active
}
func (o *GetRecentlyAddedSort) GetActiveDirection() *GetRecentlyAddedActiveDirection {
if o == nil {
return nil
}
return o.ActiveDirection
}
func (o *GetRecentlyAddedSort) GetDefaultDirection() *GetRecentlyAddedDefaultDirection {
if o == nil {
return nil
}
return o.DefaultDirection
}
func (o *GetRecentlyAddedSort) GetDescKey() *string {
if o == nil {
return nil
}
return o.DescKey
}
func (o *GetRecentlyAddedSort) GetFirstCharacterKey() *string {
if o == nil {
return nil
}
return o.FirstCharacterKey
}
func (o *GetRecentlyAddedSort) GetKey() string {
if o == nil {
return ""
}
return o.Key
}
func (o *GetRecentlyAddedSort) GetTitle() string {
if o == nil {
return ""
}
return o.Title
}
type GetRecentlyAddedField struct {
Key string `json:"key"`
Title string `json:"title"`
Type string `json:"type"`
SubType *string `json:"subType,omitempty"`
}
func (o *GetRecentlyAddedField) GetKey() string {
if o == nil {
return ""
}
return o.Key
}
func (o *GetRecentlyAddedField) GetTitle() string {
if o == nil {
return ""
}
return o.Title
}
func (o *GetRecentlyAddedField) GetType() string {
if o == nil {
return ""
}
return o.Type
}
func (o *GetRecentlyAddedField) GetSubType() *string {
if o == nil {
return nil
}
return o.SubType
}
type GetRecentlyAddedType struct {
Key string `json:"key"`
Type string `json:"type"`
Subtype *string `json:"subtype,omitempty"`
Title string `json:"title"`
Active bool `json:"active"`
Filter []GetRecentlyAddedFilter `json:"Filter,omitempty"`
Sort []GetRecentlyAddedSort `json:"Sort,omitempty"`
Field []GetRecentlyAddedField `json:"Field,omitempty"`
}
func (o *GetRecentlyAddedType) GetKey() string {
if o == nil {
return ""
}
return o.Key
}
func (o *GetRecentlyAddedType) GetType() string {
if o == nil {
return ""
}
return o.Type
}
func (o *GetRecentlyAddedType) GetSubtype() *string {
if o == nil {
return nil
}
return o.Subtype
}
func (o *GetRecentlyAddedType) GetTitle() string {
if o == nil {
return ""
}
return o.Title
}
func (o *GetRecentlyAddedType) GetActive() bool {
if o == nil {
return false
}
return o.Active
}
func (o *GetRecentlyAddedType) GetFilter() []GetRecentlyAddedFilter {
if o == nil {
return nil
}
return o.Filter
}
func (o *GetRecentlyAddedType) GetSort() []GetRecentlyAddedSort {
if o == nil {
return nil
}
return o.Sort
}
func (o *GetRecentlyAddedType) GetField() []GetRecentlyAddedField {
if o == nil {
return nil
}
return o.Field
}
type GetRecentlyAddedOperator struct {
Key string `json:"key"`
Title string `json:"title"`
}
func (o *GetRecentlyAddedOperator) GetKey() string {
if o == nil {
return ""
}
return o.Key
}
func (o *GetRecentlyAddedOperator) GetTitle() string {
if o == nil {
return ""
}
return o.Title
}
type GetRecentlyAddedFieldType struct {
Type string `json:"type"`
Operator []GetRecentlyAddedOperator `json:"Operator"`
}
func (o *GetRecentlyAddedFieldType) GetType() string {
if o == nil {
return ""
}
return o.Type
}
func (o *GetRecentlyAddedFieldType) GetOperator() []GetRecentlyAddedOperator {
if o == nil {
return []GetRecentlyAddedOperator{}
}
return o.Operator
}
// The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
type Meta struct {
Type []GetRecentlyAddedType `json:"Type,omitempty"`
FieldType []GetRecentlyAddedFieldType `json:"FieldType,omitempty"`
}
func (o *Meta) GetType() []GetRecentlyAddedType {
if o == nil {
return nil
}
return o.Type
}
func (o *Meta) GetFieldType() []GetRecentlyAddedFieldType {
if o == nil {
return nil
}
return o.FieldType
}
// GetRecentlyAddedHubsType - The type of media content in the Plex library. This can represent videos, music, or photos.
type GetRecentlyAddedHubsType string
const (
GetRecentlyAddedHubsTypeMovie GetRecentlyAddedHubsType = "movie"
GetRecentlyAddedHubsTypeTvShow GetRecentlyAddedHubsType = "show"
GetRecentlyAddedHubsTypeSeason GetRecentlyAddedHubsType = "season"
GetRecentlyAddedHubsTypeEpisode GetRecentlyAddedHubsType = "episode"
GetRecentlyAddedHubsTypeArtist GetRecentlyAddedHubsType = "artist"
GetRecentlyAddedHubsTypeAlbum GetRecentlyAddedHubsType = "album"
GetRecentlyAddedHubsTypeTrack GetRecentlyAddedHubsType = "track"
GetRecentlyAddedHubsTypePhotoAlbum GetRecentlyAddedHubsType = "photoalbum"
GetRecentlyAddedHubsTypePhoto GetRecentlyAddedHubsType = "photo"
GetRecentlyAddedHubsTypeCollection GetRecentlyAddedHubsType = "collection"
)
func (e GetRecentlyAddedHubsType) ToPointer() *GetRecentlyAddedHubsType {
return &e
}
type GetRecentlyAddedHubsResponseType string
const (
GetRecentlyAddedHubsResponseTypeCoverPoster GetRecentlyAddedHubsResponseType = "coverPoster"
GetRecentlyAddedHubsResponseTypeBackground GetRecentlyAddedHubsResponseType = "background"
GetRecentlyAddedHubsResponseTypeSnapshot GetRecentlyAddedHubsResponseType = "snapshot"
GetRecentlyAddedHubsResponseTypeClearLogo GetRecentlyAddedHubsResponseType = "clearLogo"
)
func (e GetRecentlyAddedHubsResponseType) ToPointer() *GetRecentlyAddedHubsResponseType {
return &e
}
type GetRecentlyAddedImage struct {
Alt string `json:"alt"`
Type GetRecentlyAddedHubsResponseType `json:"type"`
URL string `json:"url"`
}
func (o *GetRecentlyAddedImage) GetAlt() string {
if o == nil {
return ""
}
return o.Alt
}
func (o *GetRecentlyAddedImage) GetType() GetRecentlyAddedHubsResponseType {
if o == nil {
return GetRecentlyAddedHubsResponseType("")
}
return o.Type
}
func (o *GetRecentlyAddedImage) GetURL() string {
if o == nil {
return ""
}
return o.URL
}
type UltraBlurColors struct {
TopLeft string `json:"topLeft"`
TopRight string `json:"topRight"`
BottomRight string `json:"bottomRight"`
BottomLeft string `json:"bottomLeft"`
}
func (o *UltraBlurColors) GetTopLeft() string {
if o == nil {
return ""
}
return o.TopLeft
}
func (o *UltraBlurColors) GetTopRight() string {
if o == nil {
return ""
}
return o.TopRight
}
func (o *UltraBlurColors) GetBottomRight() string {
if o == nil {
return ""
}
return o.BottomRight
}
func (o *UltraBlurColors) GetBottomLeft() string {
if o == nil {
return ""
}
return o.BottomLeft
}
type Guids struct {
// The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb://
//
ID string `json:"id"`
}
func (o *Guids) GetID() string {
if o == nil {
return ""
}
return o.ID
}
type One int
const (
OneZero One = 0
OneOne One = 1
)
func (e One) ToPointer() *One {
return &e
}
func (e *One) 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 = One(v)
return nil
default:
return fmt.Errorf("invalid value for One: %v", v)
}
}
type OptimizedForStreamingType string
const (
OptimizedForStreamingTypeOne OptimizedForStreamingType = "1"
OptimizedForStreamingTypeBoolean OptimizedForStreamingType = "boolean"
)
// OptimizedForStreaming - Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
type OptimizedForStreaming struct {
One *One `queryParam:"inline" name:"optimizedForStreaming"`
Boolean *bool `queryParam:"inline" name:"optimizedForStreaming"`
Type OptimizedForStreamingType
}
func CreateOptimizedForStreamingOne(one One) OptimizedForStreaming {
typ := OptimizedForStreamingTypeOne
return OptimizedForStreaming{
One: &one,
Type: typ,
}
}
func CreateOptimizedForStreamingBoolean(boolean bool) OptimizedForStreaming {
typ := OptimizedForStreamingTypeBoolean
return OptimizedForStreaming{
Boolean: &boolean,
Type: typ,
}
}
func (u *OptimizedForStreaming) UnmarshalJSON(data []byte) error {
var one One = One(0)
if err := utils.UnmarshalJSON(data, &one, "", true, nil); err == nil {
u.One = &one
u.Type = OptimizedForStreamingTypeOne
return nil
}
var boolean bool = false
if err := utils.UnmarshalJSON(data, &boolean, "", true, nil); err == nil {
u.Boolean = &boolean
u.Type = OptimizedForStreamingTypeBoolean
return nil
}
return fmt.Errorf("could not unmarshal `%s` into any supported union types for OptimizedForStreaming", string(data))
}
func (u OptimizedForStreaming) MarshalJSON() ([]byte, error) {
if u.One != nil {
return utils.MarshalJSON(u.One, "", true)
}
if u.Boolean != nil {
return utils.MarshalJSON(u.Boolean, "", true)
}
return nil, errors.New("could not marshal union type OptimizedForStreaming: all fields are null")
}
type GetRecentlyAddedOptimizedForStreaming1 int
const (
GetRecentlyAddedOptimizedForStreaming1Zero GetRecentlyAddedOptimizedForStreaming1 = 0
GetRecentlyAddedOptimizedForStreaming1One GetRecentlyAddedOptimizedForStreaming1 = 1
)
func (e GetRecentlyAddedOptimizedForStreaming1) ToPointer() *GetRecentlyAddedOptimizedForStreaming1 {
return &e
}
func (e *GetRecentlyAddedOptimizedForStreaming1) 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 = GetRecentlyAddedOptimizedForStreaming1(v)
return nil
default:
return fmt.Errorf("invalid value for GetRecentlyAddedOptimizedForStreaming1: %v", v)
}
}
type GetRecentlyAddedOptimizedForStreamingType string
const (
GetRecentlyAddedOptimizedForStreamingTypeGetRecentlyAddedOptimizedForStreaming1 GetRecentlyAddedOptimizedForStreamingType = "get-recently-added_optimizedForStreaming_1"
GetRecentlyAddedOptimizedForStreamingTypeBoolean GetRecentlyAddedOptimizedForStreamingType = "boolean"
)
// GetRecentlyAddedOptimizedForStreaming - Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
type GetRecentlyAddedOptimizedForStreaming struct {
GetRecentlyAddedOptimizedForStreaming1 *GetRecentlyAddedOptimizedForStreaming1 `queryParam:"inline" name:"optimizedForStreaming"`
Boolean *bool `queryParam:"inline" name:"optimizedForStreaming"`
Type GetRecentlyAddedOptimizedForStreamingType
}
func CreateGetRecentlyAddedOptimizedForStreamingGetRecentlyAddedOptimizedForStreaming1(getRecentlyAddedOptimizedForStreaming1 GetRecentlyAddedOptimizedForStreaming1) GetRecentlyAddedOptimizedForStreaming {
typ := GetRecentlyAddedOptimizedForStreamingTypeGetRecentlyAddedOptimizedForStreaming1
return GetRecentlyAddedOptimizedForStreaming{
GetRecentlyAddedOptimizedForStreaming1: &getRecentlyAddedOptimizedForStreaming1,
Type: typ,
}
}
func CreateGetRecentlyAddedOptimizedForStreamingBoolean(boolean bool) GetRecentlyAddedOptimizedForStreaming {
typ := GetRecentlyAddedOptimizedForStreamingTypeBoolean
return GetRecentlyAddedOptimizedForStreaming{
Boolean: &boolean,
Type: typ,
}
}
func (u *GetRecentlyAddedOptimizedForStreaming) UnmarshalJSON(data []byte) error {
var getRecentlyAddedOptimizedForStreaming1 GetRecentlyAddedOptimizedForStreaming1 = GetRecentlyAddedOptimizedForStreaming1(0)
if err := utils.UnmarshalJSON(data, &getRecentlyAddedOptimizedForStreaming1, "", true, nil); err == nil {
u.GetRecentlyAddedOptimizedForStreaming1 = &getRecentlyAddedOptimizedForStreaming1
u.Type = GetRecentlyAddedOptimizedForStreamingTypeGetRecentlyAddedOptimizedForStreaming1
return nil
}
var boolean bool = false
if err := utils.UnmarshalJSON(data, &boolean, "", true, nil); err == nil {
u.Boolean = &boolean
u.Type = GetRecentlyAddedOptimizedForStreamingTypeBoolean
return nil
}
return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetRecentlyAddedOptimizedForStreaming", string(data))
}
func (u GetRecentlyAddedOptimizedForStreaming) MarshalJSON() ([]byte, error) {
if u.GetRecentlyAddedOptimizedForStreaming1 != nil {
return utils.MarshalJSON(u.GetRecentlyAddedOptimizedForStreaming1, "", true)
}
if u.Boolean != nil {
return utils.MarshalJSON(u.Boolean, "", true)
}
return nil, errors.New("could not marshal union type GetRecentlyAddedOptimizedForStreaming: all fields are null")
}
// HasThumbnail - Indicates if the part has a thumbnail.
type HasThumbnail string
const (
HasThumbnailFalse HasThumbnail = "0"
HasThumbnailTrue HasThumbnail = "1"
)
func (e HasThumbnail) ToPointer() *HasThumbnail {
return &e
}
func (e *HasThumbnail) 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 = HasThumbnail(v)
return nil
default:
return fmt.Errorf("invalid value for HasThumbnail: %v", v)
}
}
type Stream struct {
// Unique stream identifier.
ID int64 `json:"id"`
// Stream type:
// - VIDEO = 1
// - AUDIO = 2
// - SUBTITLE = 3
//
streamType int64 `const:"1" json:"streamType"`
// Format of the stream (e.g., srt).
Format *string `json:"format,omitempty"`
// Indicates if this stream is default.
Default *bool `json:"default,omitempty"`
// Codec used by the stream.
Codec string `json:"codec"`
// Index of the stream.
Index *int `json:"index,omitempty"`
// Bitrate of the stream.
Bitrate *int `json:"bitrate,omitempty"`
// Language of the stream.
Language *string `json:"language,omitempty"`
// Language tag (e.g., en).
LanguageTag *string `json:"languageTag,omitempty"`
// ISO language code.
LanguageCode *string `json:"languageCode,omitempty"`
// Indicates whether header compression is enabled.
HeaderCompression *bool `json:"headerCompression,omitempty"`
// Dolby Vision BL compatibility ID.
DOVIBLCompatID *int `json:"DOVIBLCompatID,omitempty"`
// Indicates if Dolby Vision BL is present.
DOVIBLPresent *bool `json:"DOVIBLPresent,omitempty"`
// Indicates if Dolby Vision EL is present.
DOVIELPresent *bool `json:"DOVIELPresent,omitempty"`
// Dolby Vision level.
DOVILevel *int `json:"DOVILevel,omitempty"`
// Indicates if Dolby Vision is present.
DOVIPresent *bool `json:"DOVIPresent,omitempty"`
// Dolby Vision profile.
DOVIProfile *int `json:"DOVIProfile,omitempty"`
// Indicates if Dolby Vision RPU is present.
DOVIRPUPresent *bool `json:"DOVIRPUPresent,omitempty"`
// Dolby Vision version.
DOVIVersion *string `json:"DOVIVersion,omitempty"`
// Bit depth of the video stream.
BitDepth *int `json:"bitDepth,omitempty"`
// Chroma sample location.
ChromaLocation *string `json:"chromaLocation,omitempty"`
// Chroma subsampling format.
ChromaSubsampling *string `json:"chromaSubsampling,omitempty"`
// Coded video height.
CodedHeight *int `json:"codedHeight,omitempty"`
// Coded video width.
CodedWidth *int `json:"codedWidth,omitempty"`
ClosedCaptions *bool `json:"closedCaptions,omitempty"`
// Color primaries used.
ColorPrimaries *string `json:"colorPrimaries,omitempty"`
// Color range (e.g., tv).
ColorRange *string `json:"colorRange,omitempty"`
// Color space.
ColorSpace *string `json:"colorSpace,omitempty"`
// Color transfer characteristics.
ColorTrc *string `json:"colorTrc,omitempty"`
// Frame rate of the stream.
FrameRate *float32 `json:"frameRate,omitempty"`
// Key to access this stream part.
Key *string `json:"key,omitempty"`
// Height of the video stream.
Height *int `json:"height,omitempty"`
// Video level.
Level *int `json:"level,omitempty"`
// Indicates if this is the original stream.
Original *bool `json:"original,omitempty"`
HasScalingMatrix *bool `json:"hasScalingMatrix,omitempty"`
// Video profile.
Profile *string `json:"profile,omitempty"`
ScanType *string `json:"scanType,omitempty"`
EmbeddedInVideo *string `json:"embeddedInVideo,omitempty"`
// Number of reference frames.
RefFrames *int `json:"refFrames,omitempty"`
// Width of the video stream.
Width *int `json:"width,omitempty"`
// Display title for the stream.
DisplayTitle string `json:"displayTitle"`
// Extended display title for the stream.
ExtendedDisplayTitle string `json:"extendedDisplayTitle"`
// Indicates if this stream is selected (applicable for audio streams).
Selected *bool `json:"selected,omitempty"`
Forced *bool `json:"forced,omitempty"`
// Number of audio channels (for audio streams).
Channels *int `json:"channels,omitempty"`
// Audio channel layout.
AudioChannelLayout *string `json:"audioChannelLayout,omitempty"`
// Sampling rate for the audio stream.
SamplingRate *int `json:"samplingRate,omitempty"`
// Indicates if the stream can auto-sync.
CanAutoSync *bool `json:"canAutoSync,omitempty"`
// Indicates if the stream is for the hearing impaired.
HearingImpaired *bool `json:"hearingImpaired,omitempty"`
// Indicates if the stream is a dub.
Dub *bool `json:"dub,omitempty"`
// Optional title for the stream (e.g., language variant).
Title *string `json:"title,omitempty"`
}
func (s Stream) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(s, "", false)
}
func (s *Stream) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &s, "", false, []string{"id", "streamType", "codec", "displayTitle", "extendedDisplayTitle"}); err != nil {
return err
}
return nil
}
func (o *Stream) GetID() int64 {
if o == nil {
return 0
}
return o.ID
}
func (o *Stream) GetStreamType() int64 {
return 1
}
func (o *Stream) GetFormat() *string {
if o == nil {
return nil
}
return o.Format
}
func (o *Stream) GetDefault() *bool {
if o == nil {
return nil
}
return o.Default
}
func (o *Stream) GetCodec() string {
if o == nil {
return ""
}
return o.Codec
}
func (o *Stream) GetIndex() *int {
if o == nil {
return nil
}
return o.Index
}
func (o *Stream) GetBitrate() *int {
if o == nil {
return nil
}
return o.Bitrate
}
func (o *Stream) GetLanguage() *string {
if o == nil {
return nil
}
return o.Language
}
func (o *Stream) GetLanguageTag() *string {
if o == nil {
return nil
}
return o.LanguageTag
}
func (o *Stream) GetLanguageCode() *string {
if o == nil {
return nil
}
return o.LanguageCode
}
func (o *Stream) GetHeaderCompression() *bool {
if o == nil {
return nil
}
return o.HeaderCompression
}
func (o *Stream) GetDOVIBLCompatID() *int {
if o == nil {
return nil
}
return o.DOVIBLCompatID
}
func (o *Stream) GetDOVIBLPresent() *bool {
if o == nil {
return nil
}
return o.DOVIBLPresent
}
func (o *Stream) GetDOVIELPresent() *bool {
if o == nil {
return nil
}
return o.DOVIELPresent
}
func (o *Stream) GetDOVILevel() *int {
if o == nil {
return nil
}
return o.DOVILevel
}
func (o *Stream) GetDOVIPresent() *bool {
if o == nil {
return nil
}
return o.DOVIPresent
}
func (o *Stream) GetDOVIProfile() *int {
if o == nil {
return nil
}
return o.DOVIProfile
}
func (o *Stream) GetDOVIRPUPresent() *bool {
if o == nil {
return nil
}
return o.DOVIRPUPresent
}
func (o *Stream) GetDOVIVersion() *string {
if o == nil {
return nil
}
return o.DOVIVersion
}
func (o *Stream) GetBitDepth() *int {
if o == nil {
return nil
}
return o.BitDepth
}
func (o *Stream) GetChromaLocation() *string {
if o == nil {
return nil
}
return o.ChromaLocation
}
func (o *Stream) GetChromaSubsampling() *string {
if o == nil {
return nil
}
return o.ChromaSubsampling
}
func (o *Stream) GetCodedHeight() *int {
if o == nil {
return nil
}
return o.CodedHeight
}
func (o *Stream) GetCodedWidth() *int {
if o == nil {
return nil
}
return o.CodedWidth
}
func (o *Stream) GetClosedCaptions() *bool {
if o == nil {
return nil
}
return o.ClosedCaptions
}
func (o *Stream) GetColorPrimaries() *string {
if o == nil {
return nil
}
return o.ColorPrimaries
}
func (o *Stream) GetColorRange() *string {
if o == nil {
return nil
}
return o.ColorRange
}
func (o *Stream) GetColorSpace() *string {
if o == nil {
return nil
}
return o.ColorSpace
}
func (o *Stream) GetColorTrc() *string {
if o == nil {
return nil
}
return o.ColorTrc
}
func (o *Stream) GetFrameRate() *float32 {
if o == nil {
return nil
}
return o.FrameRate
}
func (o *Stream) GetKey() *string {
if o == nil {
return nil
}
return o.Key
}
func (o *Stream) GetHeight() *int {
if o == nil {
return nil
}
return o.Height
}
func (o *Stream) GetLevel() *int {
if o == nil {
return nil
}
return o.Level
}
func (o *Stream) GetOriginal() *bool {
if o == nil {
return nil
}
return o.Original
}
func (o *Stream) GetHasScalingMatrix() *bool {
if o == nil {
return nil
}
return o.HasScalingMatrix
}
func (o *Stream) GetProfile() *string {
if o == nil {
return nil
}
return o.Profile
}
func (o *Stream) GetScanType() *string {
if o == nil {
return nil
}
return o.ScanType
}
func (o *Stream) GetEmbeddedInVideo() *string {
if o == nil {
return nil
}
return o.EmbeddedInVideo
}
func (o *Stream) GetRefFrames() *int {
if o == nil {
return nil
}
return o.RefFrames
}
func (o *Stream) GetWidth() *int {
if o == nil {
return nil
}
return o.Width
}
func (o *Stream) GetDisplayTitle() string {
if o == nil {
return ""
}
return o.DisplayTitle
}
func (o *Stream) GetExtendedDisplayTitle() string {
if o == nil {
return ""
}
return o.ExtendedDisplayTitle
}
func (o *Stream) GetSelected() *bool {
if o == nil {
return nil
}
return o.Selected
}
func (o *Stream) GetForced() *bool {
if o == nil {
return nil
}
return o.Forced
}
func (o *Stream) GetChannels() *int {
if o == nil {
return nil
}
return o.Channels
}
func (o *Stream) GetAudioChannelLayout() *string {
if o == nil {
return nil
}
return o.AudioChannelLayout
}
func (o *Stream) GetSamplingRate() *int {
if o == nil {
return nil
}
return o.SamplingRate
}
func (o *Stream) GetCanAutoSync() *bool {
if o == nil {
return nil
}
return o.CanAutoSync
}
func (o *Stream) GetHearingImpaired() *bool {
if o == nil {
return nil
}
return o.HearingImpaired
}
func (o *Stream) GetDub() *bool {
if o == nil {
return nil
}
return o.Dub
}
func (o *Stream) GetTitle() *string {
if o == nil {
return nil
}
return o.Title
}
type Part 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"`
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"`
// File size in bytes.
Size int64 `json:"size"`
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 *GetRecentlyAddedOptimizedForStreaming `json:"optimizedForStreaming,omitempty"`
HasThumbnail *HasThumbnail `default:"0" json:"hasThumbnail"`
// An array of streams for this part.
Stream []Stream `json:"Stream,omitempty"`
}
func (p Part) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(p, "", false)
}
func (p *Part) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &p, "", false, []string{"id", "key", "file", "size"}); err != nil {
return err
}
return nil
}
func (o *Part) GetAccessible() *bool {
if o == nil {
return nil
}
return o.Accessible
}
func (o *Part) GetExists() *bool {
if o == nil {
return nil
}
return o.Exists
}
func (o *Part) GetID() int64 {
if o == nil {
return 0
}
return o.ID
}
func (o *Part) GetKey() string {
if o == nil {
return ""
}
return o.Key
}
func (o *Part) GetIndexes() *string {
if o == nil {
return nil
}
return o.Indexes
}
func (o *Part) GetDuration() *int {
if o == nil {
return nil
}
return o.Duration
}
func (o *Part) GetFile() string {
if o == nil {
return ""
}
return o.File
}
func (o *Part) GetSize() int64 {
if o == nil {
return 0
}
return o.Size
}
func (o *Part) GetPacketLength() *int {
if o == nil {
return nil
}
return o.PacketLength
}
func (o *Part) GetContainer() *string {
if o == nil {
return nil
}
return o.Container
}
func (o *Part) GetVideoProfile() *string {
if o == nil {
return nil
}
return o.VideoProfile
}
func (o *Part) GetAudioProfile() *string {
if o == nil {
return nil
}
return o.AudioProfile
}
func (o *Part) GetHas64bitOffsets() *bool {
if o == nil {
return nil
}
return o.Has64bitOffsets
}
func (o *Part) GetOptimizedForStreaming() *GetRecentlyAddedOptimizedForStreaming {
if o == nil {
return nil
}
return o.OptimizedForStreaming
}
func (o *Part) GetHasThumbnail() *HasThumbnail {
if o == nil {
return nil
}
return o.HasThumbnail
}
func (o *Part) GetStream() []Stream {
if o == nil {
return nil
}
return o.Stream
}
type Media 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"`
// File container type.
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 *OptimizedForStreaming `json:"optimizedForStreaming,omitempty"`
Has64bitOffsets *bool `json:"has64bitOffsets,omitempty"`
// An array of parts for this media item.
Part []Part `json:"Part,omitempty"`
}
func (o *Media) GetID() int64 {
if o == nil {
return 0
}
return o.ID
}
func (o *Media) GetDuration() *int {
if o == nil {
return nil
}
return o.Duration
}
func (o *Media) GetBitrate() *int {
if o == nil {
return nil
}
return o.Bitrate
}
func (o *Media) GetWidth() *int {
if o == nil {
return nil
}
return o.Width
}
func (o *Media) GetHeight() *int {
if o == nil {
return nil
}
return o.Height
}
func (o *Media) GetAspectRatio() *float32 {
if o == nil {
return nil
}
return o.AspectRatio
}
func (o *Media) GetAudioChannels() *int {
if o == nil {
return nil
}
return o.AudioChannels
}
func (o *Media) GetDisplayOffset() *int {
if o == nil {
return nil
}
return o.DisplayOffset
}
func (o *Media) GetAudioCodec() *string {
if o == nil {
return nil
}
return o.AudioCodec
}
func (o *Media) GetVideoCodec() *string {
if o == nil {
return nil
}
return o.VideoCodec
}
func (o *Media) GetVideoResolution() *string {
if o == nil {
return nil
}
return o.VideoResolution
}
func (o *Media) GetContainer() *string {
if o == nil {
return nil
}
return o.Container
}
func (o *Media) GetVideoFrameRate() *string {
if o == nil {
return nil
}
return o.VideoFrameRate
}
func (o *Media) GetVideoProfile() *string {
if o == nil {
return nil
}
return o.VideoProfile
}
func (o *Media) GetHasVoiceActivity() *bool {
if o == nil {
return nil
}
return o.HasVoiceActivity
}
func (o *Media) GetAudioProfile() *string {
if o == nil {
return nil
}
return o.AudioProfile
}
func (o *Media) GetOptimizedForStreaming() *OptimizedForStreaming {
if o == nil {
return nil
}
return o.OptimizedForStreaming
}
func (o *Media) GetHas64bitOffsets() *bool {
if o == nil {
return nil
}
return o.Has64bitOffsets
}
func (o *Media) GetPart() []Part {
if o == nil {
return nil
}
return o.Part
}
// Genre - The filter query string for similar items.
type Genre struct {
// The unique identifier for the genre.
// NOTE: This is different for each Plex server and is not globally unique.
//
ID int `json:"id"`
Filter string `json:"filter"`
// The genre name of this media-item
//
Tag string `json:"tag"`
}
func (o *Genre) GetID() int {
if o == nil {
return 0
}
return o.ID
}
func (o *Genre) GetFilter() string {
if o == nil {
return ""
}
return o.Filter
}
func (o *Genre) GetTag() string {
if o == nil {
return ""
}
return o.Tag
}
// Country - The filter query string for country media items.
type Country 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"`
Filter string `json:"filter"`
}
func (o *Country) GetID() int {
if o == nil {
return 0
}
return o.ID
}
func (o *Country) GetTag() string {
if o == nil {
return ""
}
return o.Tag
}
func (o *Country) GetFilter() string {
if o == nil {
return ""
}
return o.Filter
}
type Director struct {
// Unique identifier for the director.
ID int `json:"id"`
// The filter string used to query this director.
Filter string `json:"filter"`
// The role of Director
Tag string `json:"tag"`
// A unique 24-character hexadecimal key associated with the director's tag, used for internal identification.
TagKey string `json:"tagKey"`
// The absolute URL of the thumbnail image for the director.
Thumb *string `json:"thumb,omitempty"`
}
func (o *Director) GetID() int {
if o == nil {
return 0
}
return o.ID
}
func (o *Director) GetFilter() string {
if o == nil {
return ""
}
return o.Filter
}
func (o *Director) GetTag() string {
if o == nil {
return ""
}
return o.Tag
}
func (o *Director) GetTagKey() string {
if o == nil {
return ""
}
return o.TagKey
}
func (o *Director) GetThumb() *string {
if o == nil {
return nil
}
return o.Thumb
}
type Writer struct {
// Unique identifier for the writer.
ID int `json:"id"`
// The filter string used to query this writer.
Filter string `json:"filter"`
// The role of Writer
Tag string `json:"tag"`
// A 24-character hexadecimal unique key associated with the writers tag, used for internal identification.
TagKey *string `json:"tagKey,omitempty"`
// The absolute URL of the thumbnail image for the writer.
Thumb *string `json:"thumb,omitempty"`
}
func (o *Writer) GetID() int {
if o == nil {
return 0
}
return o.ID
}
func (o *Writer) GetFilter() string {
if o == nil {
return ""
}
return o.Filter
}
func (o *Writer) GetTag() string {
if o == nil {
return ""
}
return o.Tag
}
func (o *Writer) GetTagKey() *string {
if o == nil {
return nil
}
return o.TagKey
}
func (o *Writer) GetThumb() *string {
if o == nil {
return nil
}
return o.Thumb
}
type Role 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 filter string used to query this actor. For example, it may indicate that this is an actor with a given key.
Filter string `json:"filter"`
// The display tag for the actor (typically the actor's name).
Tag string `json:"tag"`
// A 24-character hexadecimal unique key associated with the actor's tag, used for internal identification.
// NOTE: This is globally unique across all Plex Servers.
//
TagKey string `json:"tagKey"`
// 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 *Role) GetID() int {
if o == nil {
return 0
}
return o.ID
}
func (o *Role) GetFilter() string {
if o == nil {
return ""
}
return o.Filter
}
func (o *Role) GetTag() string {
if o == nil {
return ""
}
return o.Tag
}
func (o *Role) GetTagKey() string {
if o == nil {
return ""
}
return o.TagKey
}
func (o *Role) GetRole() *string {
if o == nil {
return nil
}
return o.Role
}
func (o *Role) GetThumb() *string {
if o == nil {
return nil
}
return o.Thumb
}
type Producer struct {
// Unique identifier for the producer.
ID int `json:"id"`
// The filter string used to query this producer.
Filter string `json:"filter"`
// The name of the producer
Tag string `json:"tag"`
// A 24-character hexadecimal unique key associated with the producer's tag, used for internal identification.
//
TagKey string `json:"tagKey"`
// The absolute URL of the thumbnail image for the producer.
Thumb *string `json:"thumb,omitempty"`
}
func (o *Producer) GetID() int {
if o == nil {
return 0
}
return o.ID
}
func (o *Producer) GetFilter() string {
if o == nil {
return ""
}
return o.Filter
}
func (o *Producer) GetTag() string {
if o == nil {
return ""
}
return o.Tag
}
func (o *Producer) GetTagKey() string {
if o == nil {
return ""
}
return o.TagKey
}
func (o *Producer) GetThumb() *string {
if o == nil {
return nil
}
return o.Thumb
}
// Rating - The type of rating, for example 'audience' or 'critic'.
type Rating struct {
// The URL for the rating image, for example from IMDb.
Image string `json:"image"`
Value float32 `json:"value"`
Type string `json:"type"`
}
func (o *Rating) GetImage() string {
if o == nil {
return ""
}
return o.Image
}
func (o *Rating) GetValue() float32 {
if o == nil {
return 0.0
}
return o.Value
}
func (o *Rating) GetType() string {
if o == nil {
return ""
}
return o.Type
}
// Similar - The display tag for the similar item, typically the title.
type Similar struct {
ID int `json:"id"`
Filter string `json:"filter"`
Tag string `json:"tag"`
}
func (o *Similar) GetID() int {
if o == nil {
return 0
}
return o.ID
}
func (o *Similar) GetFilter() string {
if o == nil {
return ""
}
return o.Filter
}
func (o *Similar) GetTag() string {
if o == nil {
return ""
}
return o.Tag
}
// Location - The folder path for the media item.
type Location struct {
Path string `json:"path"`
}
func (o *Location) GetPath() string {
if o == nil {
return ""
}
return o.Path
}
type Collection struct {
// The user-made collection this media item belongs to
Tag string `json:"tag"`
}
func (o *Collection) GetTag() string {
if o == nil {
return ""
}
return o.Tag
}
// GetRecentlyAddedMetadata - Unknown
type GetRecentlyAddedMetadata struct {
AddedAt int64 `json:"addedAt"`
// The art image URL for the media item.
Art string `json:"art"`
// The URL for the audience rating image.
AudienceRatingImage *string `json:"audienceRatingImage,omitempty"`
// The audience rating for the media item.
AudienceRating float64 `json:"audienceRating"`
// The source from which chapter data is derived.
ChapterSource *string `json:"chapterSource,omitempty"`
// The number of child items associated with this media item.
ChildCount int `json:"childCount"`
// The content rating for the media item.
ContentRating *string `json:"contentRating,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"`
// The duration of the media item in milliseconds.
Duration int `json:"duration"`
// The art URL for the grandparent media item.
GrandparentArt *string `json:"grandparentArt,omitempty"`
// The GUID of the grandparent media item.
GrandparentGUID *string `json:"grandparentGuid,omitempty"`
// The key of the grandparent media item.
GrandparentKey *string `json:"grandparentKey,omitempty"`
// The rating key of the grandparent media item.
GrandparentRatingKey *string `json:"grandparentRatingKey,omitempty"`
// The slug for the grandparent media item.
GrandparentSlug *string `json:"grandparentSlug,omitempty"`
// The theme URL for the grandparent media item.
GrandparentTheme *string `json:"grandparentTheme,omitempty"`
// The thumbnail URL for the grandparent media item.
GrandparentThumb *string `json:"grandparentThumb,omitempty"`
// The title of the grandparent media item.
GrandparentTitle *string `json:"grandparentTitle,omitempty"`
// The globally unique identifier for the media item.
GUID string `json:"guid"`
// The index position of the media item.
Index int `json:"index"`
// The unique key for the media item.
Key string `json:"key"`
// The Unix timestamp representing the last time the item was rated.
LastRatedAt *int64 `json:"lastRatedAt,omitempty"`
// Unix timestamp for when the media item was last viewed.
LastViewedAt *int `json:"lastViewedAt,omitempty"`
// The number of leaf items (end nodes) under this media item.
LeafCount *int `json:"leafCount,omitempty"`
// The identifier for the library section.
LibrarySectionID *int64 `json:"librarySectionID,omitempty"`
// The key corresponding to the library section.
LibrarySectionKey *string `json:"librarySectionKey,omitempty"`
// The title of the library section.
LibrarySectionTitle *string `json:"librarySectionTitle,omitempty"`
// The original title of the media item (if different).
OriginalTitle *string `json:"originalTitle,omitempty"`
// The original release date of the media item.
OriginallyAvailableAt *types.Date `json:"originallyAvailableAt,omitempty"`
// The GUID of the parent media item.
ParentGUID *string `json:"parentGuid,omitempty"`
// The index position of the parent media item.
ParentIndex *int `json:"parentIndex,omitempty"`
// The key of the parent media item.
ParentKey *string `json:"parentKey,omitempty"`
// The rating key of the parent media item.
ParentRatingKey *string `json:"parentRatingKey,omitempty"`
// The slug for the parent media item.
ParentSlug *string `json:"parentSlug,omitempty"`
// The studio of the parent media item.
ParentStudio string `json:"parentStudio"`
// The theme URL for the parent media item.
ParentTheme string `json:"parentTheme"`
// The thumbnail URL for the parent media item.
ParentThumb *string `json:"parentThumb,omitempty"`
// The title of the parent media item.
ParentTitle *string `json:"parentTitle,omitempty"`
// The release year of the parent media item.
ParentYear *int `json:"parentYear,omitempty"`
// The primary extra key associated with this media item.
PrimaryExtraKey *string `json:"primaryExtraKey,omitempty"`
// The URL for the rating image.
RatingImage *string `json:"ratingImage,omitempty"`
// 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 critic rating for the media item.
Rating float32 `json:"rating"`
// The total number of seasons (for TV shows).
SeasonCount int `json:"seasonCount"`
// The number of times this media item has been skipped.
SkipCount *int `json:"skipCount,omitempty"`
// A URLfriendly version of the media title.
Slug string `json:"slug"`
// The studio that produced the media item.
Studio *string `json:"studio,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"`
// A synopsis of the media item.
Summary string `json:"summary"`
// A brief tagline for the media item.
Tagline string `json:"tagline"`
// The theme URL for the media item.
Theme string `json:"theme"`
// The thumbnail image URL for the media item.
Thumb string `json:"thumb"`
// The sort title used for ordering media items.
TitleSort string `json:"titleSort"`
// The title of the media item.
Title string `json:"title"`
Type GetRecentlyAddedHubsType `json:"type"`
// Unix epoch datetime in seconds
UpdatedAt *int64 `json:"updatedAt,omitempty"`
// The rating provided by a user for the item. This value is expressed as a decimal number.
UserRating *float32 `json:"userRating,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 leaf items that have been viewed.
ViewedLeafCount *int `json:"viewedLeafCount,omitempty"`
// The release year of the media item.
Year *int `json:"year,omitempty"`
Image []GetRecentlyAddedImage `json:"Image,omitempty"`
UltraBlurColors *UltraBlurColors `json:"UltraBlurColors,omitempty"`
Guids []Guids `json:"Guid,omitempty"`
Media []Media `json:"Media,omitempty"`
Genre []Genre `json:"Genre,omitempty"`
Country []Country `json:"Country,omitempty"`
Director []Director `json:"Director,omitempty"`
Writer []Writer `json:"Writer,omitempty"`
Role []Role `json:"Role,omitempty"`
Producer []Producer `json:"Producer,omitempty"`
Rating1 []Rating `json:"Rating,omitempty"`
Similar []Similar `json:"Similar,omitempty"`
Location []Location `json:"Location,omitempty"`
Collection []Collection `json:"Collection,omitempty"`
}
func (g GetRecentlyAddedMetadata) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(g, "", false)
}
func (g *GetRecentlyAddedMetadata) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &g, "", false, []string{"addedAt", "art", "audienceRating", "childCount", "duration", "guid", "index", "key", "parentStudio", "parentTheme", "ratingKey", "rating", "seasonCount", "slug", "summary", "tagline", "theme", "thumb", "titleSort", "title", "type"}); err != nil {
return err
}
return nil
}
func (o *GetRecentlyAddedMetadata) GetAddedAt() int64 {
if o == nil {
return 0
}
return o.AddedAt
}
func (o *GetRecentlyAddedMetadata) GetArt() string {
if o == nil {
return ""
}
return o.Art
}
func (o *GetRecentlyAddedMetadata) GetAudienceRatingImage() *string {
if o == nil {
return nil
}
return o.AudienceRatingImage
}
func (o *GetRecentlyAddedMetadata) GetAudienceRating() float64 {
if o == nil {
return 0.0
}
return o.AudienceRating
}
func (o *GetRecentlyAddedMetadata) GetChapterSource() *string {
if o == nil {
return nil
}
return o.ChapterSource
}
func (o *GetRecentlyAddedMetadata) GetChildCount() int {
if o == nil {
return 0
}
return o.ChildCount
}
func (o *GetRecentlyAddedMetadata) GetContentRating() *string {
if o == nil {
return nil
}
return o.ContentRating
}
func (o *GetRecentlyAddedMetadata) GetCreatedAtAccuracy() *string {
if o == nil {
return nil
}
return o.CreatedAtAccuracy
}
func (o *GetRecentlyAddedMetadata) GetCreatedAtTZOffset() *string {
if o == nil {
return nil
}
return o.CreatedAtTZOffset
}
func (o *GetRecentlyAddedMetadata) GetDuration() int {
if o == nil {
return 0
}
return o.Duration
}
func (o *GetRecentlyAddedMetadata) GetGrandparentArt() *string {
if o == nil {
return nil
}
return o.GrandparentArt
}
func (o *GetRecentlyAddedMetadata) GetGrandparentGUID() *string {
if o == nil {
return nil
}
return o.GrandparentGUID
}
func (o *GetRecentlyAddedMetadata) GetGrandparentKey() *string {
if o == nil {
return nil
}
return o.GrandparentKey
}
func (o *GetRecentlyAddedMetadata) GetGrandparentRatingKey() *string {
if o == nil {
return nil
}
return o.GrandparentRatingKey
}
func (o *GetRecentlyAddedMetadata) GetGrandparentSlug() *string {
if o == nil {
return nil
}
return o.GrandparentSlug
}
func (o *GetRecentlyAddedMetadata) GetGrandparentTheme() *string {
if o == nil {
return nil
}
return o.GrandparentTheme
}
func (o *GetRecentlyAddedMetadata) GetGrandparentThumb() *string {
if o == nil {
return nil
}
return o.GrandparentThumb
}
func (o *GetRecentlyAddedMetadata) GetGrandparentTitle() *string {
if o == nil {
return nil
}
return o.GrandparentTitle
}
func (o *GetRecentlyAddedMetadata) GetGUID() string {
if o == nil {
return ""
}
return o.GUID
}
func (o *GetRecentlyAddedMetadata) GetIndex() int {
if o == nil {
return 0
}
return o.Index
}
func (o *GetRecentlyAddedMetadata) GetKey() string {
if o == nil {
return ""
}
return o.Key
}
func (o *GetRecentlyAddedMetadata) GetLastRatedAt() *int64 {
if o == nil {
return nil
}
return o.LastRatedAt
}
func (o *GetRecentlyAddedMetadata) GetLastViewedAt() *int {
if o == nil {
return nil
}
return o.LastViewedAt
}
func (o *GetRecentlyAddedMetadata) GetLeafCount() *int {
if o == nil {
return nil
}
return o.LeafCount
}
func (o *GetRecentlyAddedMetadata) GetLibrarySectionID() *int64 {
if o == nil {
return nil
}
return o.LibrarySectionID
}
func (o *GetRecentlyAddedMetadata) GetLibrarySectionKey() *string {
if o == nil {
return nil
}
return o.LibrarySectionKey
}
func (o *GetRecentlyAddedMetadata) GetLibrarySectionTitle() *string {
if o == nil {
return nil
}
return o.LibrarySectionTitle
}
func (o *GetRecentlyAddedMetadata) GetOriginalTitle() *string {
if o == nil {
return nil
}
return o.OriginalTitle
}
func (o *GetRecentlyAddedMetadata) GetOriginallyAvailableAt() *types.Date {
if o == nil {
return nil
}
return o.OriginallyAvailableAt
}
func (o *GetRecentlyAddedMetadata) GetParentGUID() *string {
if o == nil {
return nil
}
return o.ParentGUID
}
func (o *GetRecentlyAddedMetadata) GetParentIndex() *int {
if o == nil {
return nil
}
return o.ParentIndex
}
func (o *GetRecentlyAddedMetadata) GetParentKey() *string {
if o == nil {
return nil
}
return o.ParentKey
}
func (o *GetRecentlyAddedMetadata) GetParentRatingKey() *string {
if o == nil {
return nil
}
return o.ParentRatingKey
}
func (o *GetRecentlyAddedMetadata) GetParentSlug() *string {
if o == nil {
return nil
}
return o.ParentSlug
}
func (o *GetRecentlyAddedMetadata) GetParentStudio() string {
if o == nil {
return ""
}
return o.ParentStudio
}
func (o *GetRecentlyAddedMetadata) GetParentTheme() string {
if o == nil {
return ""
}
return o.ParentTheme
}
func (o *GetRecentlyAddedMetadata) GetParentThumb() *string {
if o == nil {
return nil
}
return o.ParentThumb
}
func (o *GetRecentlyAddedMetadata) GetParentTitle() *string {
if o == nil {
return nil
}
return o.ParentTitle
}
func (o *GetRecentlyAddedMetadata) GetParentYear() *int {
if o == nil {
return nil
}
return o.ParentYear
}
func (o *GetRecentlyAddedMetadata) GetPrimaryExtraKey() *string {
if o == nil {
return nil
}
return o.PrimaryExtraKey
}
func (o *GetRecentlyAddedMetadata) GetRatingImage() *string {
if o == nil {
return nil
}
return o.RatingImage
}
func (o *GetRecentlyAddedMetadata) GetRatingKey() string {
if o == nil {
return ""
}
return o.RatingKey
}
func (o *GetRecentlyAddedMetadata) GetRating() float32 {
if o == nil {
return 0.0
}
return o.Rating
}
func (o *GetRecentlyAddedMetadata) GetSeasonCount() int {
if o == nil {
return 0
}
return o.SeasonCount
}
func (o *GetRecentlyAddedMetadata) GetSkipCount() *int {
if o == nil {
return nil
}
return o.SkipCount
}
func (o *GetRecentlyAddedMetadata) GetSlug() string {
if o == nil {
return ""
}
return o.Slug
}
func (o *GetRecentlyAddedMetadata) GetStudio() *string {
if o == nil {
return nil
}
return o.Studio
}
func (o *GetRecentlyAddedMetadata) GetSubtype() *string {
if o == nil {
return nil
}
return o.Subtype
}
func (o *GetRecentlyAddedMetadata) GetSummary() string {
if o == nil {
return ""
}
return o.Summary
}
func (o *GetRecentlyAddedMetadata) GetTagline() string {
if o == nil {
return ""
}
return o.Tagline
}
func (o *GetRecentlyAddedMetadata) GetTheme() string {
if o == nil {
return ""
}
return o.Theme
}
func (o *GetRecentlyAddedMetadata) GetThumb() string {
if o == nil {
return ""
}
return o.Thumb
}
func (o *GetRecentlyAddedMetadata) GetTitleSort() string {
if o == nil {
return ""
}
return o.TitleSort
}
func (o *GetRecentlyAddedMetadata) GetTitle() string {
if o == nil {
return ""
}
return o.Title
}
func (o *GetRecentlyAddedMetadata) GetType() GetRecentlyAddedHubsType {
if o == nil {
return GetRecentlyAddedHubsType("")
}
return o.Type
}
func (o *GetRecentlyAddedMetadata) GetUpdatedAt() *int64 {
if o == nil {
return nil
}
return o.UpdatedAt
}
func (o *GetRecentlyAddedMetadata) GetUserRating() *float32 {
if o == nil {
return nil
}
return o.UserRating
}
func (o *GetRecentlyAddedMetadata) GetViewCount() *int {
if o == nil {
return nil
}
return o.ViewCount
}
func (o *GetRecentlyAddedMetadata) GetViewOffset() *int {
if o == nil {
return nil
}
return o.ViewOffset
}
func (o *GetRecentlyAddedMetadata) GetViewedLeafCount() *int {
if o == nil {
return nil
}
return o.ViewedLeafCount
}
func (o *GetRecentlyAddedMetadata) GetYear() *int {
if o == nil {
return nil
}
return o.Year
}
func (o *GetRecentlyAddedMetadata) GetImage() []GetRecentlyAddedImage {
if o == nil {
return nil
}
return o.Image
}
func (o *GetRecentlyAddedMetadata) GetUltraBlurColors() *UltraBlurColors {
if o == nil {
return nil
}
return o.UltraBlurColors
}
func (o *GetRecentlyAddedMetadata) GetGuids() []Guids {
if o == nil {
return nil
}
return o.Guids
}
func (o *GetRecentlyAddedMetadata) GetMedia() []Media {
if o == nil {
return nil
}
return o.Media
}
func (o *GetRecentlyAddedMetadata) GetGenre() []Genre {
if o == nil {
return nil
}
return o.Genre
}
func (o *GetRecentlyAddedMetadata) GetCountry() []Country {
if o == nil {
return nil
}
return o.Country
}
func (o *GetRecentlyAddedMetadata) GetDirector() []Director {
if o == nil {
return nil
}
return o.Director
}
func (o *GetRecentlyAddedMetadata) GetWriter() []Writer {
if o == nil {
return nil
}
return o.Writer
}
func (o *GetRecentlyAddedMetadata) GetRole() []Role {
if o == nil {
return nil
}
return o.Role
}
func (o *GetRecentlyAddedMetadata) GetProducer() []Producer {
if o == nil {
return nil
}
return o.Producer
}
func (o *GetRecentlyAddedMetadata) GetRating1() []Rating {
if o == nil {
return nil
}
return o.Rating1
}
func (o *GetRecentlyAddedMetadata) GetSimilar() []Similar {
if o == nil {
return nil
}
return o.Similar
}
func (o *GetRecentlyAddedMetadata) GetLocation() []Location {
if o == nil {
return nil
}
return o.Location
}
func (o *GetRecentlyAddedMetadata) GetCollection() []Collection {
if o == nil {
return nil
}
return o.Collection
}
type GetRecentlyAddedMediaContainer 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"`
// Indicates whether syncing is allowed.
AllowSync bool `json:"allowSync"`
// An plugin identifier for the media container.
Identifier string `json:"identifier"`
// The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
//
Meta *Meta `json:"Meta,omitempty"`
// An array of metadata items.
Metadata []GetRecentlyAddedMetadata `json:"Metadata,omitempty"`
}
func (o *GetRecentlyAddedMediaContainer) GetSize() int {
if o == nil {
return 0
}
return o.Size
}
func (o *GetRecentlyAddedMediaContainer) GetTotalSize() int {
if o == nil {
return 0
}
return o.TotalSize
}
func (o *GetRecentlyAddedMediaContainer) GetOffset() int64 {
if o == nil {
return 0
}
return o.Offset
}
func (o *GetRecentlyAddedMediaContainer) GetAllowSync() bool {
if o == nil {
return false
}
return o.AllowSync
}
func (o *GetRecentlyAddedMediaContainer) GetIdentifier() string {
if o == nil {
return ""
}
return o.Identifier
}
func (o *GetRecentlyAddedMediaContainer) GetMeta() *Meta {
if o == nil {
return nil
}
return o.Meta
}
func (o *GetRecentlyAddedMediaContainer) GetMetadata() []GetRecentlyAddedMetadata {
if o == nil {
return nil
}
return o.Metadata
}
// GetRecentlyAddedResponseBody - A successful response with recently added content.
type GetRecentlyAddedResponseBody struct {
MediaContainer *GetRecentlyAddedMediaContainer `json:"MediaContainer,omitempty"`
}
func (o *GetRecentlyAddedResponseBody) GetMediaContainer() *GetRecentlyAddedMediaContainer {
if o == nil {
return nil
}
return o.MediaContainer
}
type GetRecentlyAddedResponse 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
// A successful response with recently added content.
Object *GetRecentlyAddedResponseBody
}
func (o *GetRecentlyAddedResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *GetRecentlyAddedResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *GetRecentlyAddedResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *GetRecentlyAddedResponse) GetObject() *GetRecentlyAddedResponseBody {
if o == nil {
return nil
}
return o.Object
}