Files
plexgo/models/operations/getmediametadata.go

2534 lines
60 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 GetMediaMetaDataRequest struct {
// The id(s) of the library item(s) to return metadata for. Can be a single ID or comma-separated list of IDs.
RatingKey string `pathParam:"style=simple,explode=false,name=ratingKey"`
// Include concerts data if set to true.
IncludeConcerts *bool `queryParam:"style=form,explode=true,name=includeConcerts"`
// Include extra content (e.g. bonus features).
IncludeExtras *bool `queryParam:"style=form,explode=true,name=includeExtras"`
// Include on-deck items.
IncludeOnDeck *bool `queryParam:"style=form,explode=true,name=includeOnDeck"`
// Include popular leaves (episodes/chapters).
IncludePopularLeaves *bool `queryParam:"style=form,explode=true,name=includePopularLeaves"`
// Include preferences information.
IncludePreferences *bool `queryParam:"style=form,explode=true,name=includePreferences"`
// Include reviews for the content.
IncludeReviews *bool `queryParam:"style=form,explode=true,name=includeReviews"`
// Include chapter details.
IncludeChapters *bool `queryParam:"style=form,explode=true,name=includeChapters"`
// Include station data.
IncludeStations *bool `queryParam:"style=form,explode=true,name=includeStations"`
// Include external media data.
IncludeExternalMedia *bool `queryParam:"style=form,explode=true,name=includeExternalMedia"`
// Trigger asynchronous metadata augmentation.
AsyncAugmentMetadata *bool `queryParam:"style=form,explode=true,name=asyncAugmentMetadata"`
// Trigger asynchronous file checking.
AsyncCheckFiles *bool `queryParam:"style=form,explode=true,name=asyncCheckFiles"`
// Trigger asynchronous refresh of analysis.
AsyncRefreshAnalysis *bool `queryParam:"style=form,explode=true,name=asyncRefreshAnalysis"`
// Trigger asynchronous refresh of the local media agent.
AsyncRefreshLocalMediaAgent *bool `queryParam:"style=form,explode=true,name=asyncRefreshLocalMediaAgent"`
}
func (o *GetMediaMetaDataRequest) GetRatingKey() string {
if o == nil {
return ""
}
return o.RatingKey
}
func (o *GetMediaMetaDataRequest) GetIncludeConcerts() *bool {
if o == nil {
return nil
}
return o.IncludeConcerts
}
func (o *GetMediaMetaDataRequest) GetIncludeExtras() *bool {
if o == nil {
return nil
}
return o.IncludeExtras
}
func (o *GetMediaMetaDataRequest) GetIncludeOnDeck() *bool {
if o == nil {
return nil
}
return o.IncludeOnDeck
}
func (o *GetMediaMetaDataRequest) GetIncludePopularLeaves() *bool {
if o == nil {
return nil
}
return o.IncludePopularLeaves
}
func (o *GetMediaMetaDataRequest) GetIncludePreferences() *bool {
if o == nil {
return nil
}
return o.IncludePreferences
}
func (o *GetMediaMetaDataRequest) GetIncludeReviews() *bool {
if o == nil {
return nil
}
return o.IncludeReviews
}
func (o *GetMediaMetaDataRequest) GetIncludeChapters() *bool {
if o == nil {
return nil
}
return o.IncludeChapters
}
func (o *GetMediaMetaDataRequest) GetIncludeStations() *bool {
if o == nil {
return nil
}
return o.IncludeStations
}
func (o *GetMediaMetaDataRequest) GetIncludeExternalMedia() *bool {
if o == nil {
return nil
}
return o.IncludeExternalMedia
}
func (o *GetMediaMetaDataRequest) GetAsyncAugmentMetadata() *bool {
if o == nil {
return nil
}
return o.AsyncAugmentMetadata
}
func (o *GetMediaMetaDataRequest) GetAsyncCheckFiles() *bool {
if o == nil {
return nil
}
return o.AsyncCheckFiles
}
func (o *GetMediaMetaDataRequest) GetAsyncRefreshAnalysis() *bool {
if o == nil {
return nil
}
return o.AsyncRefreshAnalysis
}
func (o *GetMediaMetaDataRequest) GetAsyncRefreshLocalMediaAgent() *bool {
if o == nil {
return nil
}
return o.AsyncRefreshLocalMediaAgent
}
// GetMediaMetaDataType - The type of media content in the Plex library. This can represent videos, music, or photos.
type GetMediaMetaDataType string
const (
GetMediaMetaDataTypeMovie GetMediaMetaDataType = "movie"
GetMediaMetaDataTypeTvShow GetMediaMetaDataType = "show"
GetMediaMetaDataTypeSeason GetMediaMetaDataType = "season"
GetMediaMetaDataTypeEpisode GetMediaMetaDataType = "episode"
GetMediaMetaDataTypeArtist GetMediaMetaDataType = "artist"
GetMediaMetaDataTypeAlbum GetMediaMetaDataType = "album"
GetMediaMetaDataTypeTrack GetMediaMetaDataType = "track"
GetMediaMetaDataTypePhotoAlbum GetMediaMetaDataType = "photoalbum"
GetMediaMetaDataTypePhoto GetMediaMetaDataType = "photo"
GetMediaMetaDataTypeCollection GetMediaMetaDataType = "collection"
)
func (e GetMediaMetaDataType) ToPointer() *GetMediaMetaDataType {
return &e
}
type GetMediaMetaDataLibraryType string
const (
GetMediaMetaDataLibraryTypeCoverPoster GetMediaMetaDataLibraryType = "coverPoster"
GetMediaMetaDataLibraryTypeBackground GetMediaMetaDataLibraryType = "background"
GetMediaMetaDataLibraryTypeSnapshot GetMediaMetaDataLibraryType = "snapshot"
GetMediaMetaDataLibraryTypeClearLogo GetMediaMetaDataLibraryType = "clearLogo"
)
func (e GetMediaMetaDataLibraryType) ToPointer() *GetMediaMetaDataLibraryType {
return &e
}
type GetMediaMetaDataImage struct {
Alt string `json:"alt"`
Type GetMediaMetaDataLibraryType `json:"type"`
URL string `json:"url"`
}
func (o *GetMediaMetaDataImage) GetAlt() string {
if o == nil {
return ""
}
return o.Alt
}
func (o *GetMediaMetaDataImage) GetType() GetMediaMetaDataLibraryType {
if o == nil {
return GetMediaMetaDataLibraryType("")
}
return o.Type
}
func (o *GetMediaMetaDataImage) GetURL() string {
if o == nil {
return ""
}
return o.URL
}
type GetMediaMetaDataUltraBlurColors struct {
TopLeft string `json:"topLeft"`
TopRight string `json:"topRight"`
BottomRight string `json:"bottomRight"`
BottomLeft string `json:"bottomLeft"`
}
func (o *GetMediaMetaDataUltraBlurColors) GetTopLeft() string {
if o == nil {
return ""
}
return o.TopLeft
}
func (o *GetMediaMetaDataUltraBlurColors) GetTopRight() string {
if o == nil {
return ""
}
return o.TopRight
}
func (o *GetMediaMetaDataUltraBlurColors) GetBottomRight() string {
if o == nil {
return ""
}
return o.BottomRight
}
func (o *GetMediaMetaDataUltraBlurColors) GetBottomLeft() string {
if o == nil {
return ""
}
return o.BottomLeft
}
type GetMediaMetaDataGuids struct {
// The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb://
//
ID string `json:"id"`
}
func (o *GetMediaMetaDataGuids) GetID() string {
if o == nil {
return ""
}
return o.ID
}
type GetMediaMetaDataOptimizedForStreaming1 int
const (
GetMediaMetaDataOptimizedForStreaming1Zero GetMediaMetaDataOptimizedForStreaming1 = 0
GetMediaMetaDataOptimizedForStreaming1One GetMediaMetaDataOptimizedForStreaming1 = 1
)
func (e GetMediaMetaDataOptimizedForStreaming1) ToPointer() *GetMediaMetaDataOptimizedForStreaming1 {
return &e
}
func (e *GetMediaMetaDataOptimizedForStreaming1) 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 = GetMediaMetaDataOptimizedForStreaming1(v)
return nil
default:
return fmt.Errorf("invalid value for GetMediaMetaDataOptimizedForStreaming1: %v", v)
}
}
type GetMediaMetaDataOptimizedForStreamingType string
const (
GetMediaMetaDataOptimizedForStreamingTypeGetMediaMetaDataOptimizedForStreaming1 GetMediaMetaDataOptimizedForStreamingType = "get-media-meta-data_optimizedForStreaming_1"
GetMediaMetaDataOptimizedForStreamingTypeBoolean GetMediaMetaDataOptimizedForStreamingType = "boolean"
)
// GetMediaMetaDataOptimizedForStreaming - Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
type GetMediaMetaDataOptimizedForStreaming struct {
GetMediaMetaDataOptimizedForStreaming1 *GetMediaMetaDataOptimizedForStreaming1 `queryParam:"inline"`
Boolean *bool `queryParam:"inline"`
Type GetMediaMetaDataOptimizedForStreamingType
}
func CreateGetMediaMetaDataOptimizedForStreamingGetMediaMetaDataOptimizedForStreaming1(getMediaMetaDataOptimizedForStreaming1 GetMediaMetaDataOptimizedForStreaming1) GetMediaMetaDataOptimizedForStreaming {
typ := GetMediaMetaDataOptimizedForStreamingTypeGetMediaMetaDataOptimizedForStreaming1
return GetMediaMetaDataOptimizedForStreaming{
GetMediaMetaDataOptimizedForStreaming1: &getMediaMetaDataOptimizedForStreaming1,
Type: typ,
}
}
func CreateGetMediaMetaDataOptimizedForStreamingBoolean(boolean bool) GetMediaMetaDataOptimizedForStreaming {
typ := GetMediaMetaDataOptimizedForStreamingTypeBoolean
return GetMediaMetaDataOptimizedForStreaming{
Boolean: &boolean,
Type: typ,
}
}
func (u *GetMediaMetaDataOptimizedForStreaming) UnmarshalJSON(data []byte) error {
var getMediaMetaDataOptimizedForStreaming1 GetMediaMetaDataOptimizedForStreaming1 = GetMediaMetaDataOptimizedForStreaming1(0)
if err := utils.UnmarshalJSON(data, &getMediaMetaDataOptimizedForStreaming1, "", true, true); err == nil {
u.GetMediaMetaDataOptimizedForStreaming1 = &getMediaMetaDataOptimizedForStreaming1
u.Type = GetMediaMetaDataOptimizedForStreamingTypeGetMediaMetaDataOptimizedForStreaming1
return nil
}
var boolean bool = false
if err := utils.UnmarshalJSON(data, &boolean, "", true, true); err == nil {
u.Boolean = &boolean
u.Type = GetMediaMetaDataOptimizedForStreamingTypeBoolean
return nil
}
return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetMediaMetaDataOptimizedForStreaming", string(data))
}
func (u GetMediaMetaDataOptimizedForStreaming) MarshalJSON() ([]byte, error) {
if u.GetMediaMetaDataOptimizedForStreaming1 != nil {
return utils.MarshalJSON(u.GetMediaMetaDataOptimizedForStreaming1, "", true)
}
if u.Boolean != nil {
return utils.MarshalJSON(u.Boolean, "", true)
}
return nil, errors.New("could not marshal union type GetMediaMetaDataOptimizedForStreaming: all fields are null")
}
type GetMediaMetaDataOptimizedForStreamingLibrary1 int
const (
GetMediaMetaDataOptimizedForStreamingLibrary1Zero GetMediaMetaDataOptimizedForStreamingLibrary1 = 0
GetMediaMetaDataOptimizedForStreamingLibrary1One GetMediaMetaDataOptimizedForStreamingLibrary1 = 1
)
func (e GetMediaMetaDataOptimizedForStreamingLibrary1) ToPointer() *GetMediaMetaDataOptimizedForStreamingLibrary1 {
return &e
}
func (e *GetMediaMetaDataOptimizedForStreamingLibrary1) 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 = GetMediaMetaDataOptimizedForStreamingLibrary1(v)
return nil
default:
return fmt.Errorf("invalid value for GetMediaMetaDataOptimizedForStreamingLibrary1: %v", v)
}
}
type GetMediaMetaDataLibraryOptimizedForStreamingType string
const (
GetMediaMetaDataLibraryOptimizedForStreamingTypeGetMediaMetaDataOptimizedForStreamingLibrary1 GetMediaMetaDataLibraryOptimizedForStreamingType = "get-media-meta-data_optimizedForStreaming_Library_1"
GetMediaMetaDataLibraryOptimizedForStreamingTypeBoolean GetMediaMetaDataLibraryOptimizedForStreamingType = "boolean"
)
// GetMediaMetaDataLibraryOptimizedForStreaming - Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
type GetMediaMetaDataLibraryOptimizedForStreaming struct {
GetMediaMetaDataOptimizedForStreamingLibrary1 *GetMediaMetaDataOptimizedForStreamingLibrary1 `queryParam:"inline"`
Boolean *bool `queryParam:"inline"`
Type GetMediaMetaDataLibraryOptimizedForStreamingType
}
func CreateGetMediaMetaDataLibraryOptimizedForStreamingGetMediaMetaDataOptimizedForStreamingLibrary1(getMediaMetaDataOptimizedForStreamingLibrary1 GetMediaMetaDataOptimizedForStreamingLibrary1) GetMediaMetaDataLibraryOptimizedForStreaming {
typ := GetMediaMetaDataLibraryOptimizedForStreamingTypeGetMediaMetaDataOptimizedForStreamingLibrary1
return GetMediaMetaDataLibraryOptimizedForStreaming{
GetMediaMetaDataOptimizedForStreamingLibrary1: &getMediaMetaDataOptimizedForStreamingLibrary1,
Type: typ,
}
}
func CreateGetMediaMetaDataLibraryOptimizedForStreamingBoolean(boolean bool) GetMediaMetaDataLibraryOptimizedForStreaming {
typ := GetMediaMetaDataLibraryOptimizedForStreamingTypeBoolean
return GetMediaMetaDataLibraryOptimizedForStreaming{
Boolean: &boolean,
Type: typ,
}
}
func (u *GetMediaMetaDataLibraryOptimizedForStreaming) UnmarshalJSON(data []byte) error {
var getMediaMetaDataOptimizedForStreamingLibrary1 GetMediaMetaDataOptimizedForStreamingLibrary1 = GetMediaMetaDataOptimizedForStreamingLibrary1(0)
if err := utils.UnmarshalJSON(data, &getMediaMetaDataOptimizedForStreamingLibrary1, "", true, true); err == nil {
u.GetMediaMetaDataOptimizedForStreamingLibrary1 = &getMediaMetaDataOptimizedForStreamingLibrary1
u.Type = GetMediaMetaDataLibraryOptimizedForStreamingTypeGetMediaMetaDataOptimizedForStreamingLibrary1
return nil
}
var boolean bool = false
if err := utils.UnmarshalJSON(data, &boolean, "", true, true); err == nil {
u.Boolean = &boolean
u.Type = GetMediaMetaDataLibraryOptimizedForStreamingTypeBoolean
return nil
}
return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetMediaMetaDataLibraryOptimizedForStreaming", string(data))
}
func (u GetMediaMetaDataLibraryOptimizedForStreaming) MarshalJSON() ([]byte, error) {
if u.GetMediaMetaDataOptimizedForStreamingLibrary1 != nil {
return utils.MarshalJSON(u.GetMediaMetaDataOptimizedForStreamingLibrary1, "", true)
}
if u.Boolean != nil {
return utils.MarshalJSON(u.Boolean, "", true)
}
return nil, errors.New("could not marshal union type GetMediaMetaDataLibraryOptimizedForStreaming: all fields are null")
}
// GetMediaMetaDataHasThumbnail - Indicates if the part has a thumbnail.
type GetMediaMetaDataHasThumbnail string
const (
GetMediaMetaDataHasThumbnailFalse GetMediaMetaDataHasThumbnail = "0"
GetMediaMetaDataHasThumbnailTrue GetMediaMetaDataHasThumbnail = "1"
)
func (e GetMediaMetaDataHasThumbnail) ToPointer() *GetMediaMetaDataHasThumbnail {
return &e
}
func (e *GetMediaMetaDataHasThumbnail) 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 = GetMediaMetaDataHasThumbnail(v)
return nil
default:
return fmt.Errorf("invalid value for GetMediaMetaDataHasThumbnail: %v", v)
}
}
type GetMediaMetaDataStream 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,omitempty"`
// 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,omitempty"`
// Extended display title for the stream.
ExtendedDisplayTitle *string `json:"extendedDisplayTitle,omitempty"`
// 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 (g GetMediaMetaDataStream) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(g, "", false)
}
func (g *GetMediaMetaDataStream) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &g, "", false, false); err != nil {
return err
}
return nil
}
func (o *GetMediaMetaDataStream) GetID() int64 {
if o == nil {
return 0
}
return o.ID
}
func (o *GetMediaMetaDataStream) GetStreamType() int64 {
return 1
}
func (o *GetMediaMetaDataStream) GetFormat() *string {
if o == nil {
return nil
}
return o.Format
}
func (o *GetMediaMetaDataStream) GetDefault() *bool {
if o == nil {
return nil
}
return o.Default
}
func (o *GetMediaMetaDataStream) GetCodec() *string {
if o == nil {
return nil
}
return o.Codec
}
func (o *GetMediaMetaDataStream) GetIndex() *int {
if o == nil {
return nil
}
return o.Index
}
func (o *GetMediaMetaDataStream) GetBitrate() *int {
if o == nil {
return nil
}
return o.Bitrate
}
func (o *GetMediaMetaDataStream) GetLanguage() *string {
if o == nil {
return nil
}
return o.Language
}
func (o *GetMediaMetaDataStream) GetLanguageTag() *string {
if o == nil {
return nil
}
return o.LanguageTag
}
func (o *GetMediaMetaDataStream) GetLanguageCode() *string {
if o == nil {
return nil
}
return o.LanguageCode
}
func (o *GetMediaMetaDataStream) GetHeaderCompression() *bool {
if o == nil {
return nil
}
return o.HeaderCompression
}
func (o *GetMediaMetaDataStream) GetDOVIBLCompatID() *int {
if o == nil {
return nil
}
return o.DOVIBLCompatID
}
func (o *GetMediaMetaDataStream) GetDOVIBLPresent() *bool {
if o == nil {
return nil
}
return o.DOVIBLPresent
}
func (o *GetMediaMetaDataStream) GetDOVIELPresent() *bool {
if o == nil {
return nil
}
return o.DOVIELPresent
}
func (o *GetMediaMetaDataStream) GetDOVILevel() *int {
if o == nil {
return nil
}
return o.DOVILevel
}
func (o *GetMediaMetaDataStream) GetDOVIPresent() *bool {
if o == nil {
return nil
}
return o.DOVIPresent
}
func (o *GetMediaMetaDataStream) GetDOVIProfile() *int {
if o == nil {
return nil
}
return o.DOVIProfile
}
func (o *GetMediaMetaDataStream) GetDOVIRPUPresent() *bool {
if o == nil {
return nil
}
return o.DOVIRPUPresent
}
func (o *GetMediaMetaDataStream) GetDOVIVersion() *string {
if o == nil {
return nil
}
return o.DOVIVersion
}
func (o *GetMediaMetaDataStream) GetBitDepth() *int {
if o == nil {
return nil
}
return o.BitDepth
}
func (o *GetMediaMetaDataStream) GetChromaLocation() *string {
if o == nil {
return nil
}
return o.ChromaLocation
}
func (o *GetMediaMetaDataStream) GetChromaSubsampling() *string {
if o == nil {
return nil
}
return o.ChromaSubsampling
}
func (o *GetMediaMetaDataStream) GetCodedHeight() *int {
if o == nil {
return nil
}
return o.CodedHeight
}
func (o *GetMediaMetaDataStream) GetCodedWidth() *int {
if o == nil {
return nil
}
return o.CodedWidth
}
func (o *GetMediaMetaDataStream) GetClosedCaptions() *bool {
if o == nil {
return nil
}
return o.ClosedCaptions
}
func (o *GetMediaMetaDataStream) GetColorPrimaries() *string {
if o == nil {
return nil
}
return o.ColorPrimaries
}
func (o *GetMediaMetaDataStream) GetColorRange() *string {
if o == nil {
return nil
}
return o.ColorRange
}
func (o *GetMediaMetaDataStream) GetColorSpace() *string {
if o == nil {
return nil
}
return o.ColorSpace
}
func (o *GetMediaMetaDataStream) GetColorTrc() *string {
if o == nil {
return nil
}
return o.ColorTrc
}
func (o *GetMediaMetaDataStream) GetFrameRate() *float32 {
if o == nil {
return nil
}
return o.FrameRate
}
func (o *GetMediaMetaDataStream) GetKey() *string {
if o == nil {
return nil
}
return o.Key
}
func (o *GetMediaMetaDataStream) GetHeight() *int {
if o == nil {
return nil
}
return o.Height
}
func (o *GetMediaMetaDataStream) GetLevel() *int {
if o == nil {
return nil
}
return o.Level
}
func (o *GetMediaMetaDataStream) GetOriginal() *bool {
if o == nil {
return nil
}
return o.Original
}
func (o *GetMediaMetaDataStream) GetHasScalingMatrix() *bool {
if o == nil {
return nil
}
return o.HasScalingMatrix
}
func (o *GetMediaMetaDataStream) GetProfile() *string {
if o == nil {
return nil
}
return o.Profile
}
func (o *GetMediaMetaDataStream) GetScanType() *string {
if o == nil {
return nil
}
return o.ScanType
}
func (o *GetMediaMetaDataStream) GetEmbeddedInVideo() *string {
if o == nil {
return nil
}
return o.EmbeddedInVideo
}
func (o *GetMediaMetaDataStream) GetRefFrames() *int {
if o == nil {
return nil
}
return o.RefFrames
}
func (o *GetMediaMetaDataStream) GetWidth() *int {
if o == nil {
return nil
}
return o.Width
}
func (o *GetMediaMetaDataStream) GetDisplayTitle() *string {
if o == nil {
return nil
}
return o.DisplayTitle
}
func (o *GetMediaMetaDataStream) GetExtendedDisplayTitle() *string {
if o == nil {
return nil
}
return o.ExtendedDisplayTitle
}
func (o *GetMediaMetaDataStream) GetSelected() *bool {
if o == nil {
return nil
}
return o.Selected
}
func (o *GetMediaMetaDataStream) GetForced() *bool {
if o == nil {
return nil
}
return o.Forced
}
func (o *GetMediaMetaDataStream) GetChannels() *int {
if o == nil {
return nil
}
return o.Channels
}
func (o *GetMediaMetaDataStream) GetAudioChannelLayout() *string {
if o == nil {
return nil
}
return o.AudioChannelLayout
}
func (o *GetMediaMetaDataStream) GetSamplingRate() *int {
if o == nil {
return nil
}
return o.SamplingRate
}
func (o *GetMediaMetaDataStream) GetCanAutoSync() *bool {
if o == nil {
return nil
}
return o.CanAutoSync
}
func (o *GetMediaMetaDataStream) GetHearingImpaired() *bool {
if o == nil {
return nil
}
return o.HearingImpaired
}
func (o *GetMediaMetaDataStream) GetDub() *bool {
if o == nil {
return nil
}
return o.Dub
}
func (o *GetMediaMetaDataStream) GetTitle() *string {
if o == nil {
return nil
}
return o.Title
}
type GetMediaMetaDataPart 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 *GetMediaMetaDataLibraryOptimizedForStreaming `json:"optimizedForStreaming,omitempty"`
HasThumbnail *GetMediaMetaDataHasThumbnail `default:"0" json:"hasThumbnail"`
Stream []GetMediaMetaDataStream `json:"Stream,omitempty"`
}
func (g GetMediaMetaDataPart) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(g, "", false)
}
func (g *GetMediaMetaDataPart) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &g, "", false, false); err != nil {
return err
}
return nil
}
func (o *GetMediaMetaDataPart) GetAccessible() *bool {
if o == nil {
return nil
}
return o.Accessible
}
func (o *GetMediaMetaDataPart) GetExists() *bool {
if o == nil {
return nil
}
return o.Exists
}
func (o *GetMediaMetaDataPart) GetID() int64 {
if o == nil {
return 0
}
return o.ID
}
func (o *GetMediaMetaDataPart) GetKey() *string {
if o == nil {
return nil
}
return o.Key
}
func (o *GetMediaMetaDataPart) GetIndexes() *string {
if o == nil {
return nil
}
return o.Indexes
}
func (o *GetMediaMetaDataPart) GetDuration() *int {
if o == nil {
return nil
}
return o.Duration
}
func (o *GetMediaMetaDataPart) GetFile() *string {
if o == nil {
return nil
}
return o.File
}
func (o *GetMediaMetaDataPart) GetSize() *int64 {
if o == nil {
return nil
}
return o.Size
}
func (o *GetMediaMetaDataPart) GetPacketLength() *int {
if o == nil {
return nil
}
return o.PacketLength
}
func (o *GetMediaMetaDataPart) GetContainer() *string {
if o == nil {
return nil
}
return o.Container
}
func (o *GetMediaMetaDataPart) GetVideoProfile() *string {
if o == nil {
return nil
}
return o.VideoProfile
}
func (o *GetMediaMetaDataPart) GetAudioProfile() *string {
if o == nil {
return nil
}
return o.AudioProfile
}
func (o *GetMediaMetaDataPart) GetHas64bitOffsets() *bool {
if o == nil {
return nil
}
return o.Has64bitOffsets
}
func (o *GetMediaMetaDataPart) GetOptimizedForStreaming() *GetMediaMetaDataLibraryOptimizedForStreaming {
if o == nil {
return nil
}
return o.OptimizedForStreaming
}
func (o *GetMediaMetaDataPart) GetHasThumbnail() *GetMediaMetaDataHasThumbnail {
if o == nil {
return nil
}
return o.HasThumbnail
}
func (o *GetMediaMetaDataPart) GetStream() []GetMediaMetaDataStream {
if o == nil {
return nil
}
return o.Stream
}
type GetMediaMetaDataMedia 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 *GetMediaMetaDataOptimizedForStreaming `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 []GetMediaMetaDataPart `json:"Part,omitempty"`
}
func (o *GetMediaMetaDataMedia) GetID() int64 {
if o == nil {
return 0
}
return o.ID
}
func (o *GetMediaMetaDataMedia) GetDuration() *int {
if o == nil {
return nil
}
return o.Duration
}
func (o *GetMediaMetaDataMedia) GetBitrate() *int {
if o == nil {
return nil
}
return o.Bitrate
}
func (o *GetMediaMetaDataMedia) GetWidth() *int {
if o == nil {
return nil
}
return o.Width
}
func (o *GetMediaMetaDataMedia) GetHeight() *int {
if o == nil {
return nil
}
return o.Height
}
func (o *GetMediaMetaDataMedia) GetAspectRatio() *float32 {
if o == nil {
return nil
}
return o.AspectRatio
}
func (o *GetMediaMetaDataMedia) GetAudioChannels() *int {
if o == nil {
return nil
}
return o.AudioChannels
}
func (o *GetMediaMetaDataMedia) GetDisplayOffset() *int {
if o == nil {
return nil
}
return o.DisplayOffset
}
func (o *GetMediaMetaDataMedia) GetAudioCodec() *string {
if o == nil {
return nil
}
return o.AudioCodec
}
func (o *GetMediaMetaDataMedia) GetVideoCodec() *string {
if o == nil {
return nil
}
return o.VideoCodec
}
func (o *GetMediaMetaDataMedia) GetVideoResolution() *string {
if o == nil {
return nil
}
return o.VideoResolution
}
func (o *GetMediaMetaDataMedia) GetContainer() *string {
if o == nil {
return nil
}
return o.Container
}
func (o *GetMediaMetaDataMedia) GetVideoFrameRate() *string {
if o == nil {
return nil
}
return o.VideoFrameRate
}
func (o *GetMediaMetaDataMedia) GetVideoProfile() *string {
if o == nil {
return nil
}
return o.VideoProfile
}
func (o *GetMediaMetaDataMedia) GetHasVoiceActivity() *bool {
if o == nil {
return nil
}
return o.HasVoiceActivity
}
func (o *GetMediaMetaDataMedia) GetAudioProfile() *string {
if o == nil {
return nil
}
return o.AudioProfile
}
func (o *GetMediaMetaDataMedia) GetOptimizedForStreaming() *GetMediaMetaDataOptimizedForStreaming {
if o == nil {
return nil
}
return o.OptimizedForStreaming
}
func (o *GetMediaMetaDataMedia) GetHas64bitOffsets() *bool {
if o == nil {
return nil
}
return o.Has64bitOffsets
}
func (o *GetMediaMetaDataMedia) GetPart() []GetMediaMetaDataPart {
if o == nil {
return nil
}
return o.Part
}
// GetMediaMetaDataGenre - The filter query string for similar items.
type GetMediaMetaDataGenre 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"`
Filter string `json:"filter"`
}
func (o *GetMediaMetaDataGenre) GetID() int {
if o == nil {
return 0
}
return o.ID
}
func (o *GetMediaMetaDataGenre) GetTag() string {
if o == nil {
return ""
}
return o.Tag
}
func (o *GetMediaMetaDataGenre) GetFilter() string {
if o == nil {
return ""
}
return o.Filter
}
// GetMediaMetaDataCountry - The filter query string for country media items.
type GetMediaMetaDataCountry 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 *GetMediaMetaDataCountry) GetID() int {
if o == nil {
return 0
}
return o.ID
}
func (o *GetMediaMetaDataCountry) GetTag() string {
if o == nil {
return ""
}
return o.Tag
}
func (o *GetMediaMetaDataCountry) GetFilter() string {
if o == nil {
return ""
}
return o.Filter
}
type GetMediaMetaDataDirector struct {
// Unique identifier for the director.
ID int `json:"id"`
// The role of Director
Tag string `json:"tag"`
// The filter string used to query this director.
Filter string `json:"filter"`
// 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 *GetMediaMetaDataDirector) GetID() int {
if o == nil {
return 0
}
return o.ID
}
func (o *GetMediaMetaDataDirector) GetTag() string {
if o == nil {
return ""
}
return o.Tag
}
func (o *GetMediaMetaDataDirector) GetFilter() string {
if o == nil {
return ""
}
return o.Filter
}
func (o *GetMediaMetaDataDirector) GetTagKey() string {
if o == nil {
return ""
}
return o.TagKey
}
func (o *GetMediaMetaDataDirector) GetThumb() *string {
if o == nil {
return nil
}
return o.Thumb
}
type GetMediaMetaDataWriter struct {
// Unique identifier for the writer.
ID int `json:"id"`
// The role of Writer
Tag string `json:"tag"`
// The filter string used to query this writer.
Filter string `json:"filter"`
// The absolute URL of the thumbnail image for the writer.
Thumb *string `json:"thumb,omitempty"`
// A 24-character hexadecimal unique key associated with the writers tag, used for internal identification.
TagKey *string `json:"tagKey,omitempty"`
}
func (o *GetMediaMetaDataWriter) GetID() int {
if o == nil {
return 0
}
return o.ID
}
func (o *GetMediaMetaDataWriter) GetTag() string {
if o == nil {
return ""
}
return o.Tag
}
func (o *GetMediaMetaDataWriter) GetFilter() string {
if o == nil {
return ""
}
return o.Filter
}
func (o *GetMediaMetaDataWriter) GetThumb() *string {
if o == nil {
return nil
}
return o.Thumb
}
func (o *GetMediaMetaDataWriter) GetTagKey() *string {
if o == nil {
return nil
}
return o.TagKey
}
type GetMediaMetaDataProducer struct {
// The unique role identifier.
ID int64 `json:"id"`
// The filter string for the role.
Filter string `json:"filter"`
// The actor's name.
Tag string `json:"tag"`
// A key associated with the actor tag.
TagKey string `json:"tagKey"`
// The character name or role.
Role *string `json:"role,omitempty"`
// URL for the role thumbnail image.
Thumb *string `json:"thumb,omitempty"`
}
func (o *GetMediaMetaDataProducer) GetID() int64 {
if o == nil {
return 0
}
return o.ID
}
func (o *GetMediaMetaDataProducer) GetFilter() string {
if o == nil {
return ""
}
return o.Filter
}
func (o *GetMediaMetaDataProducer) GetTag() string {
if o == nil {
return ""
}
return o.Tag
}
func (o *GetMediaMetaDataProducer) GetTagKey() string {
if o == nil {
return ""
}
return o.TagKey
}
func (o *GetMediaMetaDataProducer) GetRole() *string {
if o == nil {
return nil
}
return o.Role
}
func (o *GetMediaMetaDataProducer) GetThumb() *string {
if o == nil {
return nil
}
return o.Thumb
}
type GetMediaMetaDataRole 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 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"`
// 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 absolute URL of the thumbnail image for the actor.
Thumb *string `json:"thumb,omitempty"`
}
func (o *GetMediaMetaDataRole) GetID() int {
if o == nil {
return 0
}
return o.ID
}
func (o *GetMediaMetaDataRole) GetTag() string {
if o == nil {
return ""
}
return o.Tag
}
func (o *GetMediaMetaDataRole) GetRole() *string {
if o == nil {
return nil
}
return o.Role
}
func (o *GetMediaMetaDataRole) GetFilter() string {
if o == nil {
return ""
}
return o.Filter
}
func (o *GetMediaMetaDataRole) GetTagKey() string {
if o == nil {
return ""
}
return o.TagKey
}
func (o *GetMediaMetaDataRole) GetThumb() *string {
if o == nil {
return nil
}
return o.Thumb
}
type GetMediaMetaDataRatings struct {
// The image or reference for the rating.
Image string `json:"image"`
// The rating value.
Value float32 `json:"value"`
// The type of rating (e.g., audience, critic).
Type string `json:"type"`
}
func (o *GetMediaMetaDataRatings) GetImage() string {
if o == nil {
return ""
}
return o.Image
}
func (o *GetMediaMetaDataRatings) GetValue() float32 {
if o == nil {
return 0.0
}
return o.Value
}
func (o *GetMediaMetaDataRatings) GetType() string {
if o == nil {
return ""
}
return o.Type
}
type GetMediaMetaDataSimilar struct {
// The unique similar item identifier.
ID int64 `json:"id"`
// The filter string for similar items.
Filter string `json:"filter"`
// The tag or title of the similar content.
Tag string `json:"tag"`
}
func (o *GetMediaMetaDataSimilar) GetID() int64 {
if o == nil {
return 0
}
return o.ID
}
func (o *GetMediaMetaDataSimilar) GetFilter() string {
if o == nil {
return ""
}
return o.Filter
}
func (o *GetMediaMetaDataSimilar) GetTag() string {
if o == nil {
return ""
}
return o.Tag
}
type GetMediaMetaDataLocation struct {
// The file path for the location.
Path string `json:"path"`
}
func (o *GetMediaMetaDataLocation) GetPath() string {
if o == nil {
return ""
}
return o.Path
}
// GetMediaMetaDataChapter - The thumbnail for the chapter
type GetMediaMetaDataChapter struct {
ID int64 `json:"id"`
Filter string `json:"filter"`
Index int64 `json:"index"`
StartTimeOffset int64 `json:"startTimeOffset"`
EndTimeOffset int64 `json:"endTimeOffset"`
Thumb string `json:"thumb"`
}
func (o *GetMediaMetaDataChapter) GetID() int64 {
if o == nil {
return 0
}
return o.ID
}
func (o *GetMediaMetaDataChapter) GetFilter() string {
if o == nil {
return ""
}
return o.Filter
}
func (o *GetMediaMetaDataChapter) GetIndex() int64 {
if o == nil {
return 0
}
return o.Index
}
func (o *GetMediaMetaDataChapter) GetStartTimeOffset() int64 {
if o == nil {
return 0
}
return o.StartTimeOffset
}
func (o *GetMediaMetaDataChapter) GetEndTimeOffset() int64 {
if o == nil {
return 0
}
return o.EndTimeOffset
}
func (o *GetMediaMetaDataChapter) GetThumb() string {
if o == nil {
return ""
}
return o.Thumb
}
// GetMediaMetaDataAttributes - Attributes associated with the marker.
type GetMediaMetaDataAttributes struct {
// The identifier for the attributes.
ID int64 `json:"id"`
// The version number of the marker attributes.
Version *int64 `json:"version,omitempty"`
}
func (o *GetMediaMetaDataAttributes) GetID() int64 {
if o == nil {
return 0
}
return o.ID
}
func (o *GetMediaMetaDataAttributes) GetVersion() *int64 {
if o == nil {
return nil
}
return o.Version
}
// GetMediaMetaDataMarker - The final status of the marker
type GetMediaMetaDataMarker struct {
ID int64 `json:"id"`
Type string `json:"type"`
StartTimeOffset int64 `json:"startTimeOffset"`
EndTimeOffset int64 `json:"endTimeOffset"`
Final *bool `json:"final,omitempty"`
// Attributes associated with the marker.
Attributes *GetMediaMetaDataAttributes `json:"Attributes,omitempty"`
}
func (o *GetMediaMetaDataMarker) GetID() int64 {
if o == nil {
return 0
}
return o.ID
}
func (o *GetMediaMetaDataMarker) GetType() string {
if o == nil {
return ""
}
return o.Type
}
func (o *GetMediaMetaDataMarker) GetStartTimeOffset() int64 {
if o == nil {
return 0
}
return o.StartTimeOffset
}
func (o *GetMediaMetaDataMarker) GetEndTimeOffset() int64 {
if o == nil {
return 0
}
return o.EndTimeOffset
}
func (o *GetMediaMetaDataMarker) GetFinal() *bool {
if o == nil {
return nil
}
return o.Final
}
func (o *GetMediaMetaDataMarker) GetAttributes() *GetMediaMetaDataAttributes {
if o == nil {
return nil
}
return o.Attributes
}
type GetMediaMetaDataExtras struct {
// The size of the extras.
Size *int64 `json:"size,omitempty"`
}
func (o *GetMediaMetaDataExtras) GetSize() *int64 {
if o == nil {
return nil
}
return o.Size
}
// GetMediaMetaDataMetadata - Unknown
type GetMediaMetaDataMetadata struct {
// The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API.
RatingKey string `json:"ratingKey"`
// The unique key for the media item.
Key string `json:"key"`
// The globally unique identifier for the media item.
GUID string `json:"guid"`
// A URLfriendly version of the media title.
Slug string `json:"slug"`
// The studio that produced the media item.
Studio *string `json:"studio,omitempty"`
Type GetMediaMetaDataType `json:"type"`
// The title of the media item.
Title string `json:"title"`
// The sort title used for ordering media items.
TitleSort string `json:"titleSort"`
// The content rating for the media item.
ContentRating *string `json:"contentRating,omitempty"`
// A synopsis of the media item.
Summary string `json:"summary"`
// The critic rating for the media item.
Rating float32 `json:"rating"`
// The audience rating for the media item.
AudienceRating float64 `json:"audienceRating"`
// The release year of the media item.
Year *int `json:"year,omitempty"`
// A brief tagline for the media item.
Tagline string `json:"tagline"`
// The thumbnail image URL for the media item.
Thumb string `json:"thumb"`
// The art image URL for the media item.
Art string `json:"art"`
// The theme URL for the media item.
Theme string `json:"theme"`
// The index position of the media item.
Index int `json:"index"`
// The number of leaf items (end nodes) under this media item.
LeafCount *int `json:"leafCount,omitempty"`
// The number of leaf items that have been viewed.
ViewedLeafCount *int `json:"viewedLeafCount,omitempty"`
// The number of child items associated with this media item.
ChildCount int `json:"childCount"`
// The total number of seasons (for TV shows).
SeasonCount int `json:"seasonCount"`
// The duration of the media item in milliseconds.
Duration int `json:"duration"`
// The original release date of the media item.
OriginallyAvailableAt *types.Date `json:"originallyAvailableAt,omitempty"`
AddedAt int64 `json:"addedAt"`
// Unix epoch datetime in seconds
UpdatedAt *int64 `json:"updatedAt,omitempty"`
// The URL for the audience rating image.
AudienceRatingImage *string `json:"audienceRatingImage,omitempty"`
// The source from which chapter data is derived.
ChapterSource *string `json:"chapterSource,omitempty"`
// The primary extra key associated with this media item.
PrimaryExtraKey *string `json:"primaryExtraKey,omitempty"`
// The original title of the media item (if different).
OriginalTitle *string `json:"originalTitle,omitempty"`
// The rating key of the parent media item.
ParentRatingKey *string `json:"parentRatingKey,omitempty"`
// The rating key of the grandparent media item.
GrandparentRatingKey *string `json:"grandparentRatingKey,omitempty"`
// The GUID of the parent media item.
ParentGUID *string `json:"parentGuid,omitempty"`
// The GUID of the grandparent media item.
GrandparentGUID *string `json:"grandparentGuid,omitempty"`
// The slug for the grandparent media item.
GrandparentSlug *string `json:"grandparentSlug,omitempty"`
// The key of the grandparent media item.
GrandparentKey *string `json:"grandparentKey,omitempty"`
// The key of the parent media item.
ParentKey *string `json:"parentKey,omitempty"`
// The title of the grandparent media item.
GrandparentTitle *string `json:"grandparentTitle,omitempty"`
// The thumbnail URL for the grandparent media item.
GrandparentThumb *string `json:"grandparentThumb,omitempty"`
// The theme URL for the grandparent media item.
GrandparentTheme *string `json:"grandparentTheme,omitempty"`
// The art URL for the grandparent media item.
GrandparentArt *string `json:"grandparentArt,omitempty"`
// The title of the parent media item.
ParentTitle *string `json:"parentTitle,omitempty"`
// The index position of the parent media item.
ParentIndex *int `json:"parentIndex,omitempty"`
// The thumbnail URL for the parent media item.
ParentThumb *string `json:"parentThumb,omitempty"`
// The URL for the rating image.
RatingImage *string `json:"ratingImage,omitempty"`
// The number of times this media item has been viewed.
ViewCount *int `json:"viewCount,omitempty"`
// The current playback offset (in milliseconds).
ViewOffset *int `json:"viewOffset,omitempty"`
// The number of times this media item has been skipped.
SkipCount *int `json:"skipCount,omitempty"`
// A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip.
Subtype *string `json:"subtype,omitempty"`
// The Unix timestamp representing the last time the item was rated.
LastRatedAt *int64 `json:"lastRatedAt,omitempty"`
// The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available).
CreatedAtAccuracy *string `json:"createdAtAccuracy,omitempty"`
// The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC.
CreatedAtTZOffset *string `json:"createdAtTZOffset,omitempty"`
// Unix timestamp for when the media item was last viewed.
LastViewedAt *int `json:"lastViewedAt,omitempty"`
// The rating provided by a user for the item. This value is expressed as a decimal number.
UserRating *float32 `json:"userRating,omitempty"`
Image []GetMediaMetaDataImage `json:"Image,omitempty"`
UltraBlurColors *GetMediaMetaDataUltraBlurColors `json:"UltraBlurColors,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"`
Guids []GetMediaMetaDataGuids `json:"Guid,omitempty"`
Media []GetMediaMetaDataMedia `json:"Media,omitempty"`
Genre []GetMediaMetaDataGenre `json:"Genre,omitempty"`
Country []GetMediaMetaDataCountry `json:"Country,omitempty"`
Director []GetMediaMetaDataDirector `json:"Director,omitempty"`
Writer []GetMediaMetaDataWriter `json:"Writer,omitempty"`
Producer []GetMediaMetaDataProducer `json:"Producer,omitempty"`
Role []GetMediaMetaDataRole `json:"Role,omitempty"`
Ratings []GetMediaMetaDataRatings `json:"Rating,omitempty"`
Similar []GetMediaMetaDataSimilar `json:"Similar,omitempty"`
Location []GetMediaMetaDataLocation `json:"Location,omitempty"`
Chapter []GetMediaMetaDataChapter `json:"Chapter,omitempty"`
Marker []GetMediaMetaDataMarker `json:"Marker,omitempty"`
Extras *GetMediaMetaDataExtras `json:"Extras,omitempty"`
}
func (g GetMediaMetaDataMetadata) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(g, "", false)
}
func (g *GetMediaMetaDataMetadata) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &g, "", false, false); err != nil {
return err
}
return nil
}
func (o *GetMediaMetaDataMetadata) GetRatingKey() string {
if o == nil {
return ""
}
return o.RatingKey
}
func (o *GetMediaMetaDataMetadata) GetKey() string {
if o == nil {
return ""
}
return o.Key
}
func (o *GetMediaMetaDataMetadata) GetGUID() string {
if o == nil {
return ""
}
return o.GUID
}
func (o *GetMediaMetaDataMetadata) GetSlug() string {
if o == nil {
return ""
}
return o.Slug
}
func (o *GetMediaMetaDataMetadata) GetStudio() *string {
if o == nil {
return nil
}
return o.Studio
}
func (o *GetMediaMetaDataMetadata) GetType() GetMediaMetaDataType {
if o == nil {
return GetMediaMetaDataType("")
}
return o.Type
}
func (o *GetMediaMetaDataMetadata) GetTitle() string {
if o == nil {
return ""
}
return o.Title
}
func (o *GetMediaMetaDataMetadata) GetTitleSort() string {
if o == nil {
return ""
}
return o.TitleSort
}
func (o *GetMediaMetaDataMetadata) GetContentRating() *string {
if o == nil {
return nil
}
return o.ContentRating
}
func (o *GetMediaMetaDataMetadata) GetSummary() string {
if o == nil {
return ""
}
return o.Summary
}
func (o *GetMediaMetaDataMetadata) GetRating() float32 {
if o == nil {
return 0.0
}
return o.Rating
}
func (o *GetMediaMetaDataMetadata) GetAudienceRating() float64 {
if o == nil {
return 0.0
}
return o.AudienceRating
}
func (o *GetMediaMetaDataMetadata) GetYear() *int {
if o == nil {
return nil
}
return o.Year
}
func (o *GetMediaMetaDataMetadata) GetTagline() string {
if o == nil {
return ""
}
return o.Tagline
}
func (o *GetMediaMetaDataMetadata) GetThumb() string {
if o == nil {
return ""
}
return o.Thumb
}
func (o *GetMediaMetaDataMetadata) GetArt() string {
if o == nil {
return ""
}
return o.Art
}
func (o *GetMediaMetaDataMetadata) GetTheme() string {
if o == nil {
return ""
}
return o.Theme
}
func (o *GetMediaMetaDataMetadata) GetIndex() int {
if o == nil {
return 0
}
return o.Index
}
func (o *GetMediaMetaDataMetadata) GetLeafCount() *int {
if o == nil {
return nil
}
return o.LeafCount
}
func (o *GetMediaMetaDataMetadata) GetViewedLeafCount() *int {
if o == nil {
return nil
}
return o.ViewedLeafCount
}
func (o *GetMediaMetaDataMetadata) GetChildCount() int {
if o == nil {
return 0
}
return o.ChildCount
}
func (o *GetMediaMetaDataMetadata) GetSeasonCount() int {
if o == nil {
return 0
}
return o.SeasonCount
}
func (o *GetMediaMetaDataMetadata) GetDuration() int {
if o == nil {
return 0
}
return o.Duration
}
func (o *GetMediaMetaDataMetadata) GetOriginallyAvailableAt() *types.Date {
if o == nil {
return nil
}
return o.OriginallyAvailableAt
}
func (o *GetMediaMetaDataMetadata) GetAddedAt() int64 {
if o == nil {
return 0
}
return o.AddedAt
}
func (o *GetMediaMetaDataMetadata) GetUpdatedAt() *int64 {
if o == nil {
return nil
}
return o.UpdatedAt
}
func (o *GetMediaMetaDataMetadata) GetAudienceRatingImage() *string {
if o == nil {
return nil
}
return o.AudienceRatingImage
}
func (o *GetMediaMetaDataMetadata) GetChapterSource() *string {
if o == nil {
return nil
}
return o.ChapterSource
}
func (o *GetMediaMetaDataMetadata) GetPrimaryExtraKey() *string {
if o == nil {
return nil
}
return o.PrimaryExtraKey
}
func (o *GetMediaMetaDataMetadata) GetOriginalTitle() *string {
if o == nil {
return nil
}
return o.OriginalTitle
}
func (o *GetMediaMetaDataMetadata) GetParentRatingKey() *string {
if o == nil {
return nil
}
return o.ParentRatingKey
}
func (o *GetMediaMetaDataMetadata) GetGrandparentRatingKey() *string {
if o == nil {
return nil
}
return o.GrandparentRatingKey
}
func (o *GetMediaMetaDataMetadata) GetParentGUID() *string {
if o == nil {
return nil
}
return o.ParentGUID
}
func (o *GetMediaMetaDataMetadata) GetGrandparentGUID() *string {
if o == nil {
return nil
}
return o.GrandparentGUID
}
func (o *GetMediaMetaDataMetadata) GetGrandparentSlug() *string {
if o == nil {
return nil
}
return o.GrandparentSlug
}
func (o *GetMediaMetaDataMetadata) GetGrandparentKey() *string {
if o == nil {
return nil
}
return o.GrandparentKey
}
func (o *GetMediaMetaDataMetadata) GetParentKey() *string {
if o == nil {
return nil
}
return o.ParentKey
}
func (o *GetMediaMetaDataMetadata) GetGrandparentTitle() *string {
if o == nil {
return nil
}
return o.GrandparentTitle
}
func (o *GetMediaMetaDataMetadata) GetGrandparentThumb() *string {
if o == nil {
return nil
}
return o.GrandparentThumb
}
func (o *GetMediaMetaDataMetadata) GetGrandparentTheme() *string {
if o == nil {
return nil
}
return o.GrandparentTheme
}
func (o *GetMediaMetaDataMetadata) GetGrandparentArt() *string {
if o == nil {
return nil
}
return o.GrandparentArt
}
func (o *GetMediaMetaDataMetadata) GetParentTitle() *string {
if o == nil {
return nil
}
return o.ParentTitle
}
func (o *GetMediaMetaDataMetadata) GetParentIndex() *int {
if o == nil {
return nil
}
return o.ParentIndex
}
func (o *GetMediaMetaDataMetadata) GetParentThumb() *string {
if o == nil {
return nil
}
return o.ParentThumb
}
func (o *GetMediaMetaDataMetadata) GetRatingImage() *string {
if o == nil {
return nil
}
return o.RatingImage
}
func (o *GetMediaMetaDataMetadata) GetViewCount() *int {
if o == nil {
return nil
}
return o.ViewCount
}
func (o *GetMediaMetaDataMetadata) GetViewOffset() *int {
if o == nil {
return nil
}
return o.ViewOffset
}
func (o *GetMediaMetaDataMetadata) GetSkipCount() *int {
if o == nil {
return nil
}
return o.SkipCount
}
func (o *GetMediaMetaDataMetadata) GetSubtype() *string {
if o == nil {
return nil
}
return o.Subtype
}
func (o *GetMediaMetaDataMetadata) GetLastRatedAt() *int64 {
if o == nil {
return nil
}
return o.LastRatedAt
}
func (o *GetMediaMetaDataMetadata) GetCreatedAtAccuracy() *string {
if o == nil {
return nil
}
return o.CreatedAtAccuracy
}
func (o *GetMediaMetaDataMetadata) GetCreatedAtTZOffset() *string {
if o == nil {
return nil
}
return o.CreatedAtTZOffset
}
func (o *GetMediaMetaDataMetadata) GetLastViewedAt() *int {
if o == nil {
return nil
}
return o.LastViewedAt
}
func (o *GetMediaMetaDataMetadata) GetUserRating() *float32 {
if o == nil {
return nil
}
return o.UserRating
}
func (o *GetMediaMetaDataMetadata) GetImage() []GetMediaMetaDataImage {
if o == nil {
return nil
}
return o.Image
}
func (o *GetMediaMetaDataMetadata) GetUltraBlurColors() *GetMediaMetaDataUltraBlurColors {
if o == nil {
return nil
}
return o.UltraBlurColors
}
func (o *GetMediaMetaDataMetadata) GetLibrarySectionID() *int64 {
if o == nil {
return nil
}
return o.LibrarySectionID
}
func (o *GetMediaMetaDataMetadata) GetLibrarySectionTitle() *string {
if o == nil {
return nil
}
return o.LibrarySectionTitle
}
func (o *GetMediaMetaDataMetadata) GetLibrarySectionKey() *string {
if o == nil {
return nil
}
return o.LibrarySectionKey
}
func (o *GetMediaMetaDataMetadata) GetGuids() []GetMediaMetaDataGuids {
if o == nil {
return nil
}
return o.Guids
}
func (o *GetMediaMetaDataMetadata) GetMedia() []GetMediaMetaDataMedia {
if o == nil {
return nil
}
return o.Media
}
func (o *GetMediaMetaDataMetadata) GetGenre() []GetMediaMetaDataGenre {
if o == nil {
return nil
}
return o.Genre
}
func (o *GetMediaMetaDataMetadata) GetCountry() []GetMediaMetaDataCountry {
if o == nil {
return nil
}
return o.Country
}
func (o *GetMediaMetaDataMetadata) GetDirector() []GetMediaMetaDataDirector {
if o == nil {
return nil
}
return o.Director
}
func (o *GetMediaMetaDataMetadata) GetWriter() []GetMediaMetaDataWriter {
if o == nil {
return nil
}
return o.Writer
}
func (o *GetMediaMetaDataMetadata) GetProducer() []GetMediaMetaDataProducer {
if o == nil {
return nil
}
return o.Producer
}
func (o *GetMediaMetaDataMetadata) GetRole() []GetMediaMetaDataRole {
if o == nil {
return nil
}
return o.Role
}
func (o *GetMediaMetaDataMetadata) GetRatings() []GetMediaMetaDataRatings {
if o == nil {
return nil
}
return o.Ratings
}
func (o *GetMediaMetaDataMetadata) GetSimilar() []GetMediaMetaDataSimilar {
if o == nil {
return nil
}
return o.Similar
}
func (o *GetMediaMetaDataMetadata) GetLocation() []GetMediaMetaDataLocation {
if o == nil {
return nil
}
return o.Location
}
func (o *GetMediaMetaDataMetadata) GetChapter() []GetMediaMetaDataChapter {
if o == nil {
return nil
}
return o.Chapter
}
func (o *GetMediaMetaDataMetadata) GetMarker() []GetMediaMetaDataMarker {
if o == nil {
return nil
}
return o.Marker
}
func (o *GetMediaMetaDataMetadata) GetExtras() *GetMediaMetaDataExtras {
if o == nil {
return nil
}
return o.Extras
}
type GetMediaMetaDataMediaContainer 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"`
// An array of metadata items.
Metadata []GetMediaMetaDataMetadata `json:"Metadata"`
}
func (o *GetMediaMetaDataMediaContainer) GetSize() int {
if o == nil {
return 0
}
return o.Size
}
func (o *GetMediaMetaDataMediaContainer) GetAllowSync() bool {
if o == nil {
return false
}
return o.AllowSync
}
func (o *GetMediaMetaDataMediaContainer) GetIdentifier() string {
if o == nil {
return ""
}
return o.Identifier
}
func (o *GetMediaMetaDataMediaContainer) GetLibrarySectionID() *int64 {
if o == nil {
return nil
}
return o.LibrarySectionID
}
func (o *GetMediaMetaDataMediaContainer) GetLibrarySectionTitle() *string {
if o == nil {
return nil
}
return o.LibrarySectionTitle
}
func (o *GetMediaMetaDataMediaContainer) GetLibrarySectionUUID() *string {
if o == nil {
return nil
}
return o.LibrarySectionUUID
}
func (o *GetMediaMetaDataMediaContainer) GetMediaTagPrefix() string {
if o == nil {
return ""
}
return o.MediaTagPrefix
}
func (o *GetMediaMetaDataMediaContainer) GetMediaTagVersion() int64 {
if o == nil {
return 0
}
return o.MediaTagVersion
}
func (o *GetMediaMetaDataMediaContainer) GetMetadata() []GetMediaMetaDataMetadata {
if o == nil {
return []GetMediaMetaDataMetadata{}
}
return o.Metadata
}
// GetMediaMetaDataResponseBody - The metadata of the library item.
type GetMediaMetaDataResponseBody struct {
MediaContainer *GetMediaMetaDataMediaContainer `json:"MediaContainer,omitempty"`
}
func (o *GetMediaMetaDataResponseBody) GetMediaContainer() *GetMediaMetaDataMediaContainer {
if o == nil {
return nil
}
return o.MediaContainer
}
type GetMediaMetaDataResponse 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 metadata of the library item.
Object *GetMediaMetaDataResponseBody
}
func (o *GetMediaMetaDataResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *GetMediaMetaDataResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *GetMediaMetaDataResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *GetMediaMetaDataResponse) GetObject() *GetMediaMetaDataResponseBody {
if o == nil {
return nil
}
return o.Object
}