## Go SDK Changes Detected:

* `PlexApi.Butler.StartTask()`: 
  *  `request` **Changed** **Breaking** ⚠️
  *  `error` **Changed** **Breaking** ⚠️
* `PlexApi.Butler.StopTask()`: 
  *  `request` **Changed** **Breaking** ⚠️
  *  `error` **Changed** **Breaking** ⚠️
* `PlexApi.Updater.ApplyUpdates()`: 
  *  `request` **Changed** **Breaking** ⚠️
  *  `error` **Changed** **Breaking** ⚠️
* `PlexApi.General.GetServerInfo()`: **Added**
* `PlexApi.General.GetIdentity()`: **Added**
* `PlexApi.General.GetSourceConnectionInformation()`: **Added**
* `PlexApi.General.GetTransientToken()`: **Added**
* `PlexApi.Events.GetNotifications()`: **Added**
* `PlexApi.Events.ConnectWebSocket()`: **Added**
* `PlexApi.Preferences.GetAllPreferences()`: **Added**
* `PlexApi.Preferences.SetPreferences()`: **Added**
* `PlexApi.Preferences.GetPreference()`: **Added**
* `PlexApi.Rate.SetRating()`: **Added**
* `PlexApi.Timeline.MarkPlayed()`: **Added**
* `PlexApi.Timeline.Report()`: **Added**
* `PlexApi.Timeline.Unscrobble()`: **Added**
* `PlexApi.Activities.ListActivities()`: **Added**
* `PlexApi.Activities.CancelActivity()`: **Added**
* `PlexApi.Butler.StopTasks()`: **Added**
* `PlexApi.Butler.GetTasks()`: **Added**
* `PlexApi.Butler.StartTasks()`: **Added**
* `PlexApi.DownloadQueue.CreateDownloadQueue()`: **Added**
* `PlexApi.DownloadQueue.GetDownloadQueue()`: **Added**
* `PlexApi.DownloadQueue.AddDownloadQueueItems()`: **Added**
* `PlexApi.DownloadQueue.ListDownloadQueueItems()`: **Added**
* `PlexApi.DownloadQueue.GetItemDecision()`: **Added**
* `PlexApi.DownloadQueue.GetDownloadQueueMedia()`: **Added**
* `PlexApi.DownloadQueue.RemoveDownloadQueueItems()`: **Added**
* `PlexApi.DownloadQueue.GetDownloadQueueItems()`: **Added**
* `PlexApi.DownloadQueue.RestartProcessingDownloadQueueItems()`: **Added**
* `PlexApi.Hubs.GetAllHubs()`: **Added**
* `PlexApi.Hubs.GetContinueWatching()`: **Added**
* `PlexApi.Hubs.GetHubItems()`: **Added**
* `PlexApi.Hubs.GetPromotedHubs()`: **Added**
* `PlexApi.Hubs.GetMetadataHubs()`: **Added**
* `PlexApi.Hubs.GetPostplayHubs()`: **Added**
* `PlexApi.Hubs.GetRelatedHubs()`: **Added**
* `PlexApi.Hubs.GetSectionHubs()`: **Added**
* `PlexApi.Hubs.ResetSectionDefaults()`: **Added**
* `PlexApi.Hubs.ListHubs()`: **Added**
* `PlexApi.Hubs.CreateCustomHub()`: **Added**
* `PlexApi.Hubs.MoveHub()`: **Added**
* `PlexApi.Hubs.DeleteCustomHub()`: **Added**
* `PlexApi.Hubs.UpdateHubVisibility()`: **Added**
* `PlexApi.Search.SearchHubs()`: **Added**
* `PlexApi.Search.VoiceSearchHubs()`: **Added**
* `PlexApi.Library.GetLibraryItems()`: **Added**
* `PlexApi.Library.DeleteCaches()`: **Added**
* `PlexApi.Library.CleanBundles()`: **Added**
* `PlexApi.Library.IngestTransientItem()`: **Added**
* `PlexApi.Library.GetLibraryMatches()`: **Added**
* `PlexApi.Library.OptimizeDatabase()`: **Added**
* `PlexApi.Library.GetRandomArtwork()`: **Added**
* `PlexApi.Library.GetSections()`: **Added**
* `PlexApi.Library.AddSection()`: **Added**
* `PlexApi.Library.StopAllRefreshes()`: **Added**
* `PlexApi.Library.GetSectionsPrefs()`: **Added**
* `PlexApi.Library.RefreshSectionsMetadata()`: **Added**
* `PlexApi.Library.GetTags()`: **Added**
* `PlexApi.Library.DeleteMetadataItem()`: **Added**
* `PlexApi.Library.EditMetadataItem()`: **Added**
* `PlexApi.Library.DetectAds()`: **Added**
* `PlexApi.Library.GetAllItemLeaves()`: **Added**
* `PlexApi.Library.AnalyzeMetadata()`: **Added**
* `PlexApi.Library.GenerateThumbs()`: **Added**
* `PlexApi.Library.DetectCredits()`: **Added**
* `PlexApi.Library.GetExtras()`: **Added**
* `PlexApi.Library.AddExtras()`: **Added**
* `PlexApi.Library.GetFile()`: **Added**
* `PlexApi.Library.StartBifGeneration()`: **Added**
* `PlexApi.Library.DetectIntros()`: **Added**
* `PlexApi.Library.CreateMarker()`: **Added**
* `PlexApi.Library.MatchItem()`: **Added**
* `PlexApi.Library.ListMatches()`: **Added**
* `PlexApi.Library.MergeItems()`: **Added**
* `PlexApi.Library.ListSonicallySimilar()`: **Added**
* `PlexApi.Library.SetItemPreferences()`: **Added**
* `PlexApi.Library.RefreshItemsMetadata()`: **Added**
* `PlexApi.Library.GetRelatedItems()`: **Added**
* `PlexApi.Library.ListSimilar()`: **Added**
* `PlexApi.Library.SplitItem()`: **Added**
* `PlexApi.Library.AddSubtitles()`: **Added**
* `PlexApi.Library.GetItemTree()`: **Added**
* `PlexApi.Library.Unmatch()`: **Added**
* `PlexApi.Library.ListTopUsers()`: **Added**
* `PlexApi.Library.DetectVoiceActivity()`: **Added**
* `PlexApi.Library.GetAugmentationStatus()`: **Added**
* `PlexApi.Library.SetStreamSelection()`: **Added**
* `PlexApi.Library.GetPerson()`: **Added**
* `PlexApi.Library.ListPersonMedia()`: **Added**
* `PlexApi.Library.DeleteLibrarySection()`: **Added**
* `PlexApi.Library.GetLibraryDetails()`: **Added**
* `PlexApi.Library.EditSection()`: **Added**
* `PlexApi.Library.UpdateItems()`: **Added**
* `PlexApi.Library.StartAnalysis()`: **Added**
* `PlexApi.Library.Autocomplete()`: **Added**
* `PlexApi.Library.GetCollections()`: **Added**
* `PlexApi.Library.GetCommon()`: **Added**
* `PlexApi.Library.EmptyTrash()`: **Added**
* `PlexApi.Library.GetSectionFilters()`: **Added**
* `PlexApi.Library.GetFirstCharacters()`: **Added**
* `PlexApi.Library.DeleteIndexes()`: **Added**
* `PlexApi.Library.DeleteIntros()`: **Added**
* `PlexApi.Library.GetSectionPreferences()`: **Added**
* `PlexApi.Library.SetSectionPreferences()`: **Added**
* `PlexApi.Library.CancelRefresh()`: **Added**
* `PlexApi.Library.RefreshSection()`: **Added**
* `PlexApi.Library.GetAvailableSorts()`: **Added**
* `PlexApi.Library.GetStreamLevels()`: **Added**
* `PlexApi.Library.GetStreamLoudness()`: **Added**
* `PlexApi.Library.GetChapterImage()`: **Added**
* `PlexApi.Library.SetItemArtwork()`: **Added**
* `PlexApi.Library.UpdateItemArtwork()`: **Added**
* `PlexApi.Library.DeleteMarker()`: **Added**
* `PlexApi.Library.EditMarker()`: **Added**
* `PlexApi.Library.DeleteMediaItem()`: **Added**
* `PlexApi.Library.GetPartIndex()`: **Added**
* `PlexApi.Library.DeleteCollection()`: **Added**
* `PlexApi.Library.GetSectionImage()`: **Added**
* `PlexApi.Library.DeleteStream()`: **Added**
* `PlexApi.Library.GetStream()`: **Added**
* `PlexApi.Library.SetStreamOffset()`: **Added**
* `PlexApi.Library.GetItemArtwork()`: **Added**
* `PlexApi.Library.GetMediaPart()`: **Added**
* `PlexApi.Library.GetImageFromBif()`: **Added**
* `PlexApi.Collections.CreateCollection()`: **Added**
* `PlexApi.DvRs.ListDvRs()`: **Added**
* `PlexApi.DvRs.CreateDvr()`: **Added**
* `PlexApi.DvRs.DeleteDvr()`: **Added**
* `PlexApi.DvRs.GetDvr()`: **Added**
* `PlexApi.DvRs.DeleteLineup()`: **Added**
* `PlexApi.DvRs.AddLineup()`: **Added**
* `PlexApi.DvRs.SetDvrPreferences()`: **Added**
* `PlexApi.DvRs.StopDvrReload()`: **Added**
* `PlexApi.DvRs.ReloadGuide()`: **Added**
* `PlexApi.DvRs.TuneChannel()`: **Added**
* `PlexApi.DvRs.RemoveDeviceFromDvr()`: **Added**
* `PlexApi.DvRs.AddDeviceToDvr()`: **Added**
* `PlexApi.Epg.ComputeChannelMap()`: **Added**
* `PlexApi.Epg.GetChannels()`: **Added**
* `PlexApi.Epg.GetCountries()`: **Added**
* `PlexApi.Epg.GetAllLanguages()`: **Added**
* `PlexApi.Epg.GetLineup()`: **Added**
* `PlexApi.Epg.GetLineupChannels()`: **Added**
* `PlexApi.Epg.GetCountriesLineups()`: **Added**
* `PlexApi.Epg.GetCountryRegions()`: **Added**
* `PlexApi.Epg.ListLineups()`: **Added**
* `PlexApi.LiveTv.GetSessions()`: **Added**
* `PlexApi.LiveTv.GetLiveTvSession()`: **Added**
* `PlexApi.LiveTv.GetSessionPlaylistIndex()`: **Added**
* `PlexApi.LiveTv.GetSessionSegment()`: **Added**
* `PlexApi.Log.WriteLog()`: **Added**
* `PlexApi.Log.WriteMessage()`: **Added**
* `PlexApi.Log.EnablePapertrail()`: **Added**
* `PlexApi.Devices.GetAvailableGrabbers()`: **Added**
* `PlexApi.Devices.ListDevices()`: **Added**
* `PlexApi.Devices.AddDevice()`: **Added**
* `PlexApi.Devices.DiscoverDevices()`: **Added**
* `PlexApi.Devices.RemoveDevice()`: **Added**
* `PlexApi.Devices.GetDeviceDetails()`: **Added**
* `PlexApi.Devices.ModifyDevice()`: **Added**
* `PlexApi.Devices.SetChannelmap()`: **Added**
* `PlexApi.Devices.GetDevicesChannels()`: **Added**
* `PlexApi.Devices.SetDevicePreferences()`: **Added**
* `PlexApi.Devices.StopScan()`: **Added**
* `PlexApi.Devices.Scan()`: **Added**
* `PlexApi.Devices.GetThumb()`: **Added**
* `PlexApi.Provider.ListProviders()`: **Added**
* `PlexApi.Provider.AddProvider()`: **Added**
* `PlexApi.Provider.RefreshProviders()`: **Added**
* `PlexApi.Provider.DeleteMediaProvider()`: **Added**
* `PlexApi.Subscriptions.GetAllSubscriptions()`: **Added**
* `PlexApi.Subscriptions.CreateSubscription()`: **Added**
* `PlexApi.Subscriptions.ProcessSubscriptions()`: **Added**
* `PlexApi.Subscriptions.GetScheduledRecordings()`: **Added**
* `PlexApi.Subscriptions.GetTemplate()`: **Added**
* `PlexApi.Subscriptions.CancelGrab()`: **Added**
* `PlexApi.Subscriptions.DeleteSubscription()`: **Added**
* `PlexApi.Subscriptions.GetSubscription()`: **Added**
* `PlexApi.Subscriptions.EditSubscriptionPreferences()`: **Added**
* `PlexApi.Subscriptions.ReorderSubscription()`: **Added**
* `PlexApi.Transcoder.TranscodeImage()`: **Added**
* `PlexApi.Transcoder.MakeDecision()`: **Added**
* `PlexApi.Transcoder.TriggerFallback()`: **Added**
* `PlexApi.Transcoder.TranscodeSubtitles()`: **Added**
* `PlexApi.Transcoder.StartTranscodeSession()`: **Added**
* `PlexApi.Playlist.ListPlaylists()`: **Added**
* `PlexApi.Playlist.GetPlaylist()`: **Added**
* `PlexApi.Playlist.GetPlaylistItems()`: **Added**
* `PlexApi.LibraryPlaylists.CreatePlaylist()`: **Added**
* `PlexApi.LibraryPlaylists.UploadPlaylist()`: **Added**
* `PlexApi.LibraryPlaylists.DeletePlaylist()`: **Added**
* `PlexApi.LibraryPlaylists.UpdatePlaylist()`: **Added**
* `PlexApi.LibraryPlaylists.GetPlaylistGenerators()`: **Added**
* `PlexApi.LibraryPlaylists.ClearPlaylistItems()`: **Added**
* `PlexApi.LibraryPlaylists.AddPlaylistItems()`: **Added**
* `PlexApi.LibraryPlaylists.DeletePlaylistItem()`: **Added**
* `PlexApi.LibraryPlaylists.GetPlaylistGenerator()`: **Added**
* `PlexApi.LibraryPlaylists.ModifyPlaylistGenerator()`: **Added**
* `PlexApi.LibraryPlaylists.GetPlaylistGeneratorItems()`: **Added**
* `PlexApi.LibraryPlaylists.MovePlaylistItem()`: **Added**
* `PlexApi.LibraryPlaylists.RefreshPlaylist()`: **Added**
* `PlexApi.PlayQueue.CreatePlayQueue()`: **Added**
* `PlexApi.PlayQueue.GetPlayQueue()`: **Added**
* `PlexApi.PlayQueue.AddToPlayQueue()`: **Added**
* `PlexApi.PlayQueue.ClearPlayQueue()`: **Added**
* `PlexApi.PlayQueue.ResetPlayQueue()`: **Added**
* `PlexApi.PlayQueue.Shuffle()`: **Added**
* `PlexApi.PlayQueue.Unshuffle()`: **Added**
* `PlexApi.PlayQueue.DeletePlayQueueItem()`: **Added**
* `PlexApi.PlayQueue.MovePlayQueueItem()`: **Added**
* `PlexApi.UltraBlur.GetColors()`: **Added**
* `PlexApi.UltraBlur.GetImage()`: **Added**
* `PlexApi.Status.ListSessions()`: **Added**
* `PlexApi.Status.GetBackgroundTasks()`: **Added**
* `PlexApi.Status.ListPlaybackHistory()`: **Added**
* `PlexApi.Status.TerminateSession()`: **Added**
* `PlexApi.Status.DeleteHistory()`: **Added**
* `PlexApi.Status.GetHistoryItem()`: **Added**
* `PlexApi.Updater.CheckUpdates()`: **Added**
* `PlexApi.Updater.GetUpdatesStatus()`: **Added**
* `PlexApi.Content.GetCollectionItems()`: **Added**
* `PlexApi.Content.GetMetadataItem()`: **Added**
* `PlexApi.Content.GetAlbums()`: **Added**
* `PlexApi.Content.ListContent()`: **Added**
* `PlexApi.Content.GetAllLeaves()`: **Added**
* `PlexApi.Content.GetArts()`: **Added**
* `PlexApi.Content.GetCategories()`: **Added**
* `PlexApi.Content.GetCluster()`: **Added**
* `PlexApi.Content.GetSonicPath()`: **Added**
* `PlexApi.Content.GetFolders()`: **Added**
* `PlexApi.Content.ListMoments()`: **Added**
* `PlexApi.Content.GetSonicallySimilar()`: **Added**
* `PlexApi.Content.GetCollectionImage()`: **Added**
* `PlexApi.LibraryCollections.AddCollectionItems()`: **Added**
* `PlexApi.LibraryCollections.DeleteCollectionItem()`: **Added**
* `PlexApi.LibraryCollections.MoveCollectionItem()`: **Added**
* `PlexApi.Server.GetServerCapabilities()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Server.GetServerPreferences()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Server.GetAvailableClients()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Server.GetDevices()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Server.Get-Server-Identity()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Server.GetMyPlexAccount()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Server.GetResizedPhoto()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Server.Get-Media-Providers()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Server.GetServerList()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Media.MarkPlayed()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Media.MarkUnplayed()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Media.UpdatePlayProgress()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Media.Get-Banner-Image()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Media.Get-Thumb-Image()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Video.GetTimeline()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Video.StartUniversalTranscode()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Activities.GetServerActivities()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Activities.CancelServerActivities()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Butler.GetButlerTasks()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Butler.StartAllTasks()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Butler.StopAllTasks()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Plex.GetCompanionsData()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Plex.GetUserFriends()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Plex.GetGeoData()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Plex.GetHomeData()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Plex.Get-Server-Resources()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Plex.GetPin()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Plex.GetTokenByPinId()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Hubs.GetGlobalHubs()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Hubs.Get-Recently-Added()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Hubs.GetLibraryHubs()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Search.PerformSearch()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Search.PerformVoiceSearch()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Search.GetSearchResults()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Library.GetFileHash()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Library.Get-Recently-Added-Library()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Library.Get-All-Libraries()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Library.Get-Library-Details()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Library.DeleteLibrary()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Library.Get-Library-Items()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Library.Get-Library-Sections-All()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Library.Get-Refresh-Library-Metadata()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Library.Get-Search-Library()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Library.Get-Genres-Library()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Library.Get-Countries-Library()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Library.Get-Actors-Library()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Library.Get-Search-All-Libraries()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Library.Get-Media-Meta-Data()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Library.Get-Media-Arts()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Library.Post-Media-Arts()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Library.Get-Media-Posters()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Library.Post-Media-Poster()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Library.GetMetadataChildren()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Library.GetTopWatchedContent()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Watchlist.Get-Watch-List()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Log.LogLine()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Log.LogMultiLine()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Log.EnablePaperTrail()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Playlists.CreatePlaylist()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Playlists.GetPlaylists()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Playlists.GetPlaylist()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Playlists.DeletePlaylist()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Playlists.UpdatePlaylist()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Playlists.GetPlaylistContents()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Playlists.ClearPlaylistContents()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Playlists.AddPlaylistContents()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Playlists.UploadPlaylist()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Authentication.GetTransientToken()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Authentication.GetSourceConnectionInformation()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Authentication.GetTokenDetails()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Authentication.Post-Users-Sign-In-Data()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Statistics.GetStatistics()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Statistics.GetResourcesStatistics()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Statistics.GetBandwidthStatistics()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Sessions.GetSessions()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Sessions.GetSessionHistory()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Sessions.GetTranscodeSessions()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Sessions.StopTranscodeSession()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Updater.GetUpdateStatus()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Updater.CheckForUpdates()`: **Deleted** **Breaking** ⚠️
* `PlexApi.Users.Get-Users()`: **Deleted** **Breaking** ⚠️
This commit is contained in:
speakeasybot
2025-10-12 05:54:12 +00:00
parent b6e4544107
commit 37988d5081
2381 changed files with 178859 additions and 73528 deletions

View File

@@ -0,0 +1,34 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
import (
"encoding/json"
"fmt"
)
type Accepts string
const (
AcceptsApplicationJSON Accepts = "application/json"
AcceptsApplicationXML Accepts = "application/xml"
)
func (e Accepts) ToPointer() *Accepts {
return &e
}
func (e *Accepts) UnmarshalJSON(data []byte) error {
var v string
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case "application/json":
fallthrough
case "application/xml":
*e = Accepts(v)
return nil
default:
return fmt.Errorf("invalid value for Accepts: %v", v)
}
}

View File

@@ -0,0 +1,37 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
import (
"encoding/json"
"fmt"
)
type AdvancedSubtitles string
const (
AdvancedSubtitlesBurn AdvancedSubtitles = "burn"
AdvancedSubtitlesText AdvancedSubtitles = "text"
AdvancedSubtitlesUnknown AdvancedSubtitles = "unknown"
)
func (e AdvancedSubtitles) ToPointer() *AdvancedSubtitles {
return &e
}
func (e *AdvancedSubtitles) UnmarshalJSON(data []byte) error {
var v string
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case "burn":
fallthrough
case "text":
fallthrough
case "unknown":
*e = AdvancedSubtitles(v)
return nil
default:
return fmt.Errorf("invalid value for AdvancedSubtitles: %v", v)
}
}

View File

@@ -0,0 +1,34 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
import (
"encoding/json"
"fmt"
)
type BoolInt int64
const (
BoolIntZero BoolInt = 0
BoolIntOne BoolInt = 1
)
func (e BoolInt) ToPointer() *BoolInt {
return &e
}
func (e *BoolInt) UnmarshalJSON(data []byte) error {
var v int64
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case 0:
fallthrough
case 1:
*e = BoolInt(v)
return nil
default:
return fmt.Errorf("invalid value for BoolInt: %v", v)
}
}

View File

@@ -0,0 +1,70 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
type Channel struct {
Title *string `json:"title,omitempty"`
CallSign *string `json:"callSign,omitempty"`
ChannelVcn *string `json:"channelVcn,omitempty"`
Hd *bool `json:"hd,omitempty"`
Identifier *string `json:"identifier,omitempty"`
Key *string `json:"key,omitempty"`
Language *string `json:"language,omitempty"`
Thumb *string `json:"thumb,omitempty"`
}
func (c *Channel) GetTitle() *string {
if c == nil {
return nil
}
return c.Title
}
func (c *Channel) GetCallSign() *string {
if c == nil {
return nil
}
return c.CallSign
}
func (c *Channel) GetChannelVcn() *string {
if c == nil {
return nil
}
return c.ChannelVcn
}
func (c *Channel) GetHd() *bool {
if c == nil {
return nil
}
return c.Hd
}
func (c *Channel) GetIdentifier() *string {
if c == nil {
return nil
}
return c.Identifier
}
func (c *Channel) GetKey() *string {
if c == nil {
return nil
}
return c.Key
}
func (c *Channel) GetLanguage() *string {
if c == nil {
return nil
}
return c.Language
}
func (c *Channel) GetThumb() *string {
if c == nil {
return nil
}
return c.Thumb
}

View File

@@ -0,0 +1,38 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
type ChannelMapping struct {
ChannelKey *string `json:"channelKey,omitempty"`
DeviceIdentifier *string `json:"deviceIdentifier,omitempty"`
Enabled *string `json:"enabled,omitempty"`
LineupIdentifier *string `json:"lineupIdentifier,omitempty"`
}
func (c *ChannelMapping) GetChannelKey() *string {
if c == nil {
return nil
}
return c.ChannelKey
}
func (c *ChannelMapping) GetDeviceIdentifier() *string {
if c == nil {
return nil
}
return c.DeviceIdentifier
}
func (c *ChannelMapping) GetEnabled() *string {
if c == nil {
return nil
}
return c.Enabled
}
func (c *ChannelMapping) GetLineupIdentifier() *string {
if c == nil {
return nil
}
return c.LineupIdentifier
}

View File

@@ -0,0 +1,194 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
import (
"encoding/json"
"fmt"
)
// Format - The image type
type Format string
const (
FormatJpg Format = "jpg"
FormatPng Format = "png"
)
func (e Format) ToPointer() *Format {
return &e
}
func (e *Format) UnmarshalJSON(data []byte) error {
var v string
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case "jpg":
fallthrough
case "png":
*e = Format(v)
return nil
default:
return fmt.Errorf("invalid value for Format: %v", v)
}
}
// Crop - Where to crop source images to fit into composite image proportions
type Crop string
const (
CropCenter Crop = "center"
CropTop Crop = "top"
)
func (e Crop) ToPointer() *Crop {
return &e
}
func (e *Crop) UnmarshalJSON(data []byte) error {
var v string
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case "center":
fallthrough
case "top":
*e = Crop(v)
return nil
default:
return fmt.Errorf("invalid value for Crop: %v", v)
}
}
// CompositeMedia - The default image type to use as the sources
type CompositeMedia string
const (
CompositeMediaThumb CompositeMedia = "thumb"
CompositeMediaArt CompositeMedia = "art"
CompositeMediaBanner CompositeMedia = "banner"
)
func (e CompositeMedia) ToPointer() *CompositeMedia {
return &e
}
func (e *CompositeMedia) UnmarshalJSON(data []byte) error {
var v string
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case "thumb":
fallthrough
case "art":
fallthrough
case "banner":
*e = CompositeMedia(v)
return nil
default:
return fmt.Errorf("invalid value for CompositeMedia: %v", v)
}
}
type Composite struct {
// Limit composite to specified metadata types
Type *int64 `queryParam:"name=type"`
// The image type
Format *Format `queryParam:"name=format"`
// 6 character hex RGB value for background color for image
BackgroundColor *string `queryParam:"name=backgroundColor"`
// The width of the intra-image border
Border *int64 `queryParam:"name=border"`
// Number of columns to construct in the composite image
Cols *int64 `queryParam:"name=cols"`
// Where to crop source images to fit into composite image proportions
Crop *Crop `queryParam:"name=crop"`
// The height of the image
Height *int64 `queryParam:"name=height"`
// The default image type to use as the sources
Media *CompositeMedia `queryParam:"name=media"`
// Allow repetion of images if there are not enough source images to fill grid
Repeat *bool `queryParam:"name=repeat"`
// Number of rows to construct in the composite image
Rows *int64 `queryParam:"name=rows"`
// The width of the image
Width *int64 `queryParam:"name=width"`
}
func (c *Composite) GetType() *int64 {
if c == nil {
return nil
}
return c.Type
}
func (c *Composite) GetFormat() *Format {
if c == nil {
return nil
}
return c.Format
}
func (c *Composite) GetBackgroundColor() *string {
if c == nil {
return nil
}
return c.BackgroundColor
}
func (c *Composite) GetBorder() *int64 {
if c == nil {
return nil
}
return c.Border
}
func (c *Composite) GetCols() *int64 {
if c == nil {
return nil
}
return c.Cols
}
func (c *Composite) GetCrop() *Crop {
if c == nil {
return nil
}
return c.Crop
}
func (c *Composite) GetHeight() *int64 {
if c == nil {
return nil
}
return c.Height
}
func (c *Composite) GetMedia() *CompositeMedia {
if c == nil {
return nil
}
return c.Media
}
func (c *Composite) GetRepeat() *bool {
if c == nil {
return nil
}
return c.Repeat
}
func (c *Composite) GetRows() *int64 {
if c == nil {
return nil
}
return c.Rows
}
func (c *Composite) GetWidth() *int64 {
if c == nil {
return nil
}
return c.Width
}

110
models/components/device.go Normal file
View File

@@ -0,0 +1,110 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
type Device struct {
ChannelMapping []ChannelMapping `json:"ChannelMapping,omitempty"`
Key *string `json:"key,omitempty"`
LastSeenAt *int64 `json:"lastSeenAt,omitempty"`
Make *string `json:"make,omitempty"`
Model *string `json:"model,omitempty"`
ModelNumber *string `json:"modelNumber,omitempty"`
Protocol *string `json:"protocol,omitempty"`
Sources *string `json:"sources,omitempty"`
State *string `json:"state,omitempty"`
Status *string `json:"status,omitempty"`
Tuners *string `json:"tuners,omitempty"`
URI *string `json:"uri,omitempty"`
UUID *string `json:"uuid,omitempty"`
}
func (d *Device) GetChannelMapping() []ChannelMapping {
if d == nil {
return nil
}
return d.ChannelMapping
}
func (d *Device) GetKey() *string {
if d == nil {
return nil
}
return d.Key
}
func (d *Device) GetLastSeenAt() *int64 {
if d == nil {
return nil
}
return d.LastSeenAt
}
func (d *Device) GetMake() *string {
if d == nil {
return nil
}
return d.Make
}
func (d *Device) GetModel() *string {
if d == nil {
return nil
}
return d.Model
}
func (d *Device) GetModelNumber() *string {
if d == nil {
return nil
}
return d.ModelNumber
}
func (d *Device) GetProtocol() *string {
if d == nil {
return nil
}
return d.Protocol
}
func (d *Device) GetSources() *string {
if d == nil {
return nil
}
return d.Sources
}
func (d *Device) GetState() *string {
if d == nil {
return nil
}
return d.State
}
func (d *Device) GetStatus() *string {
if d == nil {
return nil
}
return d.Status
}
func (d *Device) GetTuners() *string {
if d == nil {
return nil
}
return d.Tuners
}
func (d *Device) GetURI() *string {
if d == nil {
return nil
}
return d.URI
}
func (d *Device) GetUUID() *string {
if d == nil {
return nil
}
return d.UUID
}

View File

@@ -0,0 +1,200 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
import (
"github.com/LukeHagar/plexgo/internal/utils"
)
type Pivot struct {
Title *string `json:"title,omitempty"`
Type *string `json:"type,omitempty"`
Context *string `json:"context,omitempty"`
ID *string `json:"id,omitempty"`
Key *string `json:"key,omitempty"`
Symbol *string `json:"symbol,omitempty"`
}
func (p *Pivot) GetTitle() *string {
if p == nil {
return nil
}
return p.Title
}
func (p *Pivot) GetType() *string {
if p == nil {
return nil
}
return p.Type
}
func (p *Pivot) GetContext() *string {
if p == nil {
return nil
}
return p.Context
}
func (p *Pivot) GetID() *string {
if p == nil {
return nil
}
return p.ID
}
func (p *Pivot) GetKey() *string {
if p == nil {
return nil
}
return p.Key
}
func (p *Pivot) GetSymbol() *string {
if p == nil {
return nil
}
return p.Symbol
}
type Directory struct {
Title *string `json:"title,omitempty"`
Type *string `json:"type,omitempty"`
Art *string `json:"art,omitempty"`
Content *bool `json:"content,omitempty"`
Filter *string `json:"filter,omitempty"`
HasPrefs *bool `json:"hasPrefs,omitempty"`
HasStoreServices *bool `json:"hasStoreServices,omitempty"`
HubKey *string `json:"hubKey,omitempty"`
Identifier *string `json:"identifier,omitempty"`
Key *string `json:"key,omitempty"`
LastAccessedAt *int64 `json:"lastAccessedAt,omitempty"`
Pivot []Pivot `json:"Pivot,omitempty"`
Share *int64 `json:"share,omitempty"`
Thumb *string `json:"thumb,omitempty"`
TitleBar *string `json:"titleBar,omitempty"`
AdditionalProperties map[string]any `additionalProperties:"true" json:"-"`
}
func (d Directory) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(d, "", false)
}
func (d *Directory) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &d, "", false, nil); err != nil {
return err
}
return nil
}
func (d *Directory) GetTitle() *string {
if d == nil {
return nil
}
return d.Title
}
func (d *Directory) GetType() *string {
if d == nil {
return nil
}
return d.Type
}
func (d *Directory) GetArt() *string {
if d == nil {
return nil
}
return d.Art
}
func (d *Directory) GetContent() *bool {
if d == nil {
return nil
}
return d.Content
}
func (d *Directory) GetFilter() *string {
if d == nil {
return nil
}
return d.Filter
}
func (d *Directory) GetHasPrefs() *bool {
if d == nil {
return nil
}
return d.HasPrefs
}
func (d *Directory) GetHasStoreServices() *bool {
if d == nil {
return nil
}
return d.HasStoreServices
}
func (d *Directory) GetHubKey() *string {
if d == nil {
return nil
}
return d.HubKey
}
func (d *Directory) GetIdentifier() *string {
if d == nil {
return nil
}
return d.Identifier
}
func (d *Directory) GetKey() *string {
if d == nil {
return nil
}
return d.Key
}
func (d *Directory) GetLastAccessedAt() *int64 {
if d == nil {
return nil
}
return d.LastAccessedAt
}
func (d *Directory) GetPivot() []Pivot {
if d == nil {
return nil
}
return d.Pivot
}
func (d *Directory) GetShare() *int64 {
if d == nil {
return nil
}
return d.Share
}
func (d *Directory) GetThumb() *string {
if d == nil {
return nil
}
return d.Thumb
}
func (d *Directory) GetTitleBar() *string {
if d == nil {
return nil
}
return d.TitleBar
}
func (d *Directory) GetAdditionalProperties() map[string]any {
if d == nil {
return nil
}
return d.AdditionalProperties
}

View File

@@ -0,0 +1,128 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
// DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer - `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
// Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
// The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
type DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer struct {
Identifier *string `json:"identifier,omitempty"`
// The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
//
Offset *int64 `json:"offset,omitempty"`
Size *int64 `json:"size,omitempty"`
// The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
//
TotalSize *int64 `json:"totalSize,omitempty"`
// A status indicator. If present and non-zero, indicates an error
Status *int64 `json:"status,omitempty"`
}
func (d *DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer) GetIdentifier() *string {
if d == nil {
return nil
}
return d.Identifier
}
func (d *DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer) GetOffset() *int64 {
if d == nil {
return nil
}
return d.Offset
}
func (d *DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer) GetSize() *int64 {
if d == nil {
return nil
}
return d.Size
}
func (d *DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer) GetTotalSize() *int64 {
if d == nil {
return nil
}
return d.TotalSize
}
func (d *DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer) GetStatus() *int64 {
if d == nil {
return nil
}
return d.Status
}
type Dvr struct {
Device []Device `json:"Device,omitempty"`
Key *string `json:"key,omitempty"`
Language *string `json:"language,omitempty"`
Lineup *string `json:"lineup,omitempty"`
UUID *string `json:"uuid,omitempty"`
}
func (d *Dvr) GetDevice() []Device {
if d == nil {
return nil
}
return d.Device
}
func (d *Dvr) GetKey() *string {
if d == nil {
return nil
}
return d.Key
}
func (d *Dvr) GetLanguage() *string {
if d == nil {
return nil
}
return d.Language
}
func (d *Dvr) GetLineup() *string {
if d == nil {
return nil
}
return d.Lineup
}
func (d *Dvr) GetUUID() *string {
if d == nil {
return nil
}
return d.UUID
}
type DvrRequestHandlerSlashGetResponses200MediaContainer struct {
MediaContainer *DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer `json:"MediaContainer,omitempty"`
Dvr []Dvr `json:"DVR,omitempty"`
}
func (d *DvrRequestHandlerSlashGetResponses200MediaContainer) GetMediaContainer() *DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer {
if d == nil {
return nil
}
return d.MediaContainer
}
func (d *DvrRequestHandlerSlashGetResponses200MediaContainer) GetDvr() []Dvr {
if d == nil {
return nil
}
return d.Dvr
}
// DvrRequestHandlerSlashGetResponses200 - OK
type DvrRequestHandlerSlashGetResponses200 struct {
MediaContainer *DvrRequestHandlerSlashGetResponses200MediaContainer `json:"MediaContainer,omitempty"`
}
func (d *DvrRequestHandlerSlashGetResponses200) GetMediaContainer() *DvrRequestHandlerSlashGetResponses200MediaContainer {
if d == nil {
return nil
}
return d.MediaContainer
}

213
models/components/filter.go Normal file
View File

@@ -0,0 +1,213 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
import (
"github.com/LukeHagar/plexgo/internal/utils"
)
type FilterPivot struct {
Title *string `json:"title,omitempty"`
Type *string `json:"type,omitempty"`
Context *string `json:"context,omitempty"`
ID *string `json:"id,omitempty"`
Key *string `json:"key,omitempty"`
Symbol *string `json:"symbol,omitempty"`
}
func (f *FilterPivot) GetTitle() *string {
if f == nil {
return nil
}
return f.Title
}
func (f *FilterPivot) GetType() *string {
if f == nil {
return nil
}
return f.Type
}
func (f *FilterPivot) GetContext() *string {
if f == nil {
return nil
}
return f.Context
}
func (f *FilterPivot) GetID() *string {
if f == nil {
return nil
}
return f.ID
}
func (f *FilterPivot) GetKey() *string {
if f == nil {
return nil
}
return f.Key
}
func (f *FilterPivot) GetSymbol() *string {
if f == nil {
return nil
}
return f.Symbol
}
// Filter - Each `Filter` object contains a description of the filter. Note that it is not an exhaustive list of the full media query language, but an important subset useful for top-level API.
type Filter struct {
// The title for the filter.
Title *string `json:"title,omitempty"`
Type *string `json:"type,omitempty"`
Art *string `json:"art,omitempty"`
Content *bool `json:"content,omitempty"`
// This represents the filter name used for the filter, which can be used to construct complex media queries with.
Filter *string `json:"filter,omitempty"`
HasPrefs *bool `json:"hasPrefs,omitempty"`
HasStoreServices *bool `json:"hasStoreServices,omitempty"`
HubKey *string `json:"hubKey,omitempty"`
Identifier *string `json:"identifier,omitempty"`
// This provides the endpoint where the possible range of values for the filter can be retrieved (e.g. for a "Genre" filter, it returns a list of all the genres in the library). This will include a `type` argument that matches the metadata type of the Type element.
Key *string `json:"key,omitempty"`
LastAccessedAt *int64 `json:"lastAccessedAt,omitempty"`
Pivot []FilterPivot `json:"Pivot,omitempty"`
Share *int64 `json:"share,omitempty"`
Thumb *string `json:"thumb,omitempty"`
TitleBar *string `json:"titleBar,omitempty"`
// This is either `string`, `integer`, or `boolean`, and describes the type of values used for the filter.
FilterType *string `json:"filterType,omitempty"`
AdditionalProperties map[string]any `additionalProperties:"true" json:"-"`
}
func (f Filter) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(f, "", false)
}
func (f *Filter) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &f, "", false, nil); err != nil {
return err
}
return nil
}
func (f *Filter) GetTitle() *string {
if f == nil {
return nil
}
return f.Title
}
func (f *Filter) GetType() *string {
if f == nil {
return nil
}
return f.Type
}
func (f *Filter) GetArt() *string {
if f == nil {
return nil
}
return f.Art
}
func (f *Filter) GetContent() *bool {
if f == nil {
return nil
}
return f.Content
}
func (f *Filter) GetFilter() *string {
if f == nil {
return nil
}
return f.Filter
}
func (f *Filter) GetHasPrefs() *bool {
if f == nil {
return nil
}
return f.HasPrefs
}
func (f *Filter) GetHasStoreServices() *bool {
if f == nil {
return nil
}
return f.HasStoreServices
}
func (f *Filter) GetHubKey() *string {
if f == nil {
return nil
}
return f.HubKey
}
func (f *Filter) GetIdentifier() *string {
if f == nil {
return nil
}
return f.Identifier
}
func (f *Filter) GetKey() *string {
if f == nil {
return nil
}
return f.Key
}
func (f *Filter) GetLastAccessedAt() *int64 {
if f == nil {
return nil
}
return f.LastAccessedAt
}
func (f *Filter) GetPivot() []FilterPivot {
if f == nil {
return nil
}
return f.Pivot
}
func (f *Filter) GetShare() *int64 {
if f == nil {
return nil
}
return f.Share
}
func (f *Filter) GetThumb() *string {
if f == nil {
return nil
}
return f.Thumb
}
func (f *Filter) GetTitleBar() *string {
if f == nil {
return nil
}
return f.TitleBar
}
func (f *Filter) GetFilterType() *string {
if f == nil {
return nil
}
return f.FilterType
}
func (f *Filter) GetAdditionalProperties() map[string]any {
if f == nil {
return nil
}
return f.AdditionalProperties
}

View File

@@ -0,0 +1,220 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
import (
"encoding/json"
"fmt"
)
// HomeVisibility - Whether this hub is visible on the home screen
// - all: Visible to all users
// - none: Visible to no users
// - admin: Visible to only admin users
// - shared: Visible to shared users
type HomeVisibility string
const (
HomeVisibilityAll HomeVisibility = "all"
HomeVisibilityNone HomeVisibility = "none"
HomeVisibilityAdmin HomeVisibility = "admin"
HomeVisibilityShared HomeVisibility = "shared"
)
func (e HomeVisibility) ToPointer() *HomeVisibility {
return &e
}
func (e *HomeVisibility) UnmarshalJSON(data []byte) error {
var v string
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case "all":
fallthrough
case "none":
fallthrough
case "admin":
fallthrough
case "shared":
*e = HomeVisibility(v)
return nil
default:
return fmt.Errorf("invalid value for HomeVisibility: %v", v)
}
}
// RecommendationsVisibility - The visibility of this hub in recommendations:
// - all: Visible to all users
// - none: Visible to no users
// - admin: Visible to only admin users
// - shared: Visible to shared users
type RecommendationsVisibility string
const (
RecommendationsVisibilityAll RecommendationsVisibility = "all"
RecommendationsVisibilityNone RecommendationsVisibility = "none"
RecommendationsVisibilityAdmin RecommendationsVisibility = "admin"
RecommendationsVisibilityShared RecommendationsVisibility = "shared"
)
func (e RecommendationsVisibility) ToPointer() *RecommendationsVisibility {
return &e
}
func (e *RecommendationsVisibility) UnmarshalJSON(data []byte) error {
var v string
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case "all":
fallthrough
case "none":
fallthrough
case "admin":
fallthrough
case "shared":
*e = RecommendationsVisibility(v)
return nil
default:
return fmt.Errorf("invalid value for RecommendationsVisibility: %v", v)
}
}
type GetResponses200Hub struct {
// Whether this hub is visible on the home screen
// - all: Visible to all users
// - none: Visible to no users
// - admin: Visible to only admin users
// - shared: Visible to shared users
//
HomeVisibility *HomeVisibility `json:"homeVisibility,omitempty"`
// The identifier for this hub
Identifier *string `json:"identifier,omitempty"`
// Whether this hub is visible to admin user home
PromotedToOwnHome *bool `json:"promotedToOwnHome,omitempty"`
// Whether this hub is promoted to all for recommendations
PromotedToRecommended *bool `json:"promotedToRecommended,omitempty"`
// Whether this hub is visible to shared user's home
PromotedToSharedHome *bool `json:"promotedToSharedHome,omitempty"`
// The visibility of this hub in recommendations:
// - all: Visible to all users
// - none: Visible to no users
// - admin: Visible to only admin users
// - shared: Visible to shared users
//
RecommendationsVisibility *RecommendationsVisibility `json:"recommendationsVisibility,omitempty"`
// The title of this hub
Title *string `json:"title,omitempty"`
}
func (g *GetResponses200Hub) GetHomeVisibility() *HomeVisibility {
if g == nil {
return nil
}
return g.HomeVisibility
}
func (g *GetResponses200Hub) GetIdentifier() *string {
if g == nil {
return nil
}
return g.Identifier
}
func (g *GetResponses200Hub) GetPromotedToOwnHome() *bool {
if g == nil {
return nil
}
return g.PromotedToOwnHome
}
func (g *GetResponses200Hub) GetPromotedToRecommended() *bool {
if g == nil {
return nil
}
return g.PromotedToRecommended
}
func (g *GetResponses200Hub) GetPromotedToSharedHome() *bool {
if g == nil {
return nil
}
return g.PromotedToSharedHome
}
func (g *GetResponses200Hub) GetRecommendationsVisibility() *RecommendationsVisibility {
if g == nil {
return nil
}
return g.RecommendationsVisibility
}
func (g *GetResponses200Hub) GetTitle() *string {
if g == nil {
return nil
}
return g.Title
}
// GetResponses200MediaContainer - `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
// Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
// The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
type GetResponses200MediaContainer struct {
Identifier *string `json:"identifier,omitempty"`
// The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
//
Offset *int64 `json:"offset,omitempty"`
Size *int64 `json:"size,omitempty"`
// The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
//
TotalSize *int64 `json:"totalSize,omitempty"`
Hub []GetResponses200Hub `json:"Hub,omitempty"`
}
func (g *GetResponses200MediaContainer) GetIdentifier() *string {
if g == nil {
return nil
}
return g.Identifier
}
func (g *GetResponses200MediaContainer) GetOffset() *int64 {
if g == nil {
return nil
}
return g.Offset
}
func (g *GetResponses200MediaContainer) GetSize() *int64 {
if g == nil {
return nil
}
return g.Size
}
func (g *GetResponses200MediaContainer) GetTotalSize() *int64 {
if g == nil {
return nil
}
return g.TotalSize
}
func (g *GetResponses200MediaContainer) GetHub() []GetResponses200Hub {
if g == nil {
return nil
}
return g.Hub
}
// GetResponses200 - OK
type GetResponses200 struct {
MediaContainer *GetResponses200MediaContainer `json:"MediaContainer,omitempty"`
}
func (g *GetResponses200) GetMediaContainer() *GetResponses200MediaContainer {
if g == nil {
return nil
}
return g.MediaContainer
}

View File

@@ -0,0 +1,167 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
type HistoryAllGetResponses200Metadata struct {
// The account id of this playback
AccountID *int64 `json:"accountID,omitempty"`
// The device id which played the item
DeviceID *int64 `json:"deviceID,omitempty"`
// The key for this individual history item
HistoryKey *string `json:"historyKey,omitempty"`
// The metadata key for the item played
Key *string `json:"key,omitempty"`
// The library section id containing the item played
LibrarySectionID *string `json:"librarySectionID,omitempty"`
// The originally available at of the item played
OriginallyAvailableAt *string `json:"originallyAvailableAt,omitempty"`
// The rating key for the item played
RatingKey *string `json:"ratingKey,omitempty"`
// The thumb of the item played
Thumb *string `json:"thumb,omitempty"`
// The title of the item played
Title *string `json:"title,omitempty"`
// The metadata type of the item played
Type *string `json:"type,omitempty"`
// The time when the item was played
ViewedAt *int64 `json:"viewedAt,omitempty"`
}
func (h *HistoryAllGetResponses200Metadata) GetAccountID() *int64 {
if h == nil {
return nil
}
return h.AccountID
}
func (h *HistoryAllGetResponses200Metadata) GetDeviceID() *int64 {
if h == nil {
return nil
}
return h.DeviceID
}
func (h *HistoryAllGetResponses200Metadata) GetHistoryKey() *string {
if h == nil {
return nil
}
return h.HistoryKey
}
func (h *HistoryAllGetResponses200Metadata) GetKey() *string {
if h == nil {
return nil
}
return h.Key
}
func (h *HistoryAllGetResponses200Metadata) GetLibrarySectionID() *string {
if h == nil {
return nil
}
return h.LibrarySectionID
}
func (h *HistoryAllGetResponses200Metadata) GetOriginallyAvailableAt() *string {
if h == nil {
return nil
}
return h.OriginallyAvailableAt
}
func (h *HistoryAllGetResponses200Metadata) GetRatingKey() *string {
if h == nil {
return nil
}
return h.RatingKey
}
func (h *HistoryAllGetResponses200Metadata) GetThumb() *string {
if h == nil {
return nil
}
return h.Thumb
}
func (h *HistoryAllGetResponses200Metadata) GetTitle() *string {
if h == nil {
return nil
}
return h.Title
}
func (h *HistoryAllGetResponses200Metadata) GetType() *string {
if h == nil {
return nil
}
return h.Type
}
func (h *HistoryAllGetResponses200Metadata) GetViewedAt() *int64 {
if h == nil {
return nil
}
return h.ViewedAt
}
// HistoryAllGetResponses200MediaContainer - `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
// Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
// The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
type HistoryAllGetResponses200MediaContainer struct {
Identifier *string `json:"identifier,omitempty"`
// The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
//
Offset *int64 `json:"offset,omitempty"`
Size *int64 `json:"size,omitempty"`
// The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
//
TotalSize *int64 `json:"totalSize,omitempty"`
Metadata []HistoryAllGetResponses200Metadata `json:"Metadata,omitempty"`
}
func (h *HistoryAllGetResponses200MediaContainer) GetIdentifier() *string {
if h == nil {
return nil
}
return h.Identifier
}
func (h *HistoryAllGetResponses200MediaContainer) GetOffset() *int64 {
if h == nil {
return nil
}
return h.Offset
}
func (h *HistoryAllGetResponses200MediaContainer) GetSize() *int64 {
if h == nil {
return nil
}
return h.Size
}
func (h *HistoryAllGetResponses200MediaContainer) GetTotalSize() *int64 {
if h == nil {
return nil
}
return h.TotalSize
}
func (h *HistoryAllGetResponses200MediaContainer) GetMetadata() []HistoryAllGetResponses200Metadata {
if h == nil {
return nil
}
return h.Metadata
}
// HistoryAllGetResponses200 - OK
type HistoryAllGetResponses200 struct {
MediaContainer *HistoryAllGetResponses200MediaContainer `json:"MediaContainer,omitempty"`
}
func (h *HistoryAllGetResponses200) GetMediaContainer() *HistoryAllGetResponses200MediaContainer {
if h == nil {
return nil
}
return h.MediaContainer
}

153
models/components/hub.go Normal file
View File

@@ -0,0 +1,153 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
import (
"github.com/LukeHagar/plexgo/internal/utils"
)
type Hub struct {
// A title for this grouping of content
Title *string `json:"title,omitempty"`
// The type of the items contained in this hub, or possibly `mixed` if there are multiple types
Type *string `json:"type,omitempty"`
Context *string `json:"context,omitempty"`
// A unique identifier for the hub
HubIdentifier *string `json:"hubIdentifier,omitempty"`
// A key at which the exact content currently displayed can be fetched again. This is particularly important when a hub is marked as random and requesting the `key` may get different results. It's otherwise optional.
//
HubKey *string `json:"hubKey,omitempty"`
// The key at which all of the content for this hub can be retrieved
Key *string `json:"key,omitempty"`
Metadata []Metadata `json:"Metadata,omitempty"`
// "A boolean indicating that the hub contains more than what's included in the current response."
//
More *bool `json:"more,omitempty"`
// Indicating if the hub should be promoted to the user's homescreen
Promoted *bool `json:"promoted,omitempty"`
// Indicating that the contents of the hub may change on each request
Random *bool `json:"random,omitempty"`
Size *int64 `json:"size,omitempty"`
// A suggestion on how this hub's contents might be displayed by a client. Some examples include `hero`, `list`, `spotlight`, and `upsell`
Style *string `json:"style,omitempty"`
// The subtype of the items contained in this hub, or possibly `mixed` if there are multiple types
Subtype *string `json:"subtype,omitempty"`
TotalSize *int64 `json:"totalSize,omitempty"`
AdditionalProperties map[string]any `additionalProperties:"true" json:"-"`
}
func (h Hub) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(h, "", false)
}
func (h *Hub) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &h, "", false, nil); err != nil {
return err
}
return nil
}
func (h *Hub) GetTitle() *string {
if h == nil {
return nil
}
return h.Title
}
func (h *Hub) GetType() *string {
if h == nil {
return nil
}
return h.Type
}
func (h *Hub) GetContext() *string {
if h == nil {
return nil
}
return h.Context
}
func (h *Hub) GetHubIdentifier() *string {
if h == nil {
return nil
}
return h.HubIdentifier
}
func (h *Hub) GetHubKey() *string {
if h == nil {
return nil
}
return h.HubKey
}
func (h *Hub) GetKey() *string {
if h == nil {
return nil
}
return h.Key
}
func (h *Hub) GetMetadata() []Metadata {
if h == nil {
return nil
}
return h.Metadata
}
func (h *Hub) GetMore() *bool {
if h == nil {
return nil
}
return h.More
}
func (h *Hub) GetPromoted() *bool {
if h == nil {
return nil
}
return h.Promoted
}
func (h *Hub) GetRandom() *bool {
if h == nil {
return nil
}
return h.Random
}
func (h *Hub) GetSize() *int64 {
if h == nil {
return nil
}
return h.Size
}
func (h *Hub) GetStyle() *string {
if h == nil {
return nil
}
return h.Style
}
func (h *Hub) GetSubtype() *string {
if h == nil {
return nil
}
return h.Subtype
}
func (h *Hub) GetTotalSize() *int64 {
if h == nil {
return nil
}
return h.TotalSize
}
func (h *Hub) GetAdditionalProperties() map[string]any {
if h == nil {
return nil
}
return h.AdditionalProperties
}

View File

@@ -0,0 +1,75 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
import (
"encoding/json"
"fmt"
)
// ImageType - Describes both the purpose and intended presentation of the image.
type ImageType string
const (
ImageTypeBackground ImageType = "background"
ImageTypeBanner ImageType = "banner"
ImageTypeClearLogo ImageType = "clearLogo"
ImageTypeCoverPoster ImageType = "coverPoster"
ImageTypeSnapshot ImageType = "snapshot"
)
func (e ImageType) ToPointer() *ImageType {
return &e
}
func (e *ImageType) UnmarshalJSON(data []byte) error {
var v string
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case "background":
fallthrough
case "banner":
fallthrough
case "clearLogo":
fallthrough
case "coverPoster":
fallthrough
case "snapshot":
*e = ImageType(v)
return nil
default:
return fmt.Errorf("invalid value for ImageType: %v", v)
}
}
// Image - Images such as movie posters and background artwork are represented by Image elements.
type Image struct {
// Describes both the purpose and intended presentation of the image.
Type *ImageType `json:"type,omitempty"`
// Title to use for accessibility.
Alt *string `json:"alt,omitempty"`
// The relative path or absolute url for the image.
URL *string `json:"url,omitempty"`
}
func (i *Image) GetType() *ImageType {
if i == nil {
return nil
}
return i.Type
}
func (i *Image) GetAlt() *string {
if i == nil {
return nil
}
return i.Alt
}
func (i *Image) GetURL() *string {
if i == nil {
return nil
}
return i.URL
}

635
models/components/items.go Normal file
View File

@@ -0,0 +1,635 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
import (
"github.com/LukeHagar/plexgo/internal/utils"
)
// Items in a library are referred to as "metadata items." These metadata items are distinct from "media items" which represent actual instances of media that can be consumed. Consider a TV library that has a single video file in it for a particular episode of a show. The library has a single media item, but it has three metadata items: one for the show, one for the season, and one for the episode. Consider a movie library that has two video files in it: the same movie, but two different resolutions. The library has a single metadata item for the movie, but that metadata item has two media items, one for each resolution. Additionally a "media item" will have one or more "media parts" where the the parts are intended to be watched together, such as a CD1 and CD2 parts of the same movie.
//
// Note that when a metadata item has multiple media items, those media items should be isomorphic. That is, a 4K version and 1080p version of a movie are different versions of the same movie. They have the same duration, same summary, same rating, etc. and they can generally be considered interchangeable. A theatrical release vs. director's cut vs. unrated version on the other hand would be separate metadata items.
//
// Metadata items can often live in a hierarchy with relationships between them. For example, the metadata item for an episodes is associated with a season metadata item which is associated with a show metadata item. A similar hierarchy exists with track, album, and artist and photos and photo album. The relationships may be expressed via relative terms and absolute terms. For example, "leaves" refer to metadata items which has associated media (there is no media for a season nor show). A show will have "children" in the form of seasons and a season will have "children" in the form of episodes and episodes have "parent" in the form of a season which has a "parent" in the form of a show. Similarly, a show has "grandchildren" in the form of episodse and an episode has a "grandparent" in the form of a show.
type Items struct {
// The title of the item (e.g. “300” or “The Simpsons”)
Title any `json:"title,omitempty"`
// The type of the video item, such as `movie`, `episode`, or `clip`.
Type any `json:"type,omitempty"`
// When present, contains the disc number for a track on multi-disc albums.
AbsoluteIndex *int64 `json:"absoluteIndex,omitempty"`
// In units of seconds since the epoch, returns the time at which the item was added to the library.
AddedAt *int64 `json:"addedAt,omitempty"`
// When present, the URL for the background artwork for the item.
Art any `json:"art,omitempty"`
// Some rating systems separate reviewer ratings from audience ratings
AudienceRating *float64 `json:"audienceRating,omitempty"`
// A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled).
AudienceRatingImage any `json:"audienceRatingImage,omitempty"`
Autotag []Tag `json:"Autotag,omitempty"`
// When present, the URL for a banner graphic for the item.
Banner any `json:"banner,omitempty"`
// When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two).
ChapterSource any `json:"chapterSource,omitempty"`
// When present, the URL for a composite image for descendent items (e.g. photo albums or playlists).
Composite any `json:"composite,omitempty"`
// If known, the content rating (e.g. MPAA) for an item.
ContentRating any `json:"contentRating,omitempty"`
Country []Tag `json:"Country,omitempty"`
Director []Tag `json:"Director,omitempty"`
// When present, the duration for the item, in units of milliseconds.
Duration *int64 `json:"duration,omitempty"`
// Typically only seen in metadata at a library's top level
Filter []Filter `json:"Filter,omitempty"`
Genre []Tag `json:"Genre,omitempty"`
// The `art` of the grandparent
GrandparentArt *string `json:"grandparentArt,omitempty"`
// The `hero` of the grandparent
GrandparentHero *string `json:"grandparentHero,omitempty"`
// The `key` of the grandparent
GrandparentKey *string `json:"grandparentKey,omitempty"`
// The `ratingKey` of the grandparent
GrandparentRatingKey *string `json:"grandparentRatingKey,omitempty"`
// The `theme` of the grandparent
GrandparentTheme *string `json:"grandparentTheme,omitempty"`
// The `thumb` of the grandparent
GrandparentThumb *string `json:"grandparentThumb,omitempty"`
// The `title` of the grandparent
GrandparentTitle *string `json:"grandparentTitle,omitempty"`
GUID []Tag `json:"Guid,omitempty"`
// When present, the URL for a hero image for the item.
Hero any `json:"hero,omitempty"`
Image []Image `json:"Image,omitempty"`
// When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks.
Index *int64 `json:"index,omitempty"`
// The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details.
Key any `json:"key,omitempty"`
// When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time.
LastViewedAt *int64 `json:"lastViewedAt,omitempty"`
// For shows and seasons, contains the number of total episodes.
LeafCount *int64 `json:"leafCount,omitempty"`
Media []Media `json:"Media,omitempty"`
// When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well.
OriginallyAvailableAt any `json:"originallyAvailableAt,omitempty"`
// When present, used to indicate an item's original title, e.g. a movie's foreign title.
OriginalTitle any `json:"originalTitle,omitempty"`
// The `hero` of the parent
ParentHero *string `json:"parentHero,omitempty"`
// The `index` of the parent
ParentIndex *int64 `json:"parentIndex,omitempty"`
// The `key` of the parent
ParentKey *string `json:"parentKey,omitempty"`
// The `ratingKey` of the parent
ParentRatingKey *string `json:"parentRatingKey,omitempty"`
// The `thumb` of the parent
ParentThumb *string `json:"parentThumb,omitempty"`
// The `title` of the parent
ParentTitle *string `json:"parentTitle,omitempty"`
// Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item.
PrimaryExtraKey any `json:"primaryExtraKey,omitempty"`
// Prompt to give the user for this directory (such as `Search Movies`)
Prompt *string `json:"prompt,omitempty"`
// When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from.
Rating *float64 `json:"rating,omitempty"`
RatingArray []Tag `json:"Rating,omitempty"`
// Number of ratings under this metadata
RatingCount *int64 `json:"ratingCount,omitempty"`
// When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten.
RatingImage any `json:"ratingImage,omitempty"`
// This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed.
RatingKey any `json:"ratingKey,omitempty"`
Role []Tag `json:"Role,omitempty"`
// Indicates this is a search directory
Search *bool `json:"search,omitempty"`
// Used by old clients to provide nested menus allowing for primative (but structured) navigation.
Secondary *bool `json:"secondary,omitempty"`
// When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc.
SkipChildren *bool `json:"skipChildren,omitempty"`
// When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show).
SkipParent *bool `json:"skipParent,omitempty"`
// Typically only seen in metadata at a library's top level
Sort []Sort `json:"Sort,omitempty"`
// When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums).
Studio any `json:"studio,omitempty"`
// The subtype of the video item, such as `photo` when the video item is in a photo library
Subtype any `json:"subtype,omitempty"`
// When present, the extended textual information about the item (e.g. movie plot, artist biography, album review).
Summary any `json:"summary,omitempty"`
// When present, a pithy one-liner about the item (usually only seen for movies).
Tagline any `json:"tagline,omitempty"`
// When present, the URL for theme music for the item (usually only for TV shows).
Theme any `json:"theme,omitempty"`
// When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail.
Thumb any `json:"thumb,omitempty"`
// Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”).
TitleSort any `json:"titleSort,omitempty"`
// In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated).
UpdatedAt *int64 `json:"updatedAt,omitempty"`
// When the user has rated an item, this contains the user rating
UserRating *float64 `json:"userRating,omitempty"`
// When a users has completed watched or listened to an item, this attribute contains the number of consumptions.
ViewCount *int64 `json:"viewCount,omitempty"`
// For shows and seasons, contains the number of viewed episodes.
ViewedLeafCount *int64 `json:"viewedLeafCount,omitempty"`
// When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds.
ViewOffset *int64 `json:"viewOffset,omitempty"`
Writer []Tag `json:"Writer,omitempty"`
// When present, the year associated with the item's release (e.g. release year for a movie).
Year *int64 `json:"year,omitempty"`
MetadataItem []Items `json:"MetadataItem,omitempty"`
AdditionalProperties map[string]any `additionalProperties:"true" json:"-"`
}
func (i Items) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(i, "", false)
}
func (i *Items) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &i, "", false, nil); err != nil {
return err
}
return nil
}
func (i *Items) GetTitle() any {
if i == nil {
return nil
}
return i.Title
}
func (i *Items) GetType() any {
if i == nil {
return nil
}
return i.Type
}
func (i *Items) GetAbsoluteIndex() *int64 {
if i == nil {
return nil
}
return i.AbsoluteIndex
}
func (i *Items) GetAddedAt() *int64 {
if i == nil {
return nil
}
return i.AddedAt
}
func (i *Items) GetArt() any {
if i == nil {
return nil
}
return i.Art
}
func (i *Items) GetAudienceRating() *float64 {
if i == nil {
return nil
}
return i.AudienceRating
}
func (i *Items) GetAudienceRatingImage() any {
if i == nil {
return nil
}
return i.AudienceRatingImage
}
func (i *Items) GetAutotag() []Tag {
if i == nil {
return nil
}
return i.Autotag
}
func (i *Items) GetBanner() any {
if i == nil {
return nil
}
return i.Banner
}
func (i *Items) GetChapterSource() any {
if i == nil {
return nil
}
return i.ChapterSource
}
func (i *Items) GetComposite() any {
if i == nil {
return nil
}
return i.Composite
}
func (i *Items) GetContentRating() any {
if i == nil {
return nil
}
return i.ContentRating
}
func (i *Items) GetCountry() []Tag {
if i == nil {
return nil
}
return i.Country
}
func (i *Items) GetDirector() []Tag {
if i == nil {
return nil
}
return i.Director
}
func (i *Items) GetDuration() *int64 {
if i == nil {
return nil
}
return i.Duration
}
func (i *Items) GetFilter() []Filter {
if i == nil {
return nil
}
return i.Filter
}
func (i *Items) GetGenre() []Tag {
if i == nil {
return nil
}
return i.Genre
}
func (i *Items) GetGrandparentArt() *string {
if i == nil {
return nil
}
return i.GrandparentArt
}
func (i *Items) GetGrandparentHero() *string {
if i == nil {
return nil
}
return i.GrandparentHero
}
func (i *Items) GetGrandparentKey() *string {
if i == nil {
return nil
}
return i.GrandparentKey
}
func (i *Items) GetGrandparentRatingKey() *string {
if i == nil {
return nil
}
return i.GrandparentRatingKey
}
func (i *Items) GetGrandparentTheme() *string {
if i == nil {
return nil
}
return i.GrandparentTheme
}
func (i *Items) GetGrandparentThumb() *string {
if i == nil {
return nil
}
return i.GrandparentThumb
}
func (i *Items) GetGrandparentTitle() *string {
if i == nil {
return nil
}
return i.GrandparentTitle
}
func (i *Items) GetGUID() []Tag {
if i == nil {
return nil
}
return i.GUID
}
func (i *Items) GetHero() any {
if i == nil {
return nil
}
return i.Hero
}
func (i *Items) GetImage() []Image {
if i == nil {
return nil
}
return i.Image
}
func (i *Items) GetIndex() *int64 {
if i == nil {
return nil
}
return i.Index
}
func (i *Items) GetKey() any {
if i == nil {
return nil
}
return i.Key
}
func (i *Items) GetLastViewedAt() *int64 {
if i == nil {
return nil
}
return i.LastViewedAt
}
func (i *Items) GetLeafCount() *int64 {
if i == nil {
return nil
}
return i.LeafCount
}
func (i *Items) GetMedia() []Media {
if i == nil {
return nil
}
return i.Media
}
func (i *Items) GetOriginallyAvailableAt() any {
if i == nil {
return nil
}
return i.OriginallyAvailableAt
}
func (i *Items) GetOriginalTitle() any {
if i == nil {
return nil
}
return i.OriginalTitle
}
func (i *Items) GetParentHero() *string {
if i == nil {
return nil
}
return i.ParentHero
}
func (i *Items) GetParentIndex() *int64 {
if i == nil {
return nil
}
return i.ParentIndex
}
func (i *Items) GetParentKey() *string {
if i == nil {
return nil
}
return i.ParentKey
}
func (i *Items) GetParentRatingKey() *string {
if i == nil {
return nil
}
return i.ParentRatingKey
}
func (i *Items) GetParentThumb() *string {
if i == nil {
return nil
}
return i.ParentThumb
}
func (i *Items) GetParentTitle() *string {
if i == nil {
return nil
}
return i.ParentTitle
}
func (i *Items) GetPrimaryExtraKey() any {
if i == nil {
return nil
}
return i.PrimaryExtraKey
}
func (i *Items) GetPrompt() *string {
if i == nil {
return nil
}
return i.Prompt
}
func (i *Items) GetRating() *float64 {
if i == nil {
return nil
}
return i.Rating
}
func (i *Items) GetRatingArray() []Tag {
if i == nil {
return nil
}
return i.RatingArray
}
func (i *Items) GetRatingCount() *int64 {
if i == nil {
return nil
}
return i.RatingCount
}
func (i *Items) GetRatingImage() any {
if i == nil {
return nil
}
return i.RatingImage
}
func (i *Items) GetRatingKey() any {
if i == nil {
return nil
}
return i.RatingKey
}
func (i *Items) GetRole() []Tag {
if i == nil {
return nil
}
return i.Role
}
func (i *Items) GetSearch() *bool {
if i == nil {
return nil
}
return i.Search
}
func (i *Items) GetSecondary() *bool {
if i == nil {
return nil
}
return i.Secondary
}
func (i *Items) GetSkipChildren() *bool {
if i == nil {
return nil
}
return i.SkipChildren
}
func (i *Items) GetSkipParent() *bool {
if i == nil {
return nil
}
return i.SkipParent
}
func (i *Items) GetSort() []Sort {
if i == nil {
return nil
}
return i.Sort
}
func (i *Items) GetStudio() any {
if i == nil {
return nil
}
return i.Studio
}
func (i *Items) GetSubtype() any {
if i == nil {
return nil
}
return i.Subtype
}
func (i *Items) GetSummary() any {
if i == nil {
return nil
}
return i.Summary
}
func (i *Items) GetTagline() any {
if i == nil {
return nil
}
return i.Tagline
}
func (i *Items) GetTheme() any {
if i == nil {
return nil
}
return i.Theme
}
func (i *Items) GetThumb() any {
if i == nil {
return nil
}
return i.Thumb
}
func (i *Items) GetTitleSort() any {
if i == nil {
return nil
}
return i.TitleSort
}
func (i *Items) GetUpdatedAt() *int64 {
if i == nil {
return nil
}
return i.UpdatedAt
}
func (i *Items) GetUserRating() *float64 {
if i == nil {
return nil
}
return i.UserRating
}
func (i *Items) GetViewCount() *int64 {
if i == nil {
return nil
}
return i.ViewCount
}
func (i *Items) GetViewedLeafCount() *int64 {
if i == nil {
return nil
}
return i.ViewedLeafCount
}
func (i *Items) GetViewOffset() *int64 {
if i == nil {
return nil
}
return i.ViewOffset
}
func (i *Items) GetWriter() []Tag {
if i == nil {
return nil
}
return i.Writer
}
func (i *Items) GetYear() *int64 {
if i == nil {
return nil
}
return i.Year
}
func (i *Items) GetMetadataItem() []Items {
if i == nil {
return nil
}
return i.MetadataItem
}
func (i *Items) GetAdditionalProperties() map[string]any {
if i == nil {
return nil
}
return i.AdditionalProperties
}

View File

@@ -0,0 +1,189 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
// LibrarySectionLocation - Represents a top-level location on disk where media in this library section is stored
type LibrarySectionLocation struct {
ID *int64 `json:"id,omitempty"`
// The path of where this directory exists on disk
Path any `json:"path,omitempty"`
}
func (l *LibrarySectionLocation) GetID() *int64 {
if l == nil {
return nil
}
return l.ID
}
func (l *LibrarySectionLocation) GetPath() any {
if l == nil {
return nil
}
return l.Path
}
type LibrarySection struct {
Title *string `json:"title,omitempty"`
Type *string `json:"type,omitempty"`
Agent *string `json:"agent,omitempty"`
AllowSync *bool `json:"allowSync,omitempty"`
Art *string `json:"art,omitempty"`
Composite *string `json:"composite,omitempty"`
Content *bool `json:"content,omitempty"`
ContentChangedAt *int64 `json:"contentChangedAt,omitempty"`
CreatedAt *int64 `json:"createdAt,omitempty"`
Directory *bool `json:"directory,omitempty"`
// Indicates whether this section has filtering capabilities
Filters *bool `json:"filters,omitempty"`
Hidden *bool `json:"hidden,omitempty"`
Key *string `json:"key,omitempty"`
Language *string `json:"language,omitempty"`
Location []LibrarySectionLocation `json:"Location,omitempty"`
// Indicates whether this library section is currently scanning
Refreshing *bool `json:"refreshing,omitempty"`
ScannedAt *int64 `json:"scannedAt,omitempty"`
Scanner *string `json:"scanner,omitempty"`
Thumb *string `json:"thumb,omitempty"`
UpdatedAt *int64 `json:"updatedAt,omitempty"`
}
func (l *LibrarySection) GetTitle() *string {
if l == nil {
return nil
}
return l.Title
}
func (l *LibrarySection) GetType() *string {
if l == nil {
return nil
}
return l.Type
}
func (l *LibrarySection) GetAgent() *string {
if l == nil {
return nil
}
return l.Agent
}
func (l *LibrarySection) GetAllowSync() *bool {
if l == nil {
return nil
}
return l.AllowSync
}
func (l *LibrarySection) GetArt() *string {
if l == nil {
return nil
}
return l.Art
}
func (l *LibrarySection) GetComposite() *string {
if l == nil {
return nil
}
return l.Composite
}
func (l *LibrarySection) GetContent() *bool {
if l == nil {
return nil
}
return l.Content
}
func (l *LibrarySection) GetContentChangedAt() *int64 {
if l == nil {
return nil
}
return l.ContentChangedAt
}
func (l *LibrarySection) GetCreatedAt() *int64 {
if l == nil {
return nil
}
return l.CreatedAt
}
func (l *LibrarySection) GetDirectory() *bool {
if l == nil {
return nil
}
return l.Directory
}
func (l *LibrarySection) GetFilters() *bool {
if l == nil {
return nil
}
return l.Filters
}
func (l *LibrarySection) GetHidden() *bool {
if l == nil {
return nil
}
return l.Hidden
}
func (l *LibrarySection) GetKey() *string {
if l == nil {
return nil
}
return l.Key
}
func (l *LibrarySection) GetLanguage() *string {
if l == nil {
return nil
}
return l.Language
}
func (l *LibrarySection) GetLocation() []LibrarySectionLocation {
if l == nil {
return nil
}
return l.Location
}
func (l *LibrarySection) GetRefreshing() *bool {
if l == nil {
return nil
}
return l.Refreshing
}
func (l *LibrarySection) GetScannedAt() *int64 {
if l == nil {
return nil
}
return l.ScannedAt
}
func (l *LibrarySection) GetScanner() *string {
if l == nil {
return nil
}
return l.Scanner
}
func (l *LibrarySection) GetThumb() *string {
if l == nil {
return nil
}
return l.Thumb
}
func (l *LibrarySection) GetUpdatedAt() *int64 {
if l == nil {
return nil
}
return l.UpdatedAt
}

104
models/components/lineup.go Normal file
View File

@@ -0,0 +1,104 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
import (
"encoding/json"
"fmt"
)
// LineupType - - `-1`: N/A
// - `0`: Over the air
// - `1`: Cable
// - `2`: Satellite
// - `3`: IPTV
// - `4`: Virtual
type LineupType int64
const (
LineupTypeMinus1 LineupType = -1
LineupTypeZero LineupType = 0
LineupTypeOne LineupType = 1
LineupTypeTwo LineupType = 2
LineupTypeThree LineupType = 3
LineupTypeFour LineupType = 4
)
func (e LineupType) ToPointer() *LineupType {
return &e
}
func (e *LineupType) UnmarshalJSON(data []byte) error {
var v int64
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case -1:
fallthrough
case 0:
fallthrough
case 1:
fallthrough
case 2:
fallthrough
case 3:
fallthrough
case 4:
*e = LineupType(v)
return nil
default:
return fmt.Errorf("invalid value for LineupType: %v", v)
}
}
type Lineup struct {
Title *string `json:"title,omitempty"`
// The type of this object (`lineup` in this case)
Type *string `json:"type,omitempty"`
// - `-1`: N/A
// - `0`: Over the air
// - `1`: Cable
// - `2`: Satellite
// - `3`: IPTV
// - `4`: Virtual
//
LineupType *LineupType `json:"lineupType,omitempty"`
Location *string `json:"location,omitempty"`
// The uuid of this lineup
UUID *string `json:"uuid,omitempty"`
}
func (l *Lineup) GetTitle() *string {
if l == nil {
return nil
}
return l.Title
}
func (l *Lineup) GetType() *string {
if l == nil {
return nil
}
return l.Type
}
func (l *Lineup) GetLineupType() *LineupType {
if l == nil {
return nil
}
return l.LineupType
}
func (l *Lineup) GetLocation() *string {
if l == nil {
return nil
}
return l.Location
}
func (l *Lineup) GetUUID() *string {
if l == nil {
return nil
}
return l.UUID
}

View File

@@ -0,0 +1,37 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
import (
"encoding/json"
"fmt"
)
type Location string
const (
LocationLan Location = "lan"
LocationWan Location = "wan"
LocationCellular Location = "cellular"
)
func (e Location) ToPointer() *Location {
return &e
}
func (e *Location) UnmarshalJSON(data []byte) error {
var v string
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case "lan":
fallthrough
case "wan":
fallthrough
case "cellular":
*e = Location(v)
return nil
default:
return fmt.Errorf("invalid value for Location: %v", v)
}
}

174
models/components/media.go Normal file
View File

@@ -0,0 +1,174 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
import (
"github.com/LukeHagar/plexgo/internal/utils"
)
// Media - `Media` represents an one or more media files (parts) and is a child of a metadata item. There aren't necessarily any guaranteed attributes on media elements since the attributes will vary based on the type. The possible attributes are not documented here, but they typically have self-evident names. High-level media information that can be used for badging and flagging, such as `videoResolution` and codecs, is included on the media element.
type Media struct {
AspectRatio *float64 `json:"aspectRatio,omitempty"`
AudioChannels *int64 `json:"audioChannels,omitempty"`
AudioCodec any `json:"audioCodec,omitempty"`
AudioProfile any `json:"audioProfile,omitempty"`
Bitrate *int64 `json:"bitrate,omitempty"`
Container any `json:"container,omitempty"`
Duration *int64 `json:"duration,omitempty"`
Has64bitOffsets *bool `json:"has64bitOffsets,omitempty"`
HasVoiceActivity *bool `json:"hasVoiceActivity,omitempty"`
Height *int64 `json:"height,omitempty"`
ID *int64 `json:"id,omitempty"`
OptimizedForStreaming *bool `json:"optimizedForStreaming,omitempty"`
Part []Part `json:"Part,omitempty"`
VideoCodec any `json:"videoCodec,omitempty"`
VideoFrameRate any `json:"videoFrameRate,omitempty"`
VideoProfile any `json:"videoProfile,omitempty"`
VideoResolution any `json:"videoResolution,omitempty"`
Width *int64 `json:"width,omitempty"`
AdditionalProperties map[string]any `additionalProperties:"true" json:"-"`
}
func (m Media) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(m, "", false)
}
func (m *Media) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &m, "", false, nil); err != nil {
return err
}
return nil
}
func (m *Media) GetAspectRatio() *float64 {
if m == nil {
return nil
}
return m.AspectRatio
}
func (m *Media) GetAudioChannels() *int64 {
if m == nil {
return nil
}
return m.AudioChannels
}
func (m *Media) GetAudioCodec() any {
if m == nil {
return nil
}
return m.AudioCodec
}
func (m *Media) GetAudioProfile() any {
if m == nil {
return nil
}
return m.AudioProfile
}
func (m *Media) GetBitrate() *int64 {
if m == nil {
return nil
}
return m.Bitrate
}
func (m *Media) GetContainer() any {
if m == nil {
return nil
}
return m.Container
}
func (m *Media) GetDuration() *int64 {
if m == nil {
return nil
}
return m.Duration
}
func (m *Media) GetHas64bitOffsets() *bool {
if m == nil {
return nil
}
return m.Has64bitOffsets
}
func (m *Media) GetHasVoiceActivity() *bool {
if m == nil {
return nil
}
return m.HasVoiceActivity
}
func (m *Media) GetHeight() *int64 {
if m == nil {
return nil
}
return m.Height
}
func (m *Media) GetID() *int64 {
if m == nil {
return nil
}
return m.ID
}
func (m *Media) GetOptimizedForStreaming() *bool {
if m == nil {
return nil
}
return m.OptimizedForStreaming
}
func (m *Media) GetPart() []Part {
if m == nil {
return nil
}
return m.Part
}
func (m *Media) GetVideoCodec() any {
if m == nil {
return nil
}
return m.VideoCodec
}
func (m *Media) GetVideoFrameRate() any {
if m == nil {
return nil
}
return m.VideoFrameRate
}
func (m *Media) GetVideoProfile() any {
if m == nil {
return nil
}
return m.VideoProfile
}
func (m *Media) GetVideoResolution() any {
if m == nil {
return nil
}
return m.VideoResolution
}
func (m *Media) GetWidth() *int64 {
if m == nil {
return nil
}
return m.Width
}
func (m *Media) GetAdditionalProperties() map[string]any {
if m == nil {
return nil
}
return m.AdditionalProperties
}

View File

@@ -0,0 +1,45 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
// MediaContainer - `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
// Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
// The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
type MediaContainer struct {
Identifier *string `json:"identifier,omitempty"`
// The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
//
Offset *int64 `json:"offset,omitempty"`
Size *int64 `json:"size,omitempty"`
// The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
//
TotalSize *int64 `json:"totalSize,omitempty"`
}
func (m *MediaContainer) GetIdentifier() *string {
if m == nil {
return nil
}
return m.Identifier
}
func (m *MediaContainer) GetOffset() *int64 {
if m == nil {
return nil
}
return m.Offset
}
func (m *MediaContainer) GetSize() *int64 {
if m == nil {
return nil
}
return m.Size
}
func (m *MediaContainer) GetTotalSize() *int64 {
if m == nil {
return nil
}
return m.TotalSize
}

View File

@@ -0,0 +1,141 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
import (
"encoding/json"
"fmt"
"github.com/LukeHagar/plexgo/internal/utils"
)
type MediaContainerWithArtworkType string
const (
MediaContainerWithArtworkTypeImage MediaContainerWithArtworkType = "image"
)
func (e MediaContainerWithArtworkType) ToPointer() *MediaContainerWithArtworkType {
return &e
}
func (e *MediaContainerWithArtworkType) UnmarshalJSON(data []byte) error {
var v string
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case "image":
*e = MediaContainerWithArtworkType(v)
return nil
default:
return fmt.Errorf("invalid value for MediaContainerWithArtworkType: %v", v)
}
}
type MediaContainerWithArtworkMetadata struct {
// The title of the item
Title *string `json:"title,omitempty"`
Type *MediaContainerWithArtworkType `json:"type,omitempty"`
// The path to the artwork
Key *string `json:"key,omitempty"`
AdditionalProperties map[string]any `additionalProperties:"true" json:"-"`
}
func (m MediaContainerWithArtworkMetadata) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(m, "", false)
}
func (m *MediaContainerWithArtworkMetadata) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &m, "", false, nil); err != nil {
return err
}
return nil
}
func (m *MediaContainerWithArtworkMetadata) GetTitle() *string {
if m == nil {
return nil
}
return m.Title
}
func (m *MediaContainerWithArtworkMetadata) GetType() *MediaContainerWithArtworkType {
if m == nil {
return nil
}
return m.Type
}
func (m *MediaContainerWithArtworkMetadata) GetKey() *string {
if m == nil {
return nil
}
return m.Key
}
func (m *MediaContainerWithArtworkMetadata) GetAdditionalProperties() map[string]any {
if m == nil {
return nil
}
return m.AdditionalProperties
}
// MediaContainerWithArtworkMediaContainer - `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
// Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
// The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
type MediaContainerWithArtworkMediaContainer struct {
Identifier *string `json:"identifier,omitempty"`
// The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
//
Offset *int64 `json:"offset,omitempty"`
Size *int64 `json:"size,omitempty"`
// The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
//
TotalSize *int64 `json:"totalSize,omitempty"`
Metadata []MediaContainerWithArtworkMetadata `json:"Metadata,omitempty"`
}
func (m *MediaContainerWithArtworkMediaContainer) GetIdentifier() *string {
if m == nil {
return nil
}
return m.Identifier
}
func (m *MediaContainerWithArtworkMediaContainer) GetOffset() *int64 {
if m == nil {
return nil
}
return m.Offset
}
func (m *MediaContainerWithArtworkMediaContainer) GetSize() *int64 {
if m == nil {
return nil
}
return m.Size
}
func (m *MediaContainerWithArtworkMediaContainer) GetTotalSize() *int64 {
if m == nil {
return nil
}
return m.TotalSize
}
func (m *MediaContainerWithArtworkMediaContainer) GetMetadata() []MediaContainerWithArtworkMetadata {
if m == nil {
return nil
}
return m.Metadata
}
type MediaContainerWithArtwork struct {
MediaContainer *MediaContainerWithArtworkMediaContainer `json:"MediaContainer,omitempty"`
}
func (m *MediaContainerWithArtwork) GetMediaContainer() *MediaContainerWithArtworkMediaContainer {
if m == nil {
return nil
}
return m.MediaContainer
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,171 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
type MediaContainerWithDeviceDevice struct {
ChannelMapping []ChannelMapping `json:"ChannelMapping,omitempty"`
Key *string `json:"key,omitempty"`
LastSeenAt *int64 `json:"lastSeenAt,omitempty"`
Make *string `json:"make,omitempty"`
Model *string `json:"model,omitempty"`
ModelNumber *string `json:"modelNumber,omitempty"`
Protocol *string `json:"protocol,omitempty"`
Sources *string `json:"sources,omitempty"`
State *string `json:"state,omitempty"`
Status *string `json:"status,omitempty"`
Tuners *string `json:"tuners,omitempty"`
URI *string `json:"uri,omitempty"`
UUID *string `json:"uuid,omitempty"`
}
func (m *MediaContainerWithDeviceDevice) GetChannelMapping() []ChannelMapping {
if m == nil {
return nil
}
return m.ChannelMapping
}
func (m *MediaContainerWithDeviceDevice) GetKey() *string {
if m == nil {
return nil
}
return m.Key
}
func (m *MediaContainerWithDeviceDevice) GetLastSeenAt() *int64 {
if m == nil {
return nil
}
return m.LastSeenAt
}
func (m *MediaContainerWithDeviceDevice) GetMake() *string {
if m == nil {
return nil
}
return m.Make
}
func (m *MediaContainerWithDeviceDevice) GetModel() *string {
if m == nil {
return nil
}
return m.Model
}
func (m *MediaContainerWithDeviceDevice) GetModelNumber() *string {
if m == nil {
return nil
}
return m.ModelNumber
}
func (m *MediaContainerWithDeviceDevice) GetProtocol() *string {
if m == nil {
return nil
}
return m.Protocol
}
func (m *MediaContainerWithDeviceDevice) GetSources() *string {
if m == nil {
return nil
}
return m.Sources
}
func (m *MediaContainerWithDeviceDevice) GetState() *string {
if m == nil {
return nil
}
return m.State
}
func (m *MediaContainerWithDeviceDevice) GetStatus() *string {
if m == nil {
return nil
}
return m.Status
}
func (m *MediaContainerWithDeviceDevice) GetTuners() *string {
if m == nil {
return nil
}
return m.Tuners
}
func (m *MediaContainerWithDeviceDevice) GetURI() *string {
if m == nil {
return nil
}
return m.URI
}
func (m *MediaContainerWithDeviceDevice) GetUUID() *string {
if m == nil {
return nil
}
return m.UUID
}
// MediaContainerWithDeviceMediaContainer - `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
// Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
// The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
type MediaContainerWithDeviceMediaContainer struct {
Identifier *string `json:"identifier,omitempty"`
// The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
//
Offset *int64 `json:"offset,omitempty"`
Size *int64 `json:"size,omitempty"`
// The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
//
TotalSize *int64 `json:"totalSize,omitempty"`
Device []MediaContainerWithDeviceDevice `json:"Device,omitempty"`
}
func (m *MediaContainerWithDeviceMediaContainer) GetIdentifier() *string {
if m == nil {
return nil
}
return m.Identifier
}
func (m *MediaContainerWithDeviceMediaContainer) GetOffset() *int64 {
if m == nil {
return nil
}
return m.Offset
}
func (m *MediaContainerWithDeviceMediaContainer) GetSize() *int64 {
if m == nil {
return nil
}
return m.Size
}
func (m *MediaContainerWithDeviceMediaContainer) GetTotalSize() *int64 {
if m == nil {
return nil
}
return m.TotalSize
}
func (m *MediaContainerWithDeviceMediaContainer) GetDevice() []MediaContainerWithDeviceDevice {
if m == nil {
return nil
}
return m.Device
}
type MediaContainerWithDevice struct {
MediaContainer *MediaContainerWithDeviceMediaContainer `json:"MediaContainer,omitempty"`
}
func (m *MediaContainerWithDevice) GetMediaContainer() *MediaContainerWithDeviceMediaContainer {
if m == nil {
return nil
}
return m.MediaContainer
}

View File

@@ -0,0 +1,64 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
// MediaContainerWithDirectoryMediaContainer - `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
// Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
// The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
type MediaContainerWithDirectoryMediaContainer struct {
Identifier *string `json:"identifier,omitempty"`
// The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
//
Offset *int64 `json:"offset,omitempty"`
Size *int64 `json:"size,omitempty"`
// The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
//
TotalSize *int64 `json:"totalSize,omitempty"`
Directory []Directory `json:"Directory,omitempty"`
}
func (m *MediaContainerWithDirectoryMediaContainer) GetIdentifier() *string {
if m == nil {
return nil
}
return m.Identifier
}
func (m *MediaContainerWithDirectoryMediaContainer) GetOffset() *int64 {
if m == nil {
return nil
}
return m.Offset
}
func (m *MediaContainerWithDirectoryMediaContainer) GetSize() *int64 {
if m == nil {
return nil
}
return m.Size
}
func (m *MediaContainerWithDirectoryMediaContainer) GetTotalSize() *int64 {
if m == nil {
return nil
}
return m.TotalSize
}
func (m *MediaContainerWithDirectoryMediaContainer) GetDirectory() []Directory {
if m == nil {
return nil
}
return m.Directory
}
type MediaContainerWithDirectory struct {
MediaContainer *MediaContainerWithDirectoryMediaContainer `json:"MediaContainer,omitempty"`
}
func (m *MediaContainerWithDirectory) GetMediaContainer() *MediaContainerWithDirectoryMediaContainer {
if m == nil {
return nil
}
return m.MediaContainer
}

View File

@@ -0,0 +1,65 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
// MediaContainerWithHubsMediaContainer - `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
// Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
// The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
type MediaContainerWithHubsMediaContainer struct {
Identifier *string `json:"identifier,omitempty"`
// The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
//
Offset *int64 `json:"offset,omitempty"`
Size *int64 `json:"size,omitempty"`
// The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
//
TotalSize *int64 `json:"totalSize,omitempty"`
Hub []Hub `json:"Hub,omitempty"`
}
func (m *MediaContainerWithHubsMediaContainer) GetIdentifier() *string {
if m == nil {
return nil
}
return m.Identifier
}
func (m *MediaContainerWithHubsMediaContainer) GetOffset() *int64 {
if m == nil {
return nil
}
return m.Offset
}
func (m *MediaContainerWithHubsMediaContainer) GetSize() *int64 {
if m == nil {
return nil
}
return m.Size
}
func (m *MediaContainerWithHubsMediaContainer) GetTotalSize() *int64 {
if m == nil {
return nil
}
return m.TotalSize
}
func (m *MediaContainerWithHubsMediaContainer) GetHub() []Hub {
if m == nil {
return nil
}
return m.Hub
}
// MediaContainerWithHubs - OK
type MediaContainerWithHubs struct {
MediaContainer *MediaContainerWithHubsMediaContainer `json:"MediaContainer,omitempty"`
}
func (m *MediaContainerWithHubs) GetMediaContainer() *MediaContainerWithHubsMediaContainer {
if m == nil {
return nil
}
return m.MediaContainer
}

View File

@@ -0,0 +1,73 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
// MediaContainerWithLineupMediaContainer - `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
// Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
// The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
type MediaContainerWithLineupMediaContainer struct {
Identifier *string `json:"identifier,omitempty"`
// The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
//
Offset *int64 `json:"offset,omitempty"`
Size *int64 `json:"size,omitempty"`
// The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
//
TotalSize *int64 `json:"totalSize,omitempty"`
Lineup []Lineup `json:"Lineup,omitempty"`
// The UUID of this set lineups
UUID *string `json:"uuid,omitempty"`
}
func (m *MediaContainerWithLineupMediaContainer) GetIdentifier() *string {
if m == nil {
return nil
}
return m.Identifier
}
func (m *MediaContainerWithLineupMediaContainer) GetOffset() *int64 {
if m == nil {
return nil
}
return m.Offset
}
func (m *MediaContainerWithLineupMediaContainer) GetSize() *int64 {
if m == nil {
return nil
}
return m.Size
}
func (m *MediaContainerWithLineupMediaContainer) GetTotalSize() *int64 {
if m == nil {
return nil
}
return m.TotalSize
}
func (m *MediaContainerWithLineupMediaContainer) GetLineup() []Lineup {
if m == nil {
return nil
}
return m.Lineup
}
func (m *MediaContainerWithLineupMediaContainer) GetUUID() *string {
if m == nil {
return nil
}
return m.UUID
}
type MediaContainerWithLineup struct {
MediaContainer *MediaContainerWithLineupMediaContainer `json:"MediaContainer,omitempty"`
}
func (m *MediaContainerWithLineup) GetMediaContainer() *MediaContainerWithLineupMediaContainer {
if m == nil {
return nil
}
return m.MediaContainer
}

View File

@@ -0,0 +1,64 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
// MediaContainerWithMetadataMediaContainer - `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
// Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
// The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
type MediaContainerWithMetadataMediaContainer struct {
Identifier *string `json:"identifier,omitempty"`
// The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
//
Offset *int64 `json:"offset,omitempty"`
Size *int64 `json:"size,omitempty"`
// The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
//
TotalSize *int64 `json:"totalSize,omitempty"`
Metadata []Metadata `json:"Metadata,omitempty"`
}
func (m *MediaContainerWithMetadataMediaContainer) GetIdentifier() *string {
if m == nil {
return nil
}
return m.Identifier
}
func (m *MediaContainerWithMetadataMediaContainer) GetOffset() *int64 {
if m == nil {
return nil
}
return m.Offset
}
func (m *MediaContainerWithMetadataMediaContainer) GetSize() *int64 {
if m == nil {
return nil
}
return m.Size
}
func (m *MediaContainerWithMetadataMediaContainer) GetTotalSize() *int64 {
if m == nil {
return nil
}
return m.TotalSize
}
func (m *MediaContainerWithMetadataMediaContainer) GetMetadata() []Metadata {
if m == nil {
return nil
}
return m.Metadata
}
type MediaContainerWithMetadata struct {
MediaContainer *MediaContainerWithMetadataMediaContainer `json:"MediaContainer,omitempty"`
}
func (m *MediaContainerWithMetadata) GetMediaContainer() *MediaContainerWithMetadataMediaContainer {
if m == nil {
return nil
}
return m.MediaContainer
}

View File

@@ -0,0 +1,696 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
import (
"github.com/LukeHagar/plexgo/internal/utils"
)
// MetadataItem - Items in a library are referred to as "metadata items." These metadata items are distinct from "media items" which represent actual instances of media that can be consumed. Consider a TV library that has a single video file in it for a particular episode of a show. The library has a single media item, but it has three metadata items: one for the show, one for the season, and one for the episode. Consider a movie library that has two video files in it: the same movie, but two different resolutions. The library has a single metadata item for the movie, but that metadata item has two media items, one for each resolution. Additionally a "media item" will have one or more "media parts" where the the parts are intended to be watched together, such as a CD1 and CD2 parts of the same movie.
//
// Note that when a metadata item has multiple media items, those media items should be isomorphic. That is, a 4K version and 1080p version of a movie are different versions of the same movie. They have the same duration, same summary, same rating, etc. and they can generally be considered interchangeable. A theatrical release vs. director's cut vs. unrated version on the other hand would be separate metadata items.
//
// Metadata items can often live in a hierarchy with relationships between them. For example, the metadata item for an episodes is associated with a season metadata item which is associated with a show metadata item. A similar hierarchy exists with track, album, and artist and photos and photo album. The relationships may be expressed via relative terms and absolute terms. For example, "leaves" refer to metadata items which has associated media (there is no media for a season nor show). A show will have "children" in the form of seasons and a season will have "children" in the form of episodes and episodes have "parent" in the form of a season which has a "parent" in the form of a show. Similarly, a show has "grandchildren" in the form of episodse and an episode has a "grandparent" in the form of a show.
type MetadataItem struct {
// The title of the item (e.g. “300” or “The Simpsons”)
Title any `json:"title,omitempty"`
// The type of the video item, such as `movie`, `episode`, or `clip`.
Type any `json:"type,omitempty"`
// When present, contains the disc number for a track on multi-disc albums.
AbsoluteIndex *int64 `json:"absoluteIndex,omitempty"`
// In units of seconds since the epoch, returns the time at which the item was added to the library.
AddedAt *int64 `json:"addedAt,omitempty"`
// When present, the URL for the background artwork for the item.
Art any `json:"art,omitempty"`
// Some rating systems separate reviewer ratings from audience ratings
AudienceRating *float64 `json:"audienceRating,omitempty"`
// A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled).
AudienceRatingImage any `json:"audienceRatingImage,omitempty"`
Autotag []Tag `json:"Autotag,omitempty"`
// When present, the URL for a banner graphic for the item.
Banner any `json:"banner,omitempty"`
// When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two).
ChapterSource any `json:"chapterSource,omitempty"`
// When present, the URL for a composite image for descendent items (e.g. photo albums or playlists).
Composite any `json:"composite,omitempty"`
// If known, the content rating (e.g. MPAA) for an item.
ContentRating any `json:"contentRating,omitempty"`
Country []Tag `json:"Country,omitempty"`
Director []Tag `json:"Director,omitempty"`
// When present, the duration for the item, in units of milliseconds.
Duration *int64 `json:"duration,omitempty"`
// Typically only seen in metadata at a library's top level
Filter []Filter `json:"Filter,omitempty"`
Genre []Tag `json:"Genre,omitempty"`
// The `art` of the grandparent
GrandparentArt *string `json:"grandparentArt,omitempty"`
// The `hero` of the grandparent
GrandparentHero *string `json:"grandparentHero,omitempty"`
// The `key` of the grandparent
GrandparentKey *string `json:"grandparentKey,omitempty"`
// The `ratingKey` of the grandparent
GrandparentRatingKey *string `json:"grandparentRatingKey,omitempty"`
// The `theme` of the grandparent
GrandparentTheme *string `json:"grandparentTheme,omitempty"`
// The `thumb` of the grandparent
GrandparentThumb *string `json:"grandparentThumb,omitempty"`
// The `title` of the grandparent
GrandparentTitle *string `json:"grandparentTitle,omitempty"`
GUID []Tag `json:"Guid,omitempty"`
// When present, the URL for a hero image for the item.
Hero any `json:"hero,omitempty"`
Image []Image `json:"Image,omitempty"`
// When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks.
Index *int64 `json:"index,omitempty"`
// The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details.
Key any `json:"key,omitempty"`
// When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time.
LastViewedAt *int64 `json:"lastViewedAt,omitempty"`
// For shows and seasons, contains the number of total episodes.
LeafCount *int64 `json:"leafCount,omitempty"`
Media []Media `json:"Media,omitempty"`
// When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well.
OriginallyAvailableAt any `json:"originallyAvailableAt,omitempty"`
// When present, used to indicate an item's original title, e.g. a movie's foreign title.
OriginalTitle any `json:"originalTitle,omitempty"`
// The `hero` of the parent
ParentHero *string `json:"parentHero,omitempty"`
// The `index` of the parent
ParentIndex *int64 `json:"parentIndex,omitempty"`
// The `key` of the parent
ParentKey *string `json:"parentKey,omitempty"`
// The `ratingKey` of the parent
ParentRatingKey *string `json:"parentRatingKey,omitempty"`
// The `thumb` of the parent
ParentThumb *string `json:"parentThumb,omitempty"`
// The `title` of the parent
ParentTitle *string `json:"parentTitle,omitempty"`
// Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item.
PrimaryExtraKey any `json:"primaryExtraKey,omitempty"`
// Prompt to give the user for this directory (such as `Search Movies`)
Prompt *string `json:"prompt,omitempty"`
// When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from.
Rating *float64 `json:"rating,omitempty"`
RatingArray []Tag `json:"Rating,omitempty"`
// Number of ratings under this metadata
RatingCount *int64 `json:"ratingCount,omitempty"`
// When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten.
RatingImage any `json:"ratingImage,omitempty"`
// This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed.
RatingKey any `json:"ratingKey,omitempty"`
Role []Tag `json:"Role,omitempty"`
// Indicates this is a search directory
Search *bool `json:"search,omitempty"`
// Used by old clients to provide nested menus allowing for primative (but structured) navigation.
Secondary *bool `json:"secondary,omitempty"`
// When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc.
SkipChildren *bool `json:"skipChildren,omitempty"`
// When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show).
SkipParent *bool `json:"skipParent,omitempty"`
// Typically only seen in metadata at a library's top level
Sort []Sort `json:"Sort,omitempty"`
// When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums).
Studio any `json:"studio,omitempty"`
// The subtype of the video item, such as `photo` when the video item is in a photo library
Subtype any `json:"subtype,omitempty"`
// When present, the extended textual information about the item (e.g. movie plot, artist biography, album review).
Summary any `json:"summary,omitempty"`
// When present, a pithy one-liner about the item (usually only seen for movies).
Tagline any `json:"tagline,omitempty"`
// When present, the URL for theme music for the item (usually only for TV shows).
Theme any `json:"theme,omitempty"`
// When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail.
Thumb any `json:"thumb,omitempty"`
// Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”).
TitleSort any `json:"titleSort,omitempty"`
// In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated).
UpdatedAt *int64 `json:"updatedAt,omitempty"`
// When the user has rated an item, this contains the user rating
UserRating *float64 `json:"userRating,omitempty"`
// When a users has completed watched or listened to an item, this attribute contains the number of consumptions.
ViewCount *int64 `json:"viewCount,omitempty"`
// For shows and seasons, contains the number of viewed episodes.
ViewedLeafCount *int64 `json:"viewedLeafCount,omitempty"`
// When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds.
ViewOffset *int64 `json:"viewOffset,omitempty"`
Writer []Tag `json:"Writer,omitempty"`
// When present, the year associated with the item's release (e.g. release year for a movie).
Year *int64 `json:"year,omitempty"`
MetadataItem []Items `json:"MetadataItem,omitempty"`
AdditionalProperties map[string]any `additionalProperties:"true" json:"-"`
}
func (m MetadataItem) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(m, "", false)
}
func (m *MetadataItem) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &m, "", false, nil); err != nil {
return err
}
return nil
}
func (m *MetadataItem) GetTitle() any {
if m == nil {
return nil
}
return m.Title
}
func (m *MetadataItem) GetType() any {
if m == nil {
return nil
}
return m.Type
}
func (m *MetadataItem) GetAbsoluteIndex() *int64 {
if m == nil {
return nil
}
return m.AbsoluteIndex
}
func (m *MetadataItem) GetAddedAt() *int64 {
if m == nil {
return nil
}
return m.AddedAt
}
func (m *MetadataItem) GetArt() any {
if m == nil {
return nil
}
return m.Art
}
func (m *MetadataItem) GetAudienceRating() *float64 {
if m == nil {
return nil
}
return m.AudienceRating
}
func (m *MetadataItem) GetAudienceRatingImage() any {
if m == nil {
return nil
}
return m.AudienceRatingImage
}
func (m *MetadataItem) GetAutotag() []Tag {
if m == nil {
return nil
}
return m.Autotag
}
func (m *MetadataItem) GetBanner() any {
if m == nil {
return nil
}
return m.Banner
}
func (m *MetadataItem) GetChapterSource() any {
if m == nil {
return nil
}
return m.ChapterSource
}
func (m *MetadataItem) GetComposite() any {
if m == nil {
return nil
}
return m.Composite
}
func (m *MetadataItem) GetContentRating() any {
if m == nil {
return nil
}
return m.ContentRating
}
func (m *MetadataItem) GetCountry() []Tag {
if m == nil {
return nil
}
return m.Country
}
func (m *MetadataItem) GetDirector() []Tag {
if m == nil {
return nil
}
return m.Director
}
func (m *MetadataItem) GetDuration() *int64 {
if m == nil {
return nil
}
return m.Duration
}
func (m *MetadataItem) GetFilter() []Filter {
if m == nil {
return nil
}
return m.Filter
}
func (m *MetadataItem) GetGenre() []Tag {
if m == nil {
return nil
}
return m.Genre
}
func (m *MetadataItem) GetGrandparentArt() *string {
if m == nil {
return nil
}
return m.GrandparentArt
}
func (m *MetadataItem) GetGrandparentHero() *string {
if m == nil {
return nil
}
return m.GrandparentHero
}
func (m *MetadataItem) GetGrandparentKey() *string {
if m == nil {
return nil
}
return m.GrandparentKey
}
func (m *MetadataItem) GetGrandparentRatingKey() *string {
if m == nil {
return nil
}
return m.GrandparentRatingKey
}
func (m *MetadataItem) GetGrandparentTheme() *string {
if m == nil {
return nil
}
return m.GrandparentTheme
}
func (m *MetadataItem) GetGrandparentThumb() *string {
if m == nil {
return nil
}
return m.GrandparentThumb
}
func (m *MetadataItem) GetGrandparentTitle() *string {
if m == nil {
return nil
}
return m.GrandparentTitle
}
func (m *MetadataItem) GetGUID() []Tag {
if m == nil {
return nil
}
return m.GUID
}
func (m *MetadataItem) GetHero() any {
if m == nil {
return nil
}
return m.Hero
}
func (m *MetadataItem) GetImage() []Image {
if m == nil {
return nil
}
return m.Image
}
func (m *MetadataItem) GetIndex() *int64 {
if m == nil {
return nil
}
return m.Index
}
func (m *MetadataItem) GetKey() any {
if m == nil {
return nil
}
return m.Key
}
func (m *MetadataItem) GetLastViewedAt() *int64 {
if m == nil {
return nil
}
return m.LastViewedAt
}
func (m *MetadataItem) GetLeafCount() *int64 {
if m == nil {
return nil
}
return m.LeafCount
}
func (m *MetadataItem) GetMedia() []Media {
if m == nil {
return nil
}
return m.Media
}
func (m *MetadataItem) GetOriginallyAvailableAt() any {
if m == nil {
return nil
}
return m.OriginallyAvailableAt
}
func (m *MetadataItem) GetOriginalTitle() any {
if m == nil {
return nil
}
return m.OriginalTitle
}
func (m *MetadataItem) GetParentHero() *string {
if m == nil {
return nil
}
return m.ParentHero
}
func (m *MetadataItem) GetParentIndex() *int64 {
if m == nil {
return nil
}
return m.ParentIndex
}
func (m *MetadataItem) GetParentKey() *string {
if m == nil {
return nil
}
return m.ParentKey
}
func (m *MetadataItem) GetParentRatingKey() *string {
if m == nil {
return nil
}
return m.ParentRatingKey
}
func (m *MetadataItem) GetParentThumb() *string {
if m == nil {
return nil
}
return m.ParentThumb
}
func (m *MetadataItem) GetParentTitle() *string {
if m == nil {
return nil
}
return m.ParentTitle
}
func (m *MetadataItem) GetPrimaryExtraKey() any {
if m == nil {
return nil
}
return m.PrimaryExtraKey
}
func (m *MetadataItem) GetPrompt() *string {
if m == nil {
return nil
}
return m.Prompt
}
func (m *MetadataItem) GetRating() *float64 {
if m == nil {
return nil
}
return m.Rating
}
func (m *MetadataItem) GetRatingArray() []Tag {
if m == nil {
return nil
}
return m.RatingArray
}
func (m *MetadataItem) GetRatingCount() *int64 {
if m == nil {
return nil
}
return m.RatingCount
}
func (m *MetadataItem) GetRatingImage() any {
if m == nil {
return nil
}
return m.RatingImage
}
func (m *MetadataItem) GetRatingKey() any {
if m == nil {
return nil
}
return m.RatingKey
}
func (m *MetadataItem) GetRole() []Tag {
if m == nil {
return nil
}
return m.Role
}
func (m *MetadataItem) GetSearch() *bool {
if m == nil {
return nil
}
return m.Search
}
func (m *MetadataItem) GetSecondary() *bool {
if m == nil {
return nil
}
return m.Secondary
}
func (m *MetadataItem) GetSkipChildren() *bool {
if m == nil {
return nil
}
return m.SkipChildren
}
func (m *MetadataItem) GetSkipParent() *bool {
if m == nil {
return nil
}
return m.SkipParent
}
func (m *MetadataItem) GetSort() []Sort {
if m == nil {
return nil
}
return m.Sort
}
func (m *MetadataItem) GetStudio() any {
if m == nil {
return nil
}
return m.Studio
}
func (m *MetadataItem) GetSubtype() any {
if m == nil {
return nil
}
return m.Subtype
}
func (m *MetadataItem) GetSummary() any {
if m == nil {
return nil
}
return m.Summary
}
func (m *MetadataItem) GetTagline() any {
if m == nil {
return nil
}
return m.Tagline
}
func (m *MetadataItem) GetTheme() any {
if m == nil {
return nil
}
return m.Theme
}
func (m *MetadataItem) GetThumb() any {
if m == nil {
return nil
}
return m.Thumb
}
func (m *MetadataItem) GetTitleSort() any {
if m == nil {
return nil
}
return m.TitleSort
}
func (m *MetadataItem) GetUpdatedAt() *int64 {
if m == nil {
return nil
}
return m.UpdatedAt
}
func (m *MetadataItem) GetUserRating() *float64 {
if m == nil {
return nil
}
return m.UserRating
}
func (m *MetadataItem) GetViewCount() *int64 {
if m == nil {
return nil
}
return m.ViewCount
}
func (m *MetadataItem) GetViewedLeafCount() *int64 {
if m == nil {
return nil
}
return m.ViewedLeafCount
}
func (m *MetadataItem) GetViewOffset() *int64 {
if m == nil {
return nil
}
return m.ViewOffset
}
func (m *MetadataItem) GetWriter() []Tag {
if m == nil {
return nil
}
return m.Writer
}
func (m *MetadataItem) GetYear() *int64 {
if m == nil {
return nil
}
return m.Year
}
func (m *MetadataItem) GetMetadataItem() []Items {
if m == nil {
return nil
}
return m.MetadataItem
}
func (m *MetadataItem) GetAdditionalProperties() map[string]any {
if m == nil {
return nil
}
return m.AdditionalProperties
}
// MediaContainerWithNestedMetadataMediaContainer - `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
// Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
// The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
type MediaContainerWithNestedMetadataMediaContainer struct {
Identifier *string `json:"identifier,omitempty"`
// The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
//
Offset *int64 `json:"offset,omitempty"`
Size *int64 `json:"size,omitempty"`
// The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
//
TotalSize *int64 `json:"totalSize,omitempty"`
MetadataItem []MetadataItem `json:"MetadataItem,omitempty"`
}
func (m *MediaContainerWithNestedMetadataMediaContainer) GetIdentifier() *string {
if m == nil {
return nil
}
return m.Identifier
}
func (m *MediaContainerWithNestedMetadataMediaContainer) GetOffset() *int64 {
if m == nil {
return nil
}
return m.Offset
}
func (m *MediaContainerWithNestedMetadataMediaContainer) GetSize() *int64 {
if m == nil {
return nil
}
return m.Size
}
func (m *MediaContainerWithNestedMetadataMediaContainer) GetTotalSize() *int64 {
if m == nil {
return nil
}
return m.TotalSize
}
func (m *MediaContainerWithNestedMetadataMediaContainer) GetMetadataItem() []MetadataItem {
if m == nil {
return nil
}
return m.MetadataItem
}
type MediaContainerWithNestedMetadata struct {
MediaContainer *MediaContainerWithNestedMetadataMediaContainer `json:"MediaContainer,omitempty"`
}
func (m *MediaContainerWithNestedMetadata) GetMediaContainer() *MediaContainerWithNestedMetadataMediaContainer {
if m == nil {
return nil
}
return m.MediaContainer
}

View File

@@ -0,0 +1,756 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
import (
"encoding/json"
"fmt"
"github.com/LukeHagar/plexgo/internal/utils"
)
// PlaylistType - The type of the playlist.
type PlaylistType string
const (
PlaylistTypeAudio PlaylistType = "audio"
PlaylistTypeVideo PlaylistType = "video"
PlaylistTypePhoto PlaylistType = "photo"
)
func (e PlaylistType) ToPointer() *PlaylistType {
return &e
}
func (e *PlaylistType) UnmarshalJSON(data []byte) error {
var v string
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case "audio":
fallthrough
case "video":
fallthrough
case "photo":
*e = PlaylistType(v)
return nil
default:
return fmt.Errorf("invalid value for PlaylistType: %v", v)
}
}
// MediaContainerWithPlaylistMetadataMetadata - Items in a library are referred to as "metadata items." These metadata items are distinct from "media items" which represent actual instances of media that can be consumed. Consider a TV library that has a single video file in it for a particular episode of a show. The library has a single media item, but it has three metadata items: one for the show, one for the season, and one for the episode. Consider a movie library that has two video files in it: the same movie, but two different resolutions. The library has a single metadata item for the movie, but that metadata item has two media items, one for each resolution. Additionally a "media item" will have one or more "media parts" where the the parts are intended to be watched together, such as a CD1 and CD2 parts of the same movie.
//
// Note that when a metadata item has multiple media items, those media items should be isomorphic. That is, a 4K version and 1080p version of a movie are different versions of the same movie. They have the same duration, same summary, same rating, etc. and they can generally be considered interchangeable. A theatrical release vs. director's cut vs. unrated version on the other hand would be separate metadata items.
//
// Metadata items can often live in a hierarchy with relationships between them. For example, the metadata item for an episodes is associated with a season metadata item which is associated with a show metadata item. A similar hierarchy exists with track, album, and artist and photos and photo album. The relationships may be expressed via relative terms and absolute terms. For example, "leaves" refer to metadata items which has associated media (there is no media for a season nor show). A show will have "children" in the form of seasons and a season will have "children" in the form of episodes and episodes have "parent" in the form of a season which has a "parent" in the form of a show. Similarly, a show has "grandchildren" in the form of episodse and an episode has a "grandparent" in the form of a show.
type MediaContainerWithPlaylistMetadataMetadata struct {
// If we return this as true then this playlist cannot be altered or deleted directly by the client.
ReadOnly *bool `json:"readOnly,omitempty"`
// When present, the URL for a composite image for descendent items (e.g. photo albums or playlists).
Composite any `json:"composite,omitempty"`
// When present, the duration for the item, in units of milliseconds.
Duration *int64 `json:"duration,omitempty"`
// The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details.
Key any `json:"key,omitempty"`
// For shows and seasons, contains the number of total episodes.
LeafCount *int64 `json:"leafCount,omitempty"`
// The type of the playlist.
PlaylistType *PlaylistType `json:"playlistType,omitempty"`
// Whether or not the playlist is smart.
Smart *bool `json:"smart,omitempty"`
// If this is a special playlist, this returns its type (e.g. favorites).
SpecialPlaylistType *string `json:"specialPlaylistType,omitempty"`
// The title of the item (e.g. “300” or “The Simpsons”)
Title any `json:"title,omitempty"`
// The type of the video item, such as `movie`, `episode`, or `clip`.
Type any `json:"type,omitempty"`
// When present, contains the disc number for a track on multi-disc albums.
AbsoluteIndex *int64 `json:"absoluteIndex,omitempty"`
// In units of seconds since the epoch, returns the time at which the item was added to the library.
AddedAt *int64 `json:"addedAt,omitempty"`
// When present, the URL for the background artwork for the item.
Art any `json:"art,omitempty"`
// Some rating systems separate reviewer ratings from audience ratings
AudienceRating *float64 `json:"audienceRating,omitempty"`
// A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled).
AudienceRatingImage any `json:"audienceRatingImage,omitempty"`
Autotag []Tag `json:"Autotag,omitempty"`
// When present, the URL for a banner graphic for the item.
Banner any `json:"banner,omitempty"`
// When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two).
ChapterSource any `json:"chapterSource,omitempty"`
// If known, the content rating (e.g. MPAA) for an item.
ContentRating any `json:"contentRating,omitempty"`
Country []Tag `json:"Country,omitempty"`
Director []Tag `json:"Director,omitempty"`
// Typically only seen in metadata at a library's top level
Filter []Filter `json:"Filter,omitempty"`
Genre []Tag `json:"Genre,omitempty"`
// The `art` of the grandparent
GrandparentArt *string `json:"grandparentArt,omitempty"`
// The `hero` of the grandparent
GrandparentHero *string `json:"grandparentHero,omitempty"`
// The `key` of the grandparent
GrandparentKey *string `json:"grandparentKey,omitempty"`
// The `ratingKey` of the grandparent
GrandparentRatingKey *string `json:"grandparentRatingKey,omitempty"`
// The `theme` of the grandparent
GrandparentTheme *string `json:"grandparentTheme,omitempty"`
// The `thumb` of the grandparent
GrandparentThumb *string `json:"grandparentThumb,omitempty"`
// The `title` of the grandparent
GrandparentTitle *string `json:"grandparentTitle,omitempty"`
GUID []Tag `json:"Guid,omitempty"`
// When present, the URL for a hero image for the item.
Hero any `json:"hero,omitempty"`
Image []Image `json:"Image,omitempty"`
// When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks.
Index *int64 `json:"index,omitempty"`
// When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time.
LastViewedAt *int64 `json:"lastViewedAt,omitempty"`
Media []Media `json:"Media,omitempty"`
// When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well.
OriginallyAvailableAt any `json:"originallyAvailableAt,omitempty"`
// When present, used to indicate an item's original title, e.g. a movie's foreign title.
OriginalTitle any `json:"originalTitle,omitempty"`
// The `hero` of the parent
ParentHero *string `json:"parentHero,omitempty"`
// The `index` of the parent
ParentIndex *int64 `json:"parentIndex,omitempty"`
// The `key` of the parent
ParentKey *string `json:"parentKey,omitempty"`
// The `ratingKey` of the parent
ParentRatingKey *string `json:"parentRatingKey,omitempty"`
// The `thumb` of the parent
ParentThumb *string `json:"parentThumb,omitempty"`
// The `title` of the parent
ParentTitle *string `json:"parentTitle,omitempty"`
// Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item.
PrimaryExtraKey any `json:"primaryExtraKey,omitempty"`
// Prompt to give the user for this directory (such as `Search Movies`)
Prompt *string `json:"prompt,omitempty"`
// When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from.
Rating *float64 `json:"rating,omitempty"`
RatingArray []Tag `json:"Rating,omitempty"`
// Number of ratings under this metadata
RatingCount *int64 `json:"ratingCount,omitempty"`
// When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten.
RatingImage any `json:"ratingImage,omitempty"`
// This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed.
RatingKey any `json:"ratingKey,omitempty"`
Role []Tag `json:"Role,omitempty"`
// Indicates this is a search directory
Search *bool `json:"search,omitempty"`
// Used by old clients to provide nested menus allowing for primative (but structured) navigation.
Secondary *bool `json:"secondary,omitempty"`
// When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc.
SkipChildren *bool `json:"skipChildren,omitempty"`
// When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show).
SkipParent *bool `json:"skipParent,omitempty"`
// Typically only seen in metadata at a library's top level
Sort []Sort `json:"Sort,omitempty"`
// When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums).
Studio any `json:"studio,omitempty"`
// The subtype of the video item, such as `photo` when the video item is in a photo library
Subtype any `json:"subtype,omitempty"`
// When present, the extended textual information about the item (e.g. movie plot, artist biography, album review).
Summary any `json:"summary,omitempty"`
// When present, a pithy one-liner about the item (usually only seen for movies).
Tagline any `json:"tagline,omitempty"`
// When present, the URL for theme music for the item (usually only for TV shows).
Theme any `json:"theme,omitempty"`
// When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail.
Thumb any `json:"thumb,omitempty"`
// Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”).
TitleSort any `json:"titleSort,omitempty"`
// In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated).
UpdatedAt *int64 `json:"updatedAt,omitempty"`
// When the user has rated an item, this contains the user rating
UserRating *float64 `json:"userRating,omitempty"`
// When a users has completed watched or listened to an item, this attribute contains the number of consumptions.
ViewCount *int64 `json:"viewCount,omitempty"`
// For shows and seasons, contains the number of viewed episodes.
ViewedLeafCount *int64 `json:"viewedLeafCount,omitempty"`
// When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds.
ViewOffset *int64 `json:"viewOffset,omitempty"`
Writer []Tag `json:"Writer,omitempty"`
// When present, the year associated with the item's release (e.g. release year for a movie).
Year *int64 `json:"year,omitempty"`
AdditionalProperties map[string]any `additionalProperties:"true" json:"-"`
}
func (m MediaContainerWithPlaylistMetadataMetadata) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(m, "", false)
}
func (m *MediaContainerWithPlaylistMetadataMetadata) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &m, "", false, nil); err != nil {
return err
}
return nil
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetReadOnly() *bool {
if m == nil {
return nil
}
return m.ReadOnly
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetComposite() any {
if m == nil {
return nil
}
return m.Composite
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetDuration() *int64 {
if m == nil {
return nil
}
return m.Duration
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetKey() any {
if m == nil {
return nil
}
return m.Key
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetLeafCount() *int64 {
if m == nil {
return nil
}
return m.LeafCount
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetPlaylistType() *PlaylistType {
if m == nil {
return nil
}
return m.PlaylistType
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetSmart() *bool {
if m == nil {
return nil
}
return m.Smart
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetSpecialPlaylistType() *string {
if m == nil {
return nil
}
return m.SpecialPlaylistType
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetTitle() any {
if m == nil {
return nil
}
return m.Title
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetType() any {
if m == nil {
return nil
}
return m.Type
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetAbsoluteIndex() *int64 {
if m == nil {
return nil
}
return m.AbsoluteIndex
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetAddedAt() *int64 {
if m == nil {
return nil
}
return m.AddedAt
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetArt() any {
if m == nil {
return nil
}
return m.Art
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetAudienceRating() *float64 {
if m == nil {
return nil
}
return m.AudienceRating
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetAudienceRatingImage() any {
if m == nil {
return nil
}
return m.AudienceRatingImage
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetAutotag() []Tag {
if m == nil {
return nil
}
return m.Autotag
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetBanner() any {
if m == nil {
return nil
}
return m.Banner
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetChapterSource() any {
if m == nil {
return nil
}
return m.ChapterSource
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetContentRating() any {
if m == nil {
return nil
}
return m.ContentRating
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetCountry() []Tag {
if m == nil {
return nil
}
return m.Country
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetDirector() []Tag {
if m == nil {
return nil
}
return m.Director
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetFilter() []Filter {
if m == nil {
return nil
}
return m.Filter
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetGenre() []Tag {
if m == nil {
return nil
}
return m.Genre
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetGrandparentArt() *string {
if m == nil {
return nil
}
return m.GrandparentArt
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetGrandparentHero() *string {
if m == nil {
return nil
}
return m.GrandparentHero
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetGrandparentKey() *string {
if m == nil {
return nil
}
return m.GrandparentKey
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetGrandparentRatingKey() *string {
if m == nil {
return nil
}
return m.GrandparentRatingKey
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetGrandparentTheme() *string {
if m == nil {
return nil
}
return m.GrandparentTheme
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetGrandparentThumb() *string {
if m == nil {
return nil
}
return m.GrandparentThumb
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetGrandparentTitle() *string {
if m == nil {
return nil
}
return m.GrandparentTitle
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetGUID() []Tag {
if m == nil {
return nil
}
return m.GUID
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetHero() any {
if m == nil {
return nil
}
return m.Hero
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetImage() []Image {
if m == nil {
return nil
}
return m.Image
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetIndex() *int64 {
if m == nil {
return nil
}
return m.Index
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetLastViewedAt() *int64 {
if m == nil {
return nil
}
return m.LastViewedAt
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetMedia() []Media {
if m == nil {
return nil
}
return m.Media
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetOriginallyAvailableAt() any {
if m == nil {
return nil
}
return m.OriginallyAvailableAt
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetOriginalTitle() any {
if m == nil {
return nil
}
return m.OriginalTitle
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetParentHero() *string {
if m == nil {
return nil
}
return m.ParentHero
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetParentIndex() *int64 {
if m == nil {
return nil
}
return m.ParentIndex
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetParentKey() *string {
if m == nil {
return nil
}
return m.ParentKey
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetParentRatingKey() *string {
if m == nil {
return nil
}
return m.ParentRatingKey
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetParentThumb() *string {
if m == nil {
return nil
}
return m.ParentThumb
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetParentTitle() *string {
if m == nil {
return nil
}
return m.ParentTitle
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetPrimaryExtraKey() any {
if m == nil {
return nil
}
return m.PrimaryExtraKey
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetPrompt() *string {
if m == nil {
return nil
}
return m.Prompt
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetRating() *float64 {
if m == nil {
return nil
}
return m.Rating
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetRatingArray() []Tag {
if m == nil {
return nil
}
return m.RatingArray
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetRatingCount() *int64 {
if m == nil {
return nil
}
return m.RatingCount
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetRatingImage() any {
if m == nil {
return nil
}
return m.RatingImage
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetRatingKey() any {
if m == nil {
return nil
}
return m.RatingKey
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetRole() []Tag {
if m == nil {
return nil
}
return m.Role
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetSearch() *bool {
if m == nil {
return nil
}
return m.Search
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetSecondary() *bool {
if m == nil {
return nil
}
return m.Secondary
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetSkipChildren() *bool {
if m == nil {
return nil
}
return m.SkipChildren
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetSkipParent() *bool {
if m == nil {
return nil
}
return m.SkipParent
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetSort() []Sort {
if m == nil {
return nil
}
return m.Sort
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetStudio() any {
if m == nil {
return nil
}
return m.Studio
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetSubtype() any {
if m == nil {
return nil
}
return m.Subtype
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetSummary() any {
if m == nil {
return nil
}
return m.Summary
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetTagline() any {
if m == nil {
return nil
}
return m.Tagline
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetTheme() any {
if m == nil {
return nil
}
return m.Theme
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetThumb() any {
if m == nil {
return nil
}
return m.Thumb
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetTitleSort() any {
if m == nil {
return nil
}
return m.TitleSort
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetUpdatedAt() *int64 {
if m == nil {
return nil
}
return m.UpdatedAt
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetUserRating() *float64 {
if m == nil {
return nil
}
return m.UserRating
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetViewCount() *int64 {
if m == nil {
return nil
}
return m.ViewCount
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetViewedLeafCount() *int64 {
if m == nil {
return nil
}
return m.ViewedLeafCount
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetViewOffset() *int64 {
if m == nil {
return nil
}
return m.ViewOffset
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetWriter() []Tag {
if m == nil {
return nil
}
return m.Writer
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetYear() *int64 {
if m == nil {
return nil
}
return m.Year
}
func (m *MediaContainerWithPlaylistMetadataMetadata) GetAdditionalProperties() map[string]any {
if m == nil {
return nil
}
return m.AdditionalProperties
}
// MediaContainerWithPlaylistMetadataMediaContainer - `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
// Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
// The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
type MediaContainerWithPlaylistMetadataMediaContainer struct {
Identifier *string `json:"identifier,omitempty"`
// The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
//
Offset *int64 `json:"offset,omitempty"`
Size *int64 `json:"size,omitempty"`
// The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
//
TotalSize *int64 `json:"totalSize,omitempty"`
Metadata []MediaContainerWithPlaylistMetadataMetadata `json:"Metadata,omitempty"`
}
func (m *MediaContainerWithPlaylistMetadataMediaContainer) GetIdentifier() *string {
if m == nil {
return nil
}
return m.Identifier
}
func (m *MediaContainerWithPlaylistMetadataMediaContainer) GetOffset() *int64 {
if m == nil {
return nil
}
return m.Offset
}
func (m *MediaContainerWithPlaylistMetadataMediaContainer) GetSize() *int64 {
if m == nil {
return nil
}
return m.Size
}
func (m *MediaContainerWithPlaylistMetadataMediaContainer) GetTotalSize() *int64 {
if m == nil {
return nil
}
return m.TotalSize
}
func (m *MediaContainerWithPlaylistMetadataMediaContainer) GetMetadata() []MediaContainerWithPlaylistMetadataMetadata {
if m == nil {
return nil
}
return m.Metadata
}
type MediaContainerWithPlaylistMetadata struct {
MediaContainer *MediaContainerWithPlaylistMetadataMediaContainer `json:"MediaContainer,omitempty"`
}
func (m *MediaContainerWithPlaylistMetadata) GetMediaContainer() *MediaContainerWithPlaylistMetadataMediaContainer {
if m == nil {
return nil
}
return m.MediaContainer
}

View File

@@ -0,0 +1,64 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
// MediaContainerWithSettingsMediaContainer - `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
// Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
// The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
type MediaContainerWithSettingsMediaContainer struct {
Identifier *string `json:"identifier,omitempty"`
// The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
//
Offset *int64 `json:"offset,omitempty"`
Size *int64 `json:"size,omitempty"`
// The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
//
TotalSize *int64 `json:"totalSize,omitempty"`
Setting []Setting `json:"Setting,omitempty"`
}
func (m *MediaContainerWithSettingsMediaContainer) GetIdentifier() *string {
if m == nil {
return nil
}
return m.Identifier
}
func (m *MediaContainerWithSettingsMediaContainer) GetOffset() *int64 {
if m == nil {
return nil
}
return m.Offset
}
func (m *MediaContainerWithSettingsMediaContainer) GetSize() *int64 {
if m == nil {
return nil
}
return m.Size
}
func (m *MediaContainerWithSettingsMediaContainer) GetTotalSize() *int64 {
if m == nil {
return nil
}
return m.TotalSize
}
func (m *MediaContainerWithSettingsMediaContainer) GetSetting() []Setting {
if m == nil {
return nil
}
return m.Setting
}
type MediaContainerWithSettings struct {
MediaContainer *MediaContainerWithSettingsMediaContainer `json:"MediaContainer,omitempty"`
}
func (m *MediaContainerWithSettings) GetMediaContainer() *MediaContainerWithSettingsMediaContainer {
if m == nil {
return nil
}
return m.MediaContainer
}

View File

@@ -0,0 +1,64 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
// MediaContainerWithSubscriptionMediaContainer - `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
// Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
// The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
type MediaContainerWithSubscriptionMediaContainer struct {
Identifier *string `json:"identifier,omitempty"`
// The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
//
Offset *int64 `json:"offset,omitempty"`
Size *int64 `json:"size,omitempty"`
// The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
//
TotalSize *int64 `json:"totalSize,omitempty"`
MediaSubscription []MediaSubscription `json:"MediaSubscription,omitempty"`
}
func (m *MediaContainerWithSubscriptionMediaContainer) GetIdentifier() *string {
if m == nil {
return nil
}
return m.Identifier
}
func (m *MediaContainerWithSubscriptionMediaContainer) GetOffset() *int64 {
if m == nil {
return nil
}
return m.Offset
}
func (m *MediaContainerWithSubscriptionMediaContainer) GetSize() *int64 {
if m == nil {
return nil
}
return m.Size
}
func (m *MediaContainerWithSubscriptionMediaContainer) GetTotalSize() *int64 {
if m == nil {
return nil
}
return m.TotalSize
}
func (m *MediaContainerWithSubscriptionMediaContainer) GetMediaSubscription() []MediaSubscription {
if m == nil {
return nil
}
return m.MediaSubscription
}
type MediaContainerWithSubscription struct {
MediaContainer *MediaContainerWithSubscriptionMediaContainer `json:"MediaContainer,omitempty"`
}
func (m *MediaContainerWithSubscription) GetMediaContainer() *MediaContainerWithSubscriptionMediaContainer {
if m == nil {
return nil
}
return m.MediaContainer
}

View File

@@ -0,0 +1,150 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
import (
"encoding/json"
"fmt"
)
type Status string
const (
StatusInactive Status = "inactive"
StatusScheduled Status = "scheduled"
StatusInprogress Status = "inprogress"
StatusComplete Status = "complete"
StatusCancelled Status = "cancelled"
StatusError Status = "error"
StatusPostprocessing Status = "postprocessing"
StatusPaused Status = "paused"
)
func (e Status) ToPointer() *Status {
return &e
}
func (e *Status) UnmarshalJSON(data []byte) error {
var v string
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case "inactive":
fallthrough
case "scheduled":
fallthrough
case "inprogress":
fallthrough
case "complete":
fallthrough
case "cancelled":
fallthrough
case "error":
fallthrough
case "postprocessing":
fallthrough
case "paused":
*e = Status(v)
return nil
default:
return fmt.Errorf("invalid value for Status: %v", v)
}
}
// MediaGrabOperation - A media grab opration represents a scheduled or active recording of media
type MediaGrabOperation struct {
CurrentSize *int64 `json:"currentSize,omitempty"`
GrabberIdentifier *string `json:"grabberIdentifier,omitempty"`
GrabberProtocol *string `json:"grabberProtocol,omitempty"`
ID *string `json:"id,omitempty"`
Key *string `json:"key,omitempty"`
MediaIndex *int64 `json:"mediaIndex,omitempty"`
MediaSubscriptionID *int64 `json:"mediaSubscriptionID,omitempty"`
// Items in a library are referred to as "metadata items." These metadata items are distinct from "media items" which represent actual instances of media that can be consumed. Consider a TV library that has a single video file in it for a particular episode of a show. The library has a single media item, but it has three metadata items: one for the show, one for the season, and one for the episode. Consider a movie library that has two video files in it: the same movie, but two different resolutions. The library has a single metadata item for the movie, but that metadata item has two media items, one for each resolution. Additionally a "media item" will have one or more "media parts" where the the parts are intended to be watched together, such as a CD1 and CD2 parts of the same movie.
//
// Note that when a metadata item has multiple media items, those media items should be isomorphic. That is, a 4K version and 1080p version of a movie are different versions of the same movie. They have the same duration, same summary, same rating, etc. and they can generally be considered interchangeable. A theatrical release vs. director's cut vs. unrated version on the other hand would be separate metadata items.
//
// Metadata items can often live in a hierarchy with relationships between them. For example, the metadata item for an episodes is associated with a season metadata item which is associated with a show metadata item. A similar hierarchy exists with track, album, and artist and photos and photo album. The relationships may be expressed via relative terms and absolute terms. For example, "leaves" refer to metadata items which has associated media (there is no media for a season nor show). A show will have "children" in the form of seasons and a season will have "children" in the form of episodes and episodes have "parent" in the form of a season which has a "parent" in the form of a show. Similarly, a show has "grandchildren" in the form of episodse and an episode has a "grandparent" in the form of a show.
//
Metadata *Metadata `json:"Metadata,omitempty"`
Percent *float64 `json:"percent,omitempty"`
Provider *string `json:"provider,omitempty"`
Status *Status `json:"status,omitempty"`
}
func (m *MediaGrabOperation) GetCurrentSize() *int64 {
if m == nil {
return nil
}
return m.CurrentSize
}
func (m *MediaGrabOperation) GetGrabberIdentifier() *string {
if m == nil {
return nil
}
return m.GrabberIdentifier
}
func (m *MediaGrabOperation) GetGrabberProtocol() *string {
if m == nil {
return nil
}
return m.GrabberProtocol
}
func (m *MediaGrabOperation) GetID() *string {
if m == nil {
return nil
}
return m.ID
}
func (m *MediaGrabOperation) GetKey() *string {
if m == nil {
return nil
}
return m.Key
}
func (m *MediaGrabOperation) GetMediaIndex() *int64 {
if m == nil {
return nil
}
return m.MediaIndex
}
func (m *MediaGrabOperation) GetMediaSubscriptionID() *int64 {
if m == nil {
return nil
}
return m.MediaSubscriptionID
}
func (m *MediaGrabOperation) GetMetadata() *Metadata {
if m == nil {
return nil
}
return m.Metadata
}
func (m *MediaGrabOperation) GetPercent() *float64 {
if m == nil {
return nil
}
return m.Percent
}
func (m *MediaGrabOperation) GetProvider() *string {
if m == nil {
return nil
}
return m.Provider
}
func (m *MediaGrabOperation) GetStatus() *Status {
if m == nil {
return nil
}
return m.Status
}

View File

@@ -0,0 +1,6 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
type MediaQuery struct {
}

View File

@@ -0,0 +1,174 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
import (
"encoding/json"
"fmt"
)
type AiringsType string
const (
AiringsTypeNewAiringsOnly AiringsType = "New Airings Only"
AiringsTypeNewAndRepeatAirings AiringsType = "New and Repeat Airings"
)
func (e AiringsType) ToPointer() *AiringsType {
return &e
}
func (e *AiringsType) UnmarshalJSON(data []byte) error {
var v string
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case "New Airings Only":
fallthrough
case "New and Repeat Airings":
*e = AiringsType(v)
return nil
default:
return fmt.Errorf("invalid value for AiringsType: %v", v)
}
}
// MediaSubscription - A media subscription contains a representation of metadata desired to be recorded
type MediaSubscription struct {
Title *string `json:"title,omitempty"`
// The metadata type of the root item of the subscription
Type *int64 `json:"type,omitempty"`
AiringsType *AiringsType `json:"airingsType,omitempty"`
CreatedAt *int64 `json:"createdAt,omitempty"`
// Media Matching Hints
Directory map[string]any `json:"Directory,omitempty"`
// Only included if `includeStorage` is specified
DurationTotal *int64 `json:"durationTotal,omitempty"`
Key *string `json:"key,omitempty"`
LibrarySectionTitle *string `json:"librarySectionTitle,omitempty"`
LocationPath *string `json:"locationPath,omitempty"`
MediaGrabOperation []MediaGrabOperation `json:"MediaGrabOperation,omitempty"`
// Media Matching Hints
Playlist map[string]any `json:"Playlist,omitempty"`
Setting []Setting `json:"Setting,omitempty"`
// Only included if `includeStorage` is specified
StorageTotal *int64 `json:"storageTotal,omitempty"`
// The library section id for where the item is to be recorded
TargetLibrarySectionID *int64 `json:"targetLibrarySectionID,omitempty"`
// The library section location id for where the item is to be recorded
TargetSectionLocationID *int64 `json:"targetSectionLocationID,omitempty"`
// Media Matching Hints
Video map[string]any `json:"Video,omitempty"`
}
func (m *MediaSubscription) GetTitle() *string {
if m == nil {
return nil
}
return m.Title
}
func (m *MediaSubscription) GetType() *int64 {
if m == nil {
return nil
}
return m.Type
}
func (m *MediaSubscription) GetAiringsType() *AiringsType {
if m == nil {
return nil
}
return m.AiringsType
}
func (m *MediaSubscription) GetCreatedAt() *int64 {
if m == nil {
return nil
}
return m.CreatedAt
}
func (m *MediaSubscription) GetDirectory() map[string]any {
if m == nil {
return nil
}
return m.Directory
}
func (m *MediaSubscription) GetDurationTotal() *int64 {
if m == nil {
return nil
}
return m.DurationTotal
}
func (m *MediaSubscription) GetKey() *string {
if m == nil {
return nil
}
return m.Key
}
func (m *MediaSubscription) GetLibrarySectionTitle() *string {
if m == nil {
return nil
}
return m.LibrarySectionTitle
}
func (m *MediaSubscription) GetLocationPath() *string {
if m == nil {
return nil
}
return m.LocationPath
}
func (m *MediaSubscription) GetMediaGrabOperation() []MediaGrabOperation {
if m == nil {
return nil
}
return m.MediaGrabOperation
}
func (m *MediaSubscription) GetPlaylist() map[string]any {
if m == nil {
return nil
}
return m.Playlist
}
func (m *MediaSubscription) GetSetting() []Setting {
if m == nil {
return nil
}
return m.Setting
}
func (m *MediaSubscription) GetStorageTotal() *int64 {
if m == nil {
return nil
}
return m.StorageTotal
}
func (m *MediaSubscription) GetTargetLibrarySectionID() *int64 {
if m == nil {
return nil
}
return m.TargetLibrarySectionID
}
func (m *MediaSubscription) GetTargetSectionLocationID() *int64 {
if m == nil {
return nil
}
return m.TargetSectionLocationID
}
func (m *MediaSubscription) GetVideo() map[string]any {
if m == nil {
return nil
}
return m.Video
}

View File

@@ -0,0 +1,627 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
import (
"github.com/LukeHagar/plexgo/internal/utils"
)
// Metadata - Items in a library are referred to as "metadata items." These metadata items are distinct from "media items" which represent actual instances of media that can be consumed. Consider a TV library that has a single video file in it for a particular episode of a show. The library has a single media item, but it has three metadata items: one for the show, one for the season, and one for the episode. Consider a movie library that has two video files in it: the same movie, but two different resolutions. The library has a single metadata item for the movie, but that metadata item has two media items, one for each resolution. Additionally a "media item" will have one or more "media parts" where the the parts are intended to be watched together, such as a CD1 and CD2 parts of the same movie.
//
// Note that when a metadata item has multiple media items, those media items should be isomorphic. That is, a 4K version and 1080p version of a movie are different versions of the same movie. They have the same duration, same summary, same rating, etc. and they can generally be considered interchangeable. A theatrical release vs. director's cut vs. unrated version on the other hand would be separate metadata items.
//
// Metadata items can often live in a hierarchy with relationships between them. For example, the metadata item for an episodes is associated with a season metadata item which is associated with a show metadata item. A similar hierarchy exists with track, album, and artist and photos and photo album. The relationships may be expressed via relative terms and absolute terms. For example, "leaves" refer to metadata items which has associated media (there is no media for a season nor show). A show will have "children" in the form of seasons and a season will have "children" in the form of episodes and episodes have "parent" in the form of a season which has a "parent" in the form of a show. Similarly, a show has "grandchildren" in the form of episodse and an episode has a "grandparent" in the form of a show.
type Metadata struct {
// The title of the item (e.g. “300” or “The Simpsons”)
Title any `json:"title,omitempty"`
// The type of the video item, such as `movie`, `episode`, or `clip`.
Type any `json:"type,omitempty"`
// When present, contains the disc number for a track on multi-disc albums.
AbsoluteIndex *int64 `json:"absoluteIndex,omitempty"`
// In units of seconds since the epoch, returns the time at which the item was added to the library.
AddedAt *int64 `json:"addedAt,omitempty"`
// When present, the URL for the background artwork for the item.
Art any `json:"art,omitempty"`
// Some rating systems separate reviewer ratings from audience ratings
AudienceRating *float64 `json:"audienceRating,omitempty"`
// A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled).
AudienceRatingImage any `json:"audienceRatingImage,omitempty"`
Autotag []Tag `json:"Autotag,omitempty"`
// When present, the URL for a banner graphic for the item.
Banner any `json:"banner,omitempty"`
// When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two).
ChapterSource any `json:"chapterSource,omitempty"`
// When present, the URL for a composite image for descendent items (e.g. photo albums or playlists).
Composite any `json:"composite,omitempty"`
// If known, the content rating (e.g. MPAA) for an item.
ContentRating any `json:"contentRating,omitempty"`
Country []Tag `json:"Country,omitempty"`
Director []Tag `json:"Director,omitempty"`
// When present, the duration for the item, in units of milliseconds.
Duration *int64 `json:"duration,omitempty"`
// Typically only seen in metadata at a library's top level
Filter []Filter `json:"Filter,omitempty"`
Genre []Tag `json:"Genre,omitempty"`
// The `art` of the grandparent
GrandparentArt *string `json:"grandparentArt,omitempty"`
// The `hero` of the grandparent
GrandparentHero *string `json:"grandparentHero,omitempty"`
// The `key` of the grandparent
GrandparentKey *string `json:"grandparentKey,omitempty"`
// The `ratingKey` of the grandparent
GrandparentRatingKey *string `json:"grandparentRatingKey,omitempty"`
// The `theme` of the grandparent
GrandparentTheme *string `json:"grandparentTheme,omitempty"`
// The `thumb` of the grandparent
GrandparentThumb *string `json:"grandparentThumb,omitempty"`
// The `title` of the grandparent
GrandparentTitle *string `json:"grandparentTitle,omitempty"`
GUID []Tag `json:"Guid,omitempty"`
// When present, the URL for a hero image for the item.
Hero any `json:"hero,omitempty"`
Image []Image `json:"Image,omitempty"`
// When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks.
Index *int64 `json:"index,omitempty"`
// The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details.
Key any `json:"key,omitempty"`
// When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time.
LastViewedAt *int64 `json:"lastViewedAt,omitempty"`
// For shows and seasons, contains the number of total episodes.
LeafCount *int64 `json:"leafCount,omitempty"`
Media []Media `json:"Media,omitempty"`
// When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well.
OriginallyAvailableAt any `json:"originallyAvailableAt,omitempty"`
// When present, used to indicate an item's original title, e.g. a movie's foreign title.
OriginalTitle any `json:"originalTitle,omitempty"`
// The `hero` of the parent
ParentHero *string `json:"parentHero,omitempty"`
// The `index` of the parent
ParentIndex *int64 `json:"parentIndex,omitempty"`
// The `key` of the parent
ParentKey *string `json:"parentKey,omitempty"`
// The `ratingKey` of the parent
ParentRatingKey *string `json:"parentRatingKey,omitempty"`
// The `thumb` of the parent
ParentThumb *string `json:"parentThumb,omitempty"`
// The `title` of the parent
ParentTitle *string `json:"parentTitle,omitempty"`
// Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item.
PrimaryExtraKey any `json:"primaryExtraKey,omitempty"`
// Prompt to give the user for this directory (such as `Search Movies`)
Prompt *string `json:"prompt,omitempty"`
// When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from.
Rating *float64 `json:"rating,omitempty"`
RatingArray []Tag `json:"Rating,omitempty"`
// Number of ratings under this metadata
RatingCount *int64 `json:"ratingCount,omitempty"`
// When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten.
RatingImage any `json:"ratingImage,omitempty"`
// This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed.
RatingKey any `json:"ratingKey,omitempty"`
Role []Tag `json:"Role,omitempty"`
// Indicates this is a search directory
Search *bool `json:"search,omitempty"`
// Used by old clients to provide nested menus allowing for primative (but structured) navigation.
Secondary *bool `json:"secondary,omitempty"`
// When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc.
SkipChildren *bool `json:"skipChildren,omitempty"`
// When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show).
SkipParent *bool `json:"skipParent,omitempty"`
// Typically only seen in metadata at a library's top level
Sort []Sort `json:"Sort,omitempty"`
// When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums).
Studio any `json:"studio,omitempty"`
// The subtype of the video item, such as `photo` when the video item is in a photo library
Subtype any `json:"subtype,omitempty"`
// When present, the extended textual information about the item (e.g. movie plot, artist biography, album review).
Summary any `json:"summary,omitempty"`
// When present, a pithy one-liner about the item (usually only seen for movies).
Tagline any `json:"tagline,omitempty"`
// When present, the URL for theme music for the item (usually only for TV shows).
Theme any `json:"theme,omitempty"`
// When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail.
Thumb any `json:"thumb,omitempty"`
// Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”).
TitleSort any `json:"titleSort,omitempty"`
// In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated).
UpdatedAt *int64 `json:"updatedAt,omitempty"`
// When the user has rated an item, this contains the user rating
UserRating *float64 `json:"userRating,omitempty"`
// When a users has completed watched or listened to an item, this attribute contains the number of consumptions.
ViewCount *int64 `json:"viewCount,omitempty"`
// For shows and seasons, contains the number of viewed episodes.
ViewedLeafCount *int64 `json:"viewedLeafCount,omitempty"`
// When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds.
ViewOffset *int64 `json:"viewOffset,omitempty"`
Writer []Tag `json:"Writer,omitempty"`
// When present, the year associated with the item's release (e.g. release year for a movie).
Year *int64 `json:"year,omitempty"`
AdditionalProperties map[string]any `additionalProperties:"true" json:"-"`
}
func (m Metadata) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(m, "", false)
}
func (m *Metadata) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &m, "", false, nil); err != nil {
return err
}
return nil
}
func (m *Metadata) GetTitle() any {
if m == nil {
return nil
}
return m.Title
}
func (m *Metadata) GetType() any {
if m == nil {
return nil
}
return m.Type
}
func (m *Metadata) GetAbsoluteIndex() *int64 {
if m == nil {
return nil
}
return m.AbsoluteIndex
}
func (m *Metadata) GetAddedAt() *int64 {
if m == nil {
return nil
}
return m.AddedAt
}
func (m *Metadata) GetArt() any {
if m == nil {
return nil
}
return m.Art
}
func (m *Metadata) GetAudienceRating() *float64 {
if m == nil {
return nil
}
return m.AudienceRating
}
func (m *Metadata) GetAudienceRatingImage() any {
if m == nil {
return nil
}
return m.AudienceRatingImage
}
func (m *Metadata) GetAutotag() []Tag {
if m == nil {
return nil
}
return m.Autotag
}
func (m *Metadata) GetBanner() any {
if m == nil {
return nil
}
return m.Banner
}
func (m *Metadata) GetChapterSource() any {
if m == nil {
return nil
}
return m.ChapterSource
}
func (m *Metadata) GetComposite() any {
if m == nil {
return nil
}
return m.Composite
}
func (m *Metadata) GetContentRating() any {
if m == nil {
return nil
}
return m.ContentRating
}
func (m *Metadata) GetCountry() []Tag {
if m == nil {
return nil
}
return m.Country
}
func (m *Metadata) GetDirector() []Tag {
if m == nil {
return nil
}
return m.Director
}
func (m *Metadata) GetDuration() *int64 {
if m == nil {
return nil
}
return m.Duration
}
func (m *Metadata) GetFilter() []Filter {
if m == nil {
return nil
}
return m.Filter
}
func (m *Metadata) GetGenre() []Tag {
if m == nil {
return nil
}
return m.Genre
}
func (m *Metadata) GetGrandparentArt() *string {
if m == nil {
return nil
}
return m.GrandparentArt
}
func (m *Metadata) GetGrandparentHero() *string {
if m == nil {
return nil
}
return m.GrandparentHero
}
func (m *Metadata) GetGrandparentKey() *string {
if m == nil {
return nil
}
return m.GrandparentKey
}
func (m *Metadata) GetGrandparentRatingKey() *string {
if m == nil {
return nil
}
return m.GrandparentRatingKey
}
func (m *Metadata) GetGrandparentTheme() *string {
if m == nil {
return nil
}
return m.GrandparentTheme
}
func (m *Metadata) GetGrandparentThumb() *string {
if m == nil {
return nil
}
return m.GrandparentThumb
}
func (m *Metadata) GetGrandparentTitle() *string {
if m == nil {
return nil
}
return m.GrandparentTitle
}
func (m *Metadata) GetGUID() []Tag {
if m == nil {
return nil
}
return m.GUID
}
func (m *Metadata) GetHero() any {
if m == nil {
return nil
}
return m.Hero
}
func (m *Metadata) GetImage() []Image {
if m == nil {
return nil
}
return m.Image
}
func (m *Metadata) GetIndex() *int64 {
if m == nil {
return nil
}
return m.Index
}
func (m *Metadata) GetKey() any {
if m == nil {
return nil
}
return m.Key
}
func (m *Metadata) GetLastViewedAt() *int64 {
if m == nil {
return nil
}
return m.LastViewedAt
}
func (m *Metadata) GetLeafCount() *int64 {
if m == nil {
return nil
}
return m.LeafCount
}
func (m *Metadata) GetMedia() []Media {
if m == nil {
return nil
}
return m.Media
}
func (m *Metadata) GetOriginallyAvailableAt() any {
if m == nil {
return nil
}
return m.OriginallyAvailableAt
}
func (m *Metadata) GetOriginalTitle() any {
if m == nil {
return nil
}
return m.OriginalTitle
}
func (m *Metadata) GetParentHero() *string {
if m == nil {
return nil
}
return m.ParentHero
}
func (m *Metadata) GetParentIndex() *int64 {
if m == nil {
return nil
}
return m.ParentIndex
}
func (m *Metadata) GetParentKey() *string {
if m == nil {
return nil
}
return m.ParentKey
}
func (m *Metadata) GetParentRatingKey() *string {
if m == nil {
return nil
}
return m.ParentRatingKey
}
func (m *Metadata) GetParentThumb() *string {
if m == nil {
return nil
}
return m.ParentThumb
}
func (m *Metadata) GetParentTitle() *string {
if m == nil {
return nil
}
return m.ParentTitle
}
func (m *Metadata) GetPrimaryExtraKey() any {
if m == nil {
return nil
}
return m.PrimaryExtraKey
}
func (m *Metadata) GetPrompt() *string {
if m == nil {
return nil
}
return m.Prompt
}
func (m *Metadata) GetRating() *float64 {
if m == nil {
return nil
}
return m.Rating
}
func (m *Metadata) GetRatingArray() []Tag {
if m == nil {
return nil
}
return m.RatingArray
}
func (m *Metadata) GetRatingCount() *int64 {
if m == nil {
return nil
}
return m.RatingCount
}
func (m *Metadata) GetRatingImage() any {
if m == nil {
return nil
}
return m.RatingImage
}
func (m *Metadata) GetRatingKey() any {
if m == nil {
return nil
}
return m.RatingKey
}
func (m *Metadata) GetRole() []Tag {
if m == nil {
return nil
}
return m.Role
}
func (m *Metadata) GetSearch() *bool {
if m == nil {
return nil
}
return m.Search
}
func (m *Metadata) GetSecondary() *bool {
if m == nil {
return nil
}
return m.Secondary
}
func (m *Metadata) GetSkipChildren() *bool {
if m == nil {
return nil
}
return m.SkipChildren
}
func (m *Metadata) GetSkipParent() *bool {
if m == nil {
return nil
}
return m.SkipParent
}
func (m *Metadata) GetSort() []Sort {
if m == nil {
return nil
}
return m.Sort
}
func (m *Metadata) GetStudio() any {
if m == nil {
return nil
}
return m.Studio
}
func (m *Metadata) GetSubtype() any {
if m == nil {
return nil
}
return m.Subtype
}
func (m *Metadata) GetSummary() any {
if m == nil {
return nil
}
return m.Summary
}
func (m *Metadata) GetTagline() any {
if m == nil {
return nil
}
return m.Tagline
}
func (m *Metadata) GetTheme() any {
if m == nil {
return nil
}
return m.Theme
}
func (m *Metadata) GetThumb() any {
if m == nil {
return nil
}
return m.Thumb
}
func (m *Metadata) GetTitleSort() any {
if m == nil {
return nil
}
return m.TitleSort
}
func (m *Metadata) GetUpdatedAt() *int64 {
if m == nil {
return nil
}
return m.UpdatedAt
}
func (m *Metadata) GetUserRating() *float64 {
if m == nil {
return nil
}
return m.UserRating
}
func (m *Metadata) GetViewCount() *int64 {
if m == nil {
return nil
}
return m.ViewCount
}
func (m *Metadata) GetViewedLeafCount() *int64 {
if m == nil {
return nil
}
return m.ViewedLeafCount
}
func (m *Metadata) GetViewOffset() *int64 {
if m == nil {
return nil
}
return m.ViewOffset
}
func (m *Metadata) GetWriter() []Tag {
if m == nil {
return nil
}
return m.Writer
}
func (m *Metadata) GetYear() *int64 {
if m == nil {
return nil
}
return m.Year
}
func (m *Metadata) GetAdditionalProperties() map[string]any {
if m == nil {
return nil
}
return m.AdditionalProperties
}

123
models/components/part.go Normal file
View File

@@ -0,0 +1,123 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
import (
"github.com/LukeHagar/plexgo/internal/utils"
)
// Part - `Part` represents a particular file or "part" of a media item. The part is the playable unit of the media hierarchy. Suppose that a movie library contains a movie that is broken up into files, reminiscent of a movie split across two BDs. The metadata item represents information about the movie, the media item represents this instance of the movie at this resolution and quality, and the part items represent the two playable files. If another media were added which contained the joining of these two parts transcoded down to a lower resolution, then this metadata would contain 2 medias, one with 2 parts and one with 1 part.
type Part struct {
AudioProfile any `json:"audioProfile,omitempty"`
// The container of the media file, such as `mp4` or `mkv`
Container any `json:"container,omitempty"`
// The duration of the media item, in milliseconds
Duration *int64 `json:"duration,omitempty"`
// The local file path at which the part is stored on the server
File any `json:"file,omitempty"`
Has64bitOffsets *bool `json:"has64bitOffsets,omitempty"`
ID *int64 `json:"id,omitempty"`
// The key from which the media can be streamed
Key any `json:"key,omitempty"`
OptimizedForStreaming *bool `json:"optimizedForStreaming,omitempty"`
// The size of the media, in bytes
Size *int64 `json:"size,omitempty"`
Stream []Stream `json:"Stream,omitempty"`
VideoProfile any `json:"videoProfile,omitempty"`
AdditionalProperties map[string]any `additionalProperties:"true" json:"-"`
}
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, nil); err != nil {
return err
}
return nil
}
func (p *Part) GetAudioProfile() any {
if p == nil {
return nil
}
return p.AudioProfile
}
func (p *Part) GetContainer() any {
if p == nil {
return nil
}
return p.Container
}
func (p *Part) GetDuration() *int64 {
if p == nil {
return nil
}
return p.Duration
}
func (p *Part) GetFile() any {
if p == nil {
return nil
}
return p.File
}
func (p *Part) GetHas64bitOffsets() *bool {
if p == nil {
return nil
}
return p.Has64bitOffsets
}
func (p *Part) GetID() *int64 {
if p == nil {
return nil
}
return p.ID
}
func (p *Part) GetKey() any {
if p == nil {
return nil
}
return p.Key
}
func (p *Part) GetOptimizedForStreaming() *bool {
if p == nil {
return nil
}
return p.OptimizedForStreaming
}
func (p *Part) GetSize() *int64 {
if p == nil {
return nil
}
return p.Size
}
func (p *Part) GetStream() []Stream {
if p == nil {
return nil
}
return p.Stream
}
func (p *Part) GetVideoProfile() any {
if p == nil {
return nil
}
return p.VideoProfile
}
func (p *Part) GetAdditionalProperties() map[string]any {
if p == nil {
return nil
}
return p.AdditionalProperties
}

142
models/components/player.go Normal file
View File

@@ -0,0 +1,142 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
// Player - Information about the player being used for playback
type Player struct {
// The title of the client
Title *string `json:"title,omitempty"`
// The remote address
Address *string `json:"address,omitempty"`
// Indicating if the client is playing from the local LAN
Local *bool `json:"local,omitempty"`
// The identifier of the client
MachineIdentifier *string `json:"machineIdentifier,omitempty"`
// The model of the client
Model *string `json:"model,omitempty"`
// The platform of the client
Platform *string `json:"platform,omitempty"`
// The platformVersion of the client
PlatformVersion *string `json:"platformVersion,omitempty"`
// The product name of the client
Product *string `json:"product,omitempty"`
// Indicating if the client is playing over a relay connection
Relayed *bool `json:"relayed,omitempty"`
// The client's public address
RemotePublicAddress *string `json:"remotePublicAddress,omitempty"`
// Indicating if the client is playing over HTTPS
Secure *bool `json:"secure,omitempty"`
// The client's last reported state
State *string `json:"state,omitempty"`
// The id of the user
UserID *int64 `json:"userID,omitempty"`
// The vendor of the client
Vendor *string `json:"vendor,omitempty"`
// The version of the client
Version *string `json:"version,omitempty"`
}
func (p *Player) GetTitle() *string {
if p == nil {
return nil
}
return p.Title
}
func (p *Player) GetAddress() *string {
if p == nil {
return nil
}
return p.Address
}
func (p *Player) GetLocal() *bool {
if p == nil {
return nil
}
return p.Local
}
func (p *Player) GetMachineIdentifier() *string {
if p == nil {
return nil
}
return p.MachineIdentifier
}
func (p *Player) GetModel() *string {
if p == nil {
return nil
}
return p.Model
}
func (p *Player) GetPlatform() *string {
if p == nil {
return nil
}
return p.Platform
}
func (p *Player) GetPlatformVersion() *string {
if p == nil {
return nil
}
return p.PlatformVersion
}
func (p *Player) GetProduct() *string {
if p == nil {
return nil
}
return p.Product
}
func (p *Player) GetRelayed() *bool {
if p == nil {
return nil
}
return p.Relayed
}
func (p *Player) GetRemotePublicAddress() *string {
if p == nil {
return nil
}
return p.RemotePublicAddress
}
func (p *Player) GetSecure() *bool {
if p == nil {
return nil
}
return p.Secure
}
func (p *Player) GetState() *string {
if p == nil {
return nil
}
return p.State
}
func (p *Player) GetUserID() *int64 {
if p == nil {
return nil
}
return p.UserID
}
func (p *Player) GetVendor() *string {
if p == nil {
return nil
}
return p.Vendor
}
func (p *Player) GetVersion() *string {
if p == nil {
return nil
}
return p.Version
}

View File

@@ -0,0 +1,165 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
import (
"encoding/json"
"fmt"
"github.com/LukeHagar/plexgo/internal/utils"
)
type PostResponses200Type string
const (
PostResponses200TypeIntro PostResponses200Type = "intro"
PostResponses200TypeCommercial PostResponses200Type = "commercial"
PostResponses200TypeBookmark PostResponses200Type = "bookmark"
PostResponses200TypeResume PostResponses200Type = "resume"
PostResponses200TypeCredit PostResponses200Type = "credit"
)
func (e PostResponses200Type) ToPointer() *PostResponses200Type {
return &e
}
func (e *PostResponses200Type) UnmarshalJSON(data []byte) error {
var v string
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case "intro":
fallthrough
case "commercial":
fallthrough
case "bookmark":
fallthrough
case "resume":
fallthrough
case "credit":
*e = PostResponses200Type(v)
return nil
default:
return fmt.Errorf("invalid value for PostResponses200Type: %v", v)
}
}
// PostResponses200MediaContainer - `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
// Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
// The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
type PostResponses200MediaContainer struct {
Identifier *string `json:"identifier,omitempty"`
// The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
//
Offset *int64 `json:"offset,omitempty"`
Size *int64 `json:"size,omitempty"`
// The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
//
TotalSize *int64 `json:"totalSize,omitempty"`
Color *string `json:"color,omitempty"`
EndTimeOffset *int64 `json:"endTimeOffset,omitempty"`
ID *int64 `json:"id,omitempty"`
StartTimeOffset *int64 `json:"startTimeOffset,omitempty"`
Title *string `json:"title,omitempty"`
Type *PostResponses200Type `json:"type,omitempty"`
AdditionalProperties map[string]any `additionalProperties:"true" json:"-"`
}
func (p PostResponses200MediaContainer) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(p, "", false)
}
func (p *PostResponses200MediaContainer) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &p, "", false, nil); err != nil {
return err
}
return nil
}
func (p *PostResponses200MediaContainer) GetIdentifier() *string {
if p == nil {
return nil
}
return p.Identifier
}
func (p *PostResponses200MediaContainer) GetOffset() *int64 {
if p == nil {
return nil
}
return p.Offset
}
func (p *PostResponses200MediaContainer) GetSize() *int64 {
if p == nil {
return nil
}
return p.Size
}
func (p *PostResponses200MediaContainer) GetTotalSize() *int64 {
if p == nil {
return nil
}
return p.TotalSize
}
func (p *PostResponses200MediaContainer) GetColor() *string {
if p == nil {
return nil
}
return p.Color
}
func (p *PostResponses200MediaContainer) GetEndTimeOffset() *int64 {
if p == nil {
return nil
}
return p.EndTimeOffset
}
func (p *PostResponses200MediaContainer) GetID() *int64 {
if p == nil {
return nil
}
return p.ID
}
func (p *PostResponses200MediaContainer) GetStartTimeOffset() *int64 {
if p == nil {
return nil
}
return p.StartTimeOffset
}
func (p *PostResponses200MediaContainer) GetTitle() *string {
if p == nil {
return nil
}
return p.Title
}
func (p *PostResponses200MediaContainer) GetType() *PostResponses200Type {
if p == nil {
return nil
}
return p.Type
}
func (p *PostResponses200MediaContainer) GetAdditionalProperties() map[string]any {
if p == nil {
return nil
}
return p.AdditionalProperties
}
// PostResponses200 - OK
type PostResponses200 struct {
MediaContainer *PostResponses200MediaContainer `json:"MediaContainer,omitempty"`
}
func (p *PostResponses200) GetMediaContainer() *PostResponses200MediaContainer {
if p == nil {
return nil
}
return p.MediaContainer
}

View File

@@ -0,0 +1,37 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
import (
"encoding/json"
"fmt"
)
type Protocol string
const (
ProtocolHTTP Protocol = "http"
ProtocolHls Protocol = "hls"
ProtocolDash Protocol = "dash"
)
func (e Protocol) ToPointer() *Protocol {
return &e
}
func (e *Protocol) UnmarshalJSON(data []byte) error {
var v string
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case "http":
fallthrough
case "hls":
fallthrough
case "dash":
*e = Protocol(v)
return nil
default:
return fmt.Errorf("invalid value for Protocol: %v", v)
}
}

View File

@@ -0,0 +1,480 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
type RequestHandlerSlashGetResponses200Directory struct {
Count *int64 `json:"count,omitempty"`
// The key where this directory is found
Key *string `json:"key,omitempty"`
Title *string `json:"title,omitempty"`
}
func (r *RequestHandlerSlashGetResponses200Directory) GetCount() *int64 {
if r == nil {
return nil
}
return r.Count
}
func (r *RequestHandlerSlashGetResponses200Directory) GetKey() *string {
if r == nil {
return nil
}
return r.Key
}
func (r *RequestHandlerSlashGetResponses200Directory) GetTitle() *string {
if r == nil {
return nil
}
return r.Title
}
// RequestHandlerSlashGetResponses200MediaContainer - `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
// Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
// The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
type RequestHandlerSlashGetResponses200MediaContainer struct {
Identifier *string `json:"identifier,omitempty"`
// The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
//
Offset *int64 `json:"offset,omitempty"`
Size *int64 `json:"size,omitempty"`
// The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
//
TotalSize *int64 `json:"totalSize,omitempty"`
AllowCameraUpload *bool `json:"allowCameraUpload,omitempty"`
AllowChannelAccess *bool `json:"allowChannelAccess,omitempty"`
AllowMediaDeletion *bool `json:"allowMediaDeletion,omitempty"`
AllowSharing *bool `json:"allowSharing,omitempty"`
AllowSync *bool `json:"allowSync,omitempty"`
AllowTuners *bool `json:"allowTuners,omitempty"`
BackgroundProcessing *bool `json:"backgroundProcessing,omitempty"`
Certificate *bool `json:"certificate,omitempty"`
CompanionProxy *bool `json:"companionProxy,omitempty"`
CountryCode *string `json:"countryCode,omitempty"`
Diagnostics *string `json:"diagnostics,omitempty"`
EventStream *bool `json:"eventStream,omitempty"`
FriendlyName *string `json:"friendlyName,omitempty"`
HubSearch *bool `json:"hubSearch,omitempty"`
ItemClusters *bool `json:"itemClusters,omitempty"`
Livetv *int64 `json:"livetv,omitempty"`
MachineIdentifier any `json:"machineIdentifier,omitempty"`
MediaProviders *bool `json:"mediaProviders,omitempty"`
Multiuser *bool `json:"multiuser,omitempty"`
MusicAnalysis *int64 `json:"musicAnalysis,omitempty"`
MyPlex *bool `json:"myPlex,omitempty"`
MyPlexMappingState any `json:"myPlexMappingState,omitempty"`
MyPlexSigninState any `json:"myPlexSigninState,omitempty"`
MyPlexSubscription *bool `json:"myPlexSubscription,omitempty"`
MyPlexUsername *string `json:"myPlexUsername,omitempty"`
OfflineTranscode any `json:"offlineTranscode,omitempty"`
// A comma-separated list of features which are enabled for the server owner
OwnerFeatures *string `json:"ownerFeatures,omitempty"`
Platform *string `json:"platform,omitempty"`
PlatformVersion *string `json:"platformVersion,omitempty"`
PluginHost *bool `json:"pluginHost,omitempty"`
PushNotifications *bool `json:"pushNotifications,omitempty"`
ReadOnlyLibraries *bool `json:"readOnlyLibraries,omitempty"`
StreamingBrainABRVersion *int64 `json:"streamingBrainABRVersion,omitempty"`
StreamingBrainVersion *int64 `json:"streamingBrainVersion,omitempty"`
Sync *bool `json:"sync,omitempty"`
TranscoderActiveVideoSessions *int64 `json:"transcoderActiveVideoSessions,omitempty"`
TranscoderAudio *bool `json:"transcoderAudio,omitempty"`
TranscoderLyrics *bool `json:"transcoderLyrics,omitempty"`
TranscoderPhoto *bool `json:"transcoderPhoto,omitempty"`
TranscoderSubtitles *bool `json:"transcoderSubtitles,omitempty"`
TranscoderVideo *bool `json:"transcoderVideo,omitempty"`
// The suggested video quality bitrates to present to the user
TranscoderVideoBitrates any `json:"transcoderVideoBitrates,omitempty"`
TranscoderVideoQualities *string `json:"transcoderVideoQualities,omitempty"`
// The suggested video resolutions to the above quality bitrates
TranscoderVideoResolutions any `json:"transcoderVideoResolutions,omitempty"`
UpdatedAt *int64 `json:"updatedAt,omitempty"`
Updater *bool `json:"updater,omitempty"`
Version *string `json:"version,omitempty"`
VoiceSearch *bool `json:"voiceSearch,omitempty"`
Directory []RequestHandlerSlashGetResponses200Directory `json:"Directory,omitempty"`
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetIdentifier() *string {
if r == nil {
return nil
}
return r.Identifier
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetOffset() *int64 {
if r == nil {
return nil
}
return r.Offset
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetSize() *int64 {
if r == nil {
return nil
}
return r.Size
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetTotalSize() *int64 {
if r == nil {
return nil
}
return r.TotalSize
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetAllowCameraUpload() *bool {
if r == nil {
return nil
}
return r.AllowCameraUpload
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetAllowChannelAccess() *bool {
if r == nil {
return nil
}
return r.AllowChannelAccess
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetAllowMediaDeletion() *bool {
if r == nil {
return nil
}
return r.AllowMediaDeletion
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetAllowSharing() *bool {
if r == nil {
return nil
}
return r.AllowSharing
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetAllowSync() *bool {
if r == nil {
return nil
}
return r.AllowSync
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetAllowTuners() *bool {
if r == nil {
return nil
}
return r.AllowTuners
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetBackgroundProcessing() *bool {
if r == nil {
return nil
}
return r.BackgroundProcessing
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetCertificate() *bool {
if r == nil {
return nil
}
return r.Certificate
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetCompanionProxy() *bool {
if r == nil {
return nil
}
return r.CompanionProxy
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetCountryCode() *string {
if r == nil {
return nil
}
return r.CountryCode
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetDiagnostics() *string {
if r == nil {
return nil
}
return r.Diagnostics
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetEventStream() *bool {
if r == nil {
return nil
}
return r.EventStream
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetFriendlyName() *string {
if r == nil {
return nil
}
return r.FriendlyName
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetHubSearch() *bool {
if r == nil {
return nil
}
return r.HubSearch
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetItemClusters() *bool {
if r == nil {
return nil
}
return r.ItemClusters
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetLivetv() *int64 {
if r == nil {
return nil
}
return r.Livetv
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetMachineIdentifier() any {
if r == nil {
return nil
}
return r.MachineIdentifier
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetMediaProviders() *bool {
if r == nil {
return nil
}
return r.MediaProviders
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetMultiuser() *bool {
if r == nil {
return nil
}
return r.Multiuser
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetMusicAnalysis() *int64 {
if r == nil {
return nil
}
return r.MusicAnalysis
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetMyPlex() *bool {
if r == nil {
return nil
}
return r.MyPlex
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetMyPlexMappingState() any {
if r == nil {
return nil
}
return r.MyPlexMappingState
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetMyPlexSigninState() any {
if r == nil {
return nil
}
return r.MyPlexSigninState
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetMyPlexSubscription() *bool {
if r == nil {
return nil
}
return r.MyPlexSubscription
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetMyPlexUsername() *string {
if r == nil {
return nil
}
return r.MyPlexUsername
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetOfflineTranscode() any {
if r == nil {
return nil
}
return r.OfflineTranscode
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetOwnerFeatures() *string {
if r == nil {
return nil
}
return r.OwnerFeatures
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetPlatform() *string {
if r == nil {
return nil
}
return r.Platform
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetPlatformVersion() *string {
if r == nil {
return nil
}
return r.PlatformVersion
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetPluginHost() *bool {
if r == nil {
return nil
}
return r.PluginHost
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetPushNotifications() *bool {
if r == nil {
return nil
}
return r.PushNotifications
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetReadOnlyLibraries() *bool {
if r == nil {
return nil
}
return r.ReadOnlyLibraries
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetStreamingBrainABRVersion() *int64 {
if r == nil {
return nil
}
return r.StreamingBrainABRVersion
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetStreamingBrainVersion() *int64 {
if r == nil {
return nil
}
return r.StreamingBrainVersion
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetSync() *bool {
if r == nil {
return nil
}
return r.Sync
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetTranscoderActiveVideoSessions() *int64 {
if r == nil {
return nil
}
return r.TranscoderActiveVideoSessions
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetTranscoderAudio() *bool {
if r == nil {
return nil
}
return r.TranscoderAudio
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetTranscoderLyrics() *bool {
if r == nil {
return nil
}
return r.TranscoderLyrics
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetTranscoderPhoto() *bool {
if r == nil {
return nil
}
return r.TranscoderPhoto
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetTranscoderSubtitles() *bool {
if r == nil {
return nil
}
return r.TranscoderSubtitles
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetTranscoderVideo() *bool {
if r == nil {
return nil
}
return r.TranscoderVideo
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetTranscoderVideoBitrates() any {
if r == nil {
return nil
}
return r.TranscoderVideoBitrates
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetTranscoderVideoQualities() *string {
if r == nil {
return nil
}
return r.TranscoderVideoQualities
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetTranscoderVideoResolutions() any {
if r == nil {
return nil
}
return r.TranscoderVideoResolutions
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetUpdatedAt() *int64 {
if r == nil {
return nil
}
return r.UpdatedAt
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetUpdater() *bool {
if r == nil {
return nil
}
return r.Updater
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetVersion() *string {
if r == nil {
return nil
}
return r.Version
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetVoiceSearch() *bool {
if r == nil {
return nil
}
return r.VoiceSearch
}
func (r *RequestHandlerSlashGetResponses200MediaContainer) GetDirectory() []RequestHandlerSlashGetResponses200Directory {
if r == nil {
return nil
}
return r.Directory
}
// RequestHandlerSlashGetResponses200 - OK
type RequestHandlerSlashGetResponses200 struct {
MediaContainer *RequestHandlerSlashGetResponses200MediaContainer `json:"MediaContainer,omitempty"`
}
func (r *RequestHandlerSlashGetResponses200) GetMediaContainer() *RequestHandlerSlashGetResponses200MediaContainer {
if r == nil {
return nil
}
return r.MediaContainer
}

View File

@@ -3,12 +3,12 @@
package components
type Security struct {
AccessToken *string `security:"scheme,type=apiKey,subtype=header,name=X-Plex-Token"`
Token *string `security:"scheme,type=apiKey,subtype=header,name=X-Plex-Token"`
}
func (s *Security) GetAccessToken() *string {
func (s *Security) GetToken() *string {
if s == nil {
return nil
}
return s.AccessToken
return s.Token
}

View File

@@ -0,0 +1,66 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
import (
"encoding/json"
"fmt"
)
// SessionLocation - The location of the client
type SessionLocation string
const (
SessionLocationLan SessionLocation = "lan"
SessionLocationWan SessionLocation = "wan"
)
func (e SessionLocation) ToPointer() *SessionLocation {
return &e
}
func (e *SessionLocation) UnmarshalJSON(data []byte) error {
var v string
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case "lan":
fallthrough
case "wan":
*e = SessionLocation(v)
return nil
default:
return fmt.Errorf("invalid value for SessionLocation: %v", v)
}
}
// Session - Information about the playback session
type Session struct {
// The bandwidth used by this client's playback in kbps
Bandwidth *int64 `json:"bandwidth,omitempty"`
// The id of the playback session
ID *string `json:"id,omitempty"`
// The location of the client
Location *SessionLocation `json:"location,omitempty"`
}
func (s *Session) GetBandwidth() *int64 {
if s == nil {
return nil
}
return s.Bandwidth
}
func (s *Session) GetID() *string {
if s == nil {
return nil
}
return s.ID
}
func (s *Session) GetLocation() *SessionLocation {
if s == nil {
return nil
}
return s.Location
}

View File

@@ -0,0 +1,309 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
import (
"encoding/json"
"errors"
"fmt"
"github.com/LukeHagar/plexgo/internal/utils"
)
// Type - The type of the value of this setting
type Type string
const (
TypeBool Type = "bool"
TypeInt Type = "int"
TypeText Type = "text"
TypeDouble Type = "double"
)
func (e Type) ToPointer() *Type {
return &e
}
func (e *Type) UnmarshalJSON(data []byte) error {
var v string
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case "bool":
fallthrough
case "int":
fallthrough
case "text":
fallthrough
case "double":
*e = Type(v)
return nil
default:
return fmt.Errorf("invalid value for Type: %v", v)
}
}
type DefaultType string
const (
DefaultTypeStr DefaultType = "str"
DefaultTypeNumber DefaultType = "number"
DefaultTypeBoolean DefaultType = "boolean"
)
// Default - The default value of this setting
type Default struct {
Str *string `queryParam:"inline,name=default"`
Number *float64 `queryParam:"inline,name=default"`
Boolean *bool `queryParam:"inline,name=default"`
Type DefaultType
}
func CreateDefaultStr(str string) Default {
typ := DefaultTypeStr
return Default{
Str: &str,
Type: typ,
}
}
func CreateDefaultNumber(number float64) Default {
typ := DefaultTypeNumber
return Default{
Number: &number,
Type: typ,
}
}
func CreateDefaultBoolean(boolean bool) Default {
typ := DefaultTypeBoolean
return Default{
Boolean: &boolean,
Type: typ,
}
}
func (u *Default) UnmarshalJSON(data []byte) error {
var str string = ""
if err := utils.UnmarshalJSON(data, &str, "", true, nil); err == nil {
u.Str = &str
u.Type = DefaultTypeStr
return nil
}
var number float64 = float64(0)
if err := utils.UnmarshalJSON(data, &number, "", true, nil); err == nil {
u.Number = &number
u.Type = DefaultTypeNumber
return nil
}
var boolean bool = false
if err := utils.UnmarshalJSON(data, &boolean, "", true, nil); err == nil {
u.Boolean = &boolean
u.Type = DefaultTypeBoolean
return nil
}
return fmt.Errorf("could not unmarshal `%s` into any supported union types for Default", string(data))
}
func (u Default) MarshalJSON() ([]byte, error) {
if u.Str != nil {
return utils.MarshalJSON(u.Str, "", true)
}
if u.Number != nil {
return utils.MarshalJSON(u.Number, "", true)
}
if u.Boolean != nil {
return utils.MarshalJSON(u.Boolean, "", true)
}
return nil, errors.New("could not marshal union type Default: all fields are null")
}
type ValueType string
const (
ValueTypeStr ValueType = "str"
ValueTypeNumber ValueType = "number"
ValueTypeBoolean ValueType = "boolean"
)
// Value - The current value of this setting
type Value struct {
Str *string `queryParam:"inline,name=value"`
Number *float64 `queryParam:"inline,name=value"`
Boolean *bool `queryParam:"inline,name=value"`
Type ValueType
}
func CreateValueStr(str string) Value {
typ := ValueTypeStr
return Value{
Str: &str,
Type: typ,
}
}
func CreateValueNumber(number float64) Value {
typ := ValueTypeNumber
return Value{
Number: &number,
Type: typ,
}
}
func CreateValueBoolean(boolean bool) Value {
typ := ValueTypeBoolean
return Value{
Boolean: &boolean,
Type: typ,
}
}
func (u *Value) UnmarshalJSON(data []byte) error {
var str string = ""
if err := utils.UnmarshalJSON(data, &str, "", true, nil); err == nil {
u.Str = &str
u.Type = ValueTypeStr
return nil
}
var number float64 = float64(0)
if err := utils.UnmarshalJSON(data, &number, "", true, nil); err == nil {
u.Number = &number
u.Type = ValueTypeNumber
return nil
}
var boolean bool = false
if err := utils.UnmarshalJSON(data, &boolean, "", true, nil); err == nil {
u.Boolean = &boolean
u.Type = ValueTypeBoolean
return nil
}
return fmt.Errorf("could not unmarshal `%s` into any supported union types for Value", string(data))
}
func (u Value) MarshalJSON() ([]byte, error) {
if u.Str != nil {
return utils.MarshalJSON(u.Str, "", true)
}
if u.Number != nil {
return utils.MarshalJSON(u.Number, "", true)
}
if u.Boolean != nil {
return utils.MarshalJSON(u.Boolean, "", true)
}
return nil, errors.New("could not marshal union type Value: all fields are null")
}
// Setting - A configuration setting or preference
type Setting struct {
// The type of the value of this setting
Type *Type `json:"type,omitempty"`
// The default value of this setting
Default *Default `json:"default,omitempty"`
// Whether the setting is considered advanced and normally hidden from the user
Advanced *bool `json:"advanced,omitempty"`
// The possible values for this setting if restricted. The list is `|` separated with `value:name` entries.
EnumValues *string `json:"enumValues,omitempty"`
// The group name of this setting to aid in display of a hierarchy
Group *string `json:"group,omitempty"`
// Whether the setting is hidden or not
Hidden *bool `json:"hidden,omitempty"`
// The query parameter name for this setting
ID *string `json:"id,omitempty"`
// A user-friendly name for the setting
Label *string `json:"label,omitempty"`
// A description of the setting
Summary *string `json:"summary,omitempty"`
// The current value of this setting
Value *Value `json:"value,omitempty"`
}
func (s *Setting) GetType() *Type {
if s == nil {
return nil
}
return s.Type
}
func (s *Setting) GetDefault() *Default {
if s == nil {
return nil
}
return s.Default
}
func (s *Setting) GetAdvanced() *bool {
if s == nil {
return nil
}
return s.Advanced
}
func (s *Setting) GetEnumValues() *string {
if s == nil {
return nil
}
return s.EnumValues
}
func (s *Setting) GetGroup() *string {
if s == nil {
return nil
}
return s.Group
}
func (s *Setting) GetHidden() *bool {
if s == nil {
return nil
}
return s.Hidden
}
func (s *Setting) GetID() *string {
if s == nil {
return nil
}
return s.ID
}
func (s *Setting) GetLabel() *string {
if s == nil {
return nil
}
return s.Label
}
func (s *Setting) GetSummary() *string {
if s == nil {
return nil
}
return s.Summary
}
func (s *Setting) GetValue() *Value {
if s == nil {
return nil
}
return s.Value
}

View File

@@ -0,0 +1,134 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
type SlashGetResponses200MediaContainer struct {
// The flavors of directory found here:
// - Primary: (e.g. all, On Deck) These are still used in some clients to provide "shortcuts" to subsets of media. However, with the exception of On Deck, all of them can be created by media queries, and the desire is to allow these to be customized by users.
// - Secondary: These are marked with `"secondary": true` and were used by old clients to provide nested menus allowing for primative (but structured) navigation.
// - Special: There is a By Folder entry which allows browsing the media by the underlying filesystem structure, and there's a completely obsolete entry marked `"search": true` which used to be used to allow clients to build search dialogs on the fly.
Content *string `json:"content,omitempty"`
AllowSync *bool `json:"allowSync,omitempty"`
Art *string `json:"art,omitempty"`
Directory []Metadata `json:"Directory,omitempty"`
Identifier *string `json:"identifier,omitempty"`
LibrarySectionID *int64 `json:"librarySectionID,omitempty"`
MediaTagPrefix *string `json:"mediaTagPrefix,omitempty"`
MediaTagVersion *int64 `json:"mediaTagVersion,omitempty"`
Size *int64 `json:"size,omitempty"`
SortAsc *bool `json:"sortAsc,omitempty"`
Thumb *string `json:"thumb,omitempty"`
Title1 *string `json:"title1,omitempty"`
ViewGroup *string `json:"viewGroup,omitempty"`
ViewMode *int64 `json:"viewMode,omitempty"`
}
func (s *SlashGetResponses200MediaContainer) GetContent() *string {
if s == nil {
return nil
}
return s.Content
}
func (s *SlashGetResponses200MediaContainer) GetAllowSync() *bool {
if s == nil {
return nil
}
return s.AllowSync
}
func (s *SlashGetResponses200MediaContainer) GetArt() *string {
if s == nil {
return nil
}
return s.Art
}
func (s *SlashGetResponses200MediaContainer) GetDirectory() []Metadata {
if s == nil {
return nil
}
return s.Directory
}
func (s *SlashGetResponses200MediaContainer) GetIdentifier() *string {
if s == nil {
return nil
}
return s.Identifier
}
func (s *SlashGetResponses200MediaContainer) GetLibrarySectionID() *int64 {
if s == nil {
return nil
}
return s.LibrarySectionID
}
func (s *SlashGetResponses200MediaContainer) GetMediaTagPrefix() *string {
if s == nil {
return nil
}
return s.MediaTagPrefix
}
func (s *SlashGetResponses200MediaContainer) GetMediaTagVersion() *int64 {
if s == nil {
return nil
}
return s.MediaTagVersion
}
func (s *SlashGetResponses200MediaContainer) GetSize() *int64 {
if s == nil {
return nil
}
return s.Size
}
func (s *SlashGetResponses200MediaContainer) GetSortAsc() *bool {
if s == nil {
return nil
}
return s.SortAsc
}
func (s *SlashGetResponses200MediaContainer) GetThumb() *string {
if s == nil {
return nil
}
return s.Thumb
}
func (s *SlashGetResponses200MediaContainer) GetTitle1() *string {
if s == nil {
return nil
}
return s.Title1
}
func (s *SlashGetResponses200MediaContainer) GetViewGroup() *string {
if s == nil {
return nil
}
return s.ViewGroup
}
func (s *SlashGetResponses200MediaContainer) GetViewMode() *int64 {
if s == nil {
return nil
}
return s.ViewMode
}
// SlashGetResponses200 - OK
type SlashGetResponses200 struct {
MediaContainer *SlashGetResponses200MediaContainer `json:"MediaContainer,omitempty"`
}
func (s *SlashGetResponses200) GetMediaContainer() *SlashGetResponses200MediaContainer {
if s == nil {
return nil
}
return s.MediaContainer
}

295
models/components/sort.go Normal file
View File

@@ -0,0 +1,295 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
import (
"encoding/json"
"fmt"
"github.com/LukeHagar/plexgo/internal/utils"
)
type SortPivot struct {
Title *string `json:"title,omitempty"`
Type *string `json:"type,omitempty"`
Context *string `json:"context,omitempty"`
ID *string `json:"id,omitempty"`
Key *string `json:"key,omitempty"`
Symbol *string `json:"symbol,omitempty"`
}
func (s *SortPivot) GetTitle() *string {
if s == nil {
return nil
}
return s.Title
}
func (s *SortPivot) GetType() *string {
if s == nil {
return nil
}
return s.Type
}
func (s *SortPivot) GetContext() *string {
if s == nil {
return nil
}
return s.Context
}
func (s *SortPivot) GetID() *string {
if s == nil {
return nil
}
return s.ID
}
func (s *SortPivot) GetKey() *string {
if s == nil {
return nil
}
return s.Key
}
func (s *SortPivot) GetSymbol() *string {
if s == nil {
return nil
}
return s.Symbol
}
// SortDefault - If present, this sort is the default and in this direction
type SortDefault string
const (
SortDefaultAsc SortDefault = "asc"
SortDefaultDesc SortDefault = "desc"
)
func (e SortDefault) ToPointer() *SortDefault {
return &e
}
func (e *SortDefault) 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 = SortDefault(v)
return nil
default:
return fmt.Errorf("invalid value for SortDefault: %v", v)
}
}
// DefaultDirection - This default diction of this sort
type DefaultDirection string
const (
DefaultDirectionAsc DefaultDirection = "asc"
DefaultDirectionDesc DefaultDirection = "desc"
)
func (e DefaultDirection) ToPointer() *DefaultDirection {
return &e
}
func (e *DefaultDirection) UnmarshalJSON(data []byte) error {
var v string
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case "asc":
fallthrough
case "desc":
*e = DefaultDirection(v)
return nil
default:
return fmt.Errorf("invalid value for DefaultDirection: %v", v)
}
}
// Sort - Each `Sort` object contains a description of the sort field.
type Sort struct {
// The title of the field.
Title *string `json:"title,omitempty"`
Type *string `json:"type,omitempty"`
Art *string `json:"art,omitempty"`
Content *bool `json:"content,omitempty"`
Filter *string `json:"filter,omitempty"`
HasPrefs *bool `json:"hasPrefs,omitempty"`
HasStoreServices *bool `json:"hasStoreServices,omitempty"`
HubKey *string `json:"hubKey,omitempty"`
Identifier *string `json:"identifier,omitempty"`
// The key to use in the sort field to make items sort by this item
Key *string `json:"key,omitempty"`
LastAccessedAt *int64 `json:"lastAccessedAt,omitempty"`
Pivot []SortPivot `json:"Pivot,omitempty"`
Share *int64 `json:"share,omitempty"`
Thumb *string `json:"thumb,omitempty"`
TitleBar *string `json:"titleBar,omitempty"`
// If present, this sort is the default and in this direction
Default *SortDefault `json:"default,omitempty"`
// This default diction of this sort
DefaultDirection *DefaultDirection `json:"defaultDirection,omitempty"`
// The key for sorting this field in reverse order
DescKey *string `json:"descKey,omitempty"`
// The key to use to get items sorted by this field and indexed by the first character
FirstCharacterKey *string `json:"firstCharacterKey,omitempty"`
AdditionalProperties map[string]any `additionalProperties:"true" json:"-"`
}
func (s Sort) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(s, "", false)
}
func (s *Sort) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &s, "", false, nil); err != nil {
return err
}
return nil
}
func (s *Sort) GetTitle() *string {
if s == nil {
return nil
}
return s.Title
}
func (s *Sort) GetType() *string {
if s == nil {
return nil
}
return s.Type
}
func (s *Sort) GetArt() *string {
if s == nil {
return nil
}
return s.Art
}
func (s *Sort) GetContent() *bool {
if s == nil {
return nil
}
return s.Content
}
func (s *Sort) GetFilter() *string {
if s == nil {
return nil
}
return s.Filter
}
func (s *Sort) GetHasPrefs() *bool {
if s == nil {
return nil
}
return s.HasPrefs
}
func (s *Sort) GetHasStoreServices() *bool {
if s == nil {
return nil
}
return s.HasStoreServices
}
func (s *Sort) GetHubKey() *string {
if s == nil {
return nil
}
return s.HubKey
}
func (s *Sort) GetIdentifier() *string {
if s == nil {
return nil
}
return s.Identifier
}
func (s *Sort) GetKey() *string {
if s == nil {
return nil
}
return s.Key
}
func (s *Sort) GetLastAccessedAt() *int64 {
if s == nil {
return nil
}
return s.LastAccessedAt
}
func (s *Sort) GetPivot() []SortPivot {
if s == nil {
return nil
}
return s.Pivot
}
func (s *Sort) GetShare() *int64 {
if s == nil {
return nil
}
return s.Share
}
func (s *Sort) GetThumb() *string {
if s == nil {
return nil
}
return s.Thumb
}
func (s *Sort) GetTitleBar() *string {
if s == nil {
return nil
}
return s.TitleBar
}
func (s *Sort) GetDefault() *SortDefault {
if s == nil {
return nil
}
return s.Default
}
func (s *Sort) GetDefaultDirection() *DefaultDirection {
if s == nil {
return nil
}
return s.DefaultDirection
}
func (s *Sort) GetDescKey() *string {
if s == nil {
return nil
}
return s.DescKey
}
func (s *Sort) GetFirstCharacterKey() *string {
if s == nil {
return nil
}
return s.FirstCharacterKey
}
func (s *Sort) GetAdditionalProperties() map[string]any {
if s == nil {
return nil
}
return s.AdditionalProperties
}

269
models/components/stream.go Normal file
View File

@@ -0,0 +1,269 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
import (
"github.com/LukeHagar/plexgo/internal/utils"
)
// Stream - `Stream` represents a particular stream from a media item, such as the video stream, audio stream, or subtitle stream. The stream may either be part of the file represented by the parent `Part` or, especially for subtitles, an external file. The stream contains more detailed information about the specific stream. For example, a video may include the `aspectRatio` at the `Media` level, but detailed information about the video stream like the color space will be included on the `Stream` for the video stream. Note that photos do not have streams (mostly as an optimization).
type Stream struct {
Default *bool `json:"default,omitempty"`
AudioChannelLayout any `json:"audioChannelLayout,omitempty"`
BitDepth *int64 `json:"bitDepth,omitempty"`
Bitrate *int64 `json:"bitrate,omitempty"`
// For subtitle streams only. If `true` then the server can attempt to automatically sync the subtitle timestamps with the video.
CanAutoSync *bool `json:"canAutoSync,omitempty"`
ChromaLocation any `json:"chromaLocation,omitempty"`
ChromaSubsampling any `json:"chromaSubsampling,omitempty"`
// The codec of the stream, such as `h264` or `aac`
Codec any `json:"codec,omitempty"`
ColorPrimaries any `json:"colorPrimaries,omitempty"`
ColorRange any `json:"colorRange,omitempty"`
ColorSpace any `json:"colorSpace,omitempty"`
ColorTrc any `json:"colorTrc,omitempty"`
// A friendly name for the stream, often comprised of the language and codec information
DisplayTitle any `json:"displayTitle,omitempty"`
FrameRate *float64 `json:"frameRate,omitempty"`
HasScalingMatrix any `json:"hasScalingMatrix,omitempty"`
Height *int64 `json:"height,omitempty"`
ID *int64 `json:"id,omitempty"`
// If the stream is part of the `Part` and not an external resource, the index of the stream within that part
Index *int64 `json:"index,omitempty"`
// If the stream is independently streamable, the key from which it can be streamed
Key any `json:"key,omitempty"`
Language any `json:"language,omitempty"`
// The three character language code for the stream contents
LanguageCode any `json:"languageCode,omitempty"`
Level *int64 `json:"level,omitempty"`
Profile any `json:"profile,omitempty"`
RefFrames *int64 `json:"refFrames,omitempty"`
SamplingRate *int64 `json:"samplingRate,omitempty"`
Selected *bool `json:"selected,omitempty"`
StreamIdentifier *int64 `json:"streamIdentifier,omitempty"`
// A number indicating the type of the stream. `1` for video, `2` for audio, `3` for subtitles, `4` for lyrics
StreamType *int64 `json:"streamType,omitempty"`
Width *int64 `json:"width,omitempty"`
AdditionalProperties map[string]any `additionalProperties:"true" json:"-"`
}
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, nil); err != nil {
return err
}
return nil
}
func (s *Stream) GetDefault() *bool {
if s == nil {
return nil
}
return s.Default
}
func (s *Stream) GetAudioChannelLayout() any {
if s == nil {
return nil
}
return s.AudioChannelLayout
}
func (s *Stream) GetBitDepth() *int64 {
if s == nil {
return nil
}
return s.BitDepth
}
func (s *Stream) GetBitrate() *int64 {
if s == nil {
return nil
}
return s.Bitrate
}
func (s *Stream) GetCanAutoSync() *bool {
if s == nil {
return nil
}
return s.CanAutoSync
}
func (s *Stream) GetChromaLocation() any {
if s == nil {
return nil
}
return s.ChromaLocation
}
func (s *Stream) GetChromaSubsampling() any {
if s == nil {
return nil
}
return s.ChromaSubsampling
}
func (s *Stream) GetCodec() any {
if s == nil {
return nil
}
return s.Codec
}
func (s *Stream) GetColorPrimaries() any {
if s == nil {
return nil
}
return s.ColorPrimaries
}
func (s *Stream) GetColorRange() any {
if s == nil {
return nil
}
return s.ColorRange
}
func (s *Stream) GetColorSpace() any {
if s == nil {
return nil
}
return s.ColorSpace
}
func (s *Stream) GetColorTrc() any {
if s == nil {
return nil
}
return s.ColorTrc
}
func (s *Stream) GetDisplayTitle() any {
if s == nil {
return nil
}
return s.DisplayTitle
}
func (s *Stream) GetFrameRate() *float64 {
if s == nil {
return nil
}
return s.FrameRate
}
func (s *Stream) GetHasScalingMatrix() any {
if s == nil {
return nil
}
return s.HasScalingMatrix
}
func (s *Stream) GetHeight() *int64 {
if s == nil {
return nil
}
return s.Height
}
func (s *Stream) GetID() *int64 {
if s == nil {
return nil
}
return s.ID
}
func (s *Stream) GetIndex() *int64 {
if s == nil {
return nil
}
return s.Index
}
func (s *Stream) GetKey() any {
if s == nil {
return nil
}
return s.Key
}
func (s *Stream) GetLanguage() any {
if s == nil {
return nil
}
return s.Language
}
func (s *Stream) GetLanguageCode() any {
if s == nil {
return nil
}
return s.LanguageCode
}
func (s *Stream) GetLevel() *int64 {
if s == nil {
return nil
}
return s.Level
}
func (s *Stream) GetProfile() any {
if s == nil {
return nil
}
return s.Profile
}
func (s *Stream) GetRefFrames() *int64 {
if s == nil {
return nil
}
return s.RefFrames
}
func (s *Stream) GetSamplingRate() *int64 {
if s == nil {
return nil
}
return s.SamplingRate
}
func (s *Stream) GetSelected() *bool {
if s == nil {
return nil
}
return s.Selected
}
func (s *Stream) GetStreamIdentifier() *int64 {
if s == nil {
return nil
}
return s.StreamIdentifier
}
func (s *Stream) GetStreamType() *int64 {
if s == nil {
return nil
}
return s.StreamType
}
func (s *Stream) GetWidth() *int64 {
if s == nil {
return nil
}
return s.Width
}
func (s *Stream) GetAdditionalProperties() map[string]any {
if s == nil {
return nil
}
return s.AdditionalProperties
}

View File

@@ -0,0 +1,49 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
import (
"encoding/json"
"fmt"
)
type Subtitles string
const (
SubtitlesAuto Subtitles = "auto"
SubtitlesBurn Subtitles = "burn"
SubtitlesNone Subtitles = "none"
SubtitlesSidecar Subtitles = "sidecar"
SubtitlesEmbedded Subtitles = "embedded"
SubtitlesSegmented Subtitles = "segmented"
SubtitlesUnknown Subtitles = "unknown"
)
func (e Subtitles) ToPointer() *Subtitles {
return &e
}
func (e *Subtitles) UnmarshalJSON(data []byte) error {
var v string
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case "auto":
fallthrough
case "burn":
fallthrough
case "none":
fallthrough
case "sidecar":
fallthrough
case "embedded":
fallthrough
case "segmented":
fallthrough
case "unknown":
*e = Subtitles(v)
return nil
default:
return fmt.Errorf("invalid value for Subtitles: %v", v)
}
}

92
models/components/tag.go Normal file
View File

@@ -0,0 +1,92 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
// Tag - A variety of extra information about a metadata item is included as tags. These tags use their own element names such as `Genre`, `Writer`, `Directory`, and `Role`. Individual tag types may introduce their own extra attributes.
type Tag struct {
// Measure of the confidence of an automatic tag
Confidence *float64 `json:"confidence,omitempty"`
Context *string `json:"context,omitempty"`
// A filter parameter that can be used to query for more content that matches this tag value.
Filter any `json:"filter,omitempty"`
ID *int64 `json:"id,omitempty"`
RatingKey *string `json:"ratingKey,omitempty"`
// The role this actor played
Role any `json:"role,omitempty"`
// The value of the tag (the name)
Tag any `json:"tag,omitempty"`
// Plex identifier for this tag which can be used to fetch additional information from plex.tv
TagKey any `json:"tagKey,omitempty"`
TagType *int64 `json:"tagType,omitempty"`
Thumb any `json:"thumb,omitempty"`
}
func (t *Tag) GetConfidence() *float64 {
if t == nil {
return nil
}
return t.Confidence
}
func (t *Tag) GetContext() *string {
if t == nil {
return nil
}
return t.Context
}
func (t *Tag) GetFilter() any {
if t == nil {
return nil
}
return t.Filter
}
func (t *Tag) GetID() *int64 {
if t == nil {
return nil
}
return t.ID
}
func (t *Tag) GetRatingKey() *string {
if t == nil {
return nil
}
return t.RatingKey
}
func (t *Tag) GetRole() any {
if t == nil {
return nil
}
return t.Role
}
func (t *Tag) GetTag() any {
if t == nil {
return nil
}
return t.Tag
}
func (t *Tag) GetTagKey() any {
if t == nil {
return nil
}
return t.TagKey
}
func (t *Tag) GetTagType() *int64 {
if t == nil {
return nil
}
return t.TagType
}
func (t *Tag) GetThumb() any {
if t == nil {
return nil
}
return t.Thumb
}

View File

@@ -0,0 +1,119 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
// TranscodeSession - The transcode session if item is currently being transcoded
type TranscodeSession struct {
Complete *bool `json:"complete,omitempty"`
Context *string `json:"context,omitempty"`
Duration *int64 `json:"duration,omitempty"`
Error *bool `json:"error,omitempty"`
Key *string `json:"key,omitempty"`
Progress *float64 `json:"progress,omitempty"`
Protocol *string `json:"protocol,omitempty"`
Size *int64 `json:"size,omitempty"`
SourceAudioCodec *string `json:"sourceAudioCodec,omitempty"`
SourceVideoCodec *string `json:"sourceVideoCodec,omitempty"`
Speed *float64 `json:"speed,omitempty"`
Throttled *bool `json:"throttled,omitempty"`
TranscodeHwFullPipeline *bool `json:"transcodeHwFullPipeline,omitempty"`
TranscodeHwRequested *bool `json:"transcodeHwRequested,omitempty"`
}
func (t *TranscodeSession) GetComplete() *bool {
if t == nil {
return nil
}
return t.Complete
}
func (t *TranscodeSession) GetContext() *string {
if t == nil {
return nil
}
return t.Context
}
func (t *TranscodeSession) GetDuration() *int64 {
if t == nil {
return nil
}
return t.Duration
}
func (t *TranscodeSession) GetError() *bool {
if t == nil {
return nil
}
return t.Error
}
func (t *TranscodeSession) GetKey() *string {
if t == nil {
return nil
}
return t.Key
}
func (t *TranscodeSession) GetProgress() *float64 {
if t == nil {
return nil
}
return t.Progress
}
func (t *TranscodeSession) GetProtocol() *string {
if t == nil {
return nil
}
return t.Protocol
}
func (t *TranscodeSession) GetSize() *int64 {
if t == nil {
return nil
}
return t.Size
}
func (t *TranscodeSession) GetSourceAudioCodec() *string {
if t == nil {
return nil
}
return t.SourceAudioCodec
}
func (t *TranscodeSession) GetSourceVideoCodec() *string {
if t == nil {
return nil
}
return t.SourceVideoCodec
}
func (t *TranscodeSession) GetSpeed() *float64 {
if t == nil {
return nil
}
return t.Speed
}
func (t *TranscodeSession) GetThrottled() *bool {
if t == nil {
return nil
}
return t.Throttled
}
func (t *TranscodeSession) GetTranscodeHwFullPipeline() *bool {
if t == nil {
return nil
}
return t.TranscodeHwFullPipeline
}
func (t *TranscodeSession) GetTranscodeHwRequested() *bool {
if t == nil {
return nil
}
return t.TranscodeHwRequested
}

View File

@@ -0,0 +1,40 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
import (
"encoding/json"
"fmt"
)
type TranscodeType string
const (
TranscodeTypeVideo TranscodeType = "video"
TranscodeTypeMusic TranscodeType = "music"
TranscodeTypeAudio TranscodeType = "audio"
TranscodeTypeSubtitles TranscodeType = "subtitles"
)
func (e TranscodeType) ToPointer() *TranscodeType {
return &e
}
func (e *TranscodeType) UnmarshalJSON(data []byte) error {
var v string
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case "video":
fallthrough
case "music":
fallthrough
case "audio":
fallthrough
case "subtitles":
*e = TranscodeType(v)
return nil
default:
return fmt.Errorf("invalid value for TranscodeType: %v", v)
}
}

34
models/components/user.go Normal file
View File

@@ -0,0 +1,34 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
// User - The user playing the content
type User struct {
// The username
Title *string `json:"title,omitempty"`
// The id of the user
ID *string `json:"id,omitempty"`
// Thumb image to display for the user
Thumb *string `json:"thumb,omitempty"`
}
func (u *User) GetTitle() *string {
if u == nil {
return nil
}
return u.Title
}
func (u *User) GetID() *string {
if u == nil {
return nil
}
return u.ID
}
func (u *User) GetThumb() *string {
if u == nil {
return nil
}
return u.Thumb
}

View File

@@ -0,0 +1,292 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/components"
"net/http"
)
type AddCollectionItemsGlobals struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
}
func (a AddCollectionItemsGlobals) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(a, "", false)
}
func (a *AddCollectionItemsGlobals) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &a, "", false, nil); err != nil {
return err
}
return nil
}
func (a *AddCollectionItemsGlobals) GetAccepts() *components.Accepts {
if a == nil {
return nil
}
return a.Accepts
}
func (a *AddCollectionItemsGlobals) GetClientIdentifier() *string {
if a == nil {
return nil
}
return a.ClientIdentifier
}
func (a *AddCollectionItemsGlobals) GetProduct() *string {
if a == nil {
return nil
}
return a.Product
}
func (a *AddCollectionItemsGlobals) GetVersion() *string {
if a == nil {
return nil
}
return a.Version
}
func (a *AddCollectionItemsGlobals) GetPlatform() *string {
if a == nil {
return nil
}
return a.Platform
}
func (a *AddCollectionItemsGlobals) GetPlatformVersion() *string {
if a == nil {
return nil
}
return a.PlatformVersion
}
func (a *AddCollectionItemsGlobals) GetDevice() *string {
if a == nil {
return nil
}
return a.Device
}
func (a *AddCollectionItemsGlobals) GetModel() *string {
if a == nil {
return nil
}
return a.Model
}
func (a *AddCollectionItemsGlobals) GetDeviceVendor() *string {
if a == nil {
return nil
}
return a.DeviceVendor
}
func (a *AddCollectionItemsGlobals) GetDeviceName() *string {
if a == nil {
return nil
}
return a.DeviceName
}
func (a *AddCollectionItemsGlobals) GetMarketplace() *string {
if a == nil {
return nil
}
return a.Marketplace
}
type AddCollectionItemsRequest struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
// The collection id
CollectionID int64 `pathParam:"style=simple,explode=false,name=collectionId"`
// The URI describing the items to add to this collection
URI string `queryParam:"style=form,explode=true,name=uri"`
}
func (a AddCollectionItemsRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(a, "", false)
}
func (a *AddCollectionItemsRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &a, "", false, []string{"collectionId", "uri"}); err != nil {
return err
}
return nil
}
func (a *AddCollectionItemsRequest) GetAccepts() *components.Accepts {
if a == nil {
return nil
}
return a.Accepts
}
func (a *AddCollectionItemsRequest) GetClientIdentifier() *string {
if a == nil {
return nil
}
return a.ClientIdentifier
}
func (a *AddCollectionItemsRequest) GetProduct() *string {
if a == nil {
return nil
}
return a.Product
}
func (a *AddCollectionItemsRequest) GetVersion() *string {
if a == nil {
return nil
}
return a.Version
}
func (a *AddCollectionItemsRequest) GetPlatform() *string {
if a == nil {
return nil
}
return a.Platform
}
func (a *AddCollectionItemsRequest) GetPlatformVersion() *string {
if a == nil {
return nil
}
return a.PlatformVersion
}
func (a *AddCollectionItemsRequest) GetDevice() *string {
if a == nil {
return nil
}
return a.Device
}
func (a *AddCollectionItemsRequest) GetModel() *string {
if a == nil {
return nil
}
return a.Model
}
func (a *AddCollectionItemsRequest) GetDeviceVendor() *string {
if a == nil {
return nil
}
return a.DeviceVendor
}
func (a *AddCollectionItemsRequest) GetDeviceName() *string {
if a == nil {
return nil
}
return a.DeviceName
}
func (a *AddCollectionItemsRequest) GetMarketplace() *string {
if a == nil {
return nil
}
return a.Marketplace
}
func (a *AddCollectionItemsRequest) GetCollectionID() int64 {
if a == nil {
return 0
}
return a.CollectionID
}
func (a *AddCollectionItemsRequest) GetURI() string {
if a == nil {
return ""
}
return a.URI
}
type AddCollectionItemsResponse 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
// OK
MediaContainerWithMetadata *components.MediaContainerWithMetadata
}
func (a *AddCollectionItemsResponse) GetContentType() string {
if a == nil {
return ""
}
return a.ContentType
}
func (a *AddCollectionItemsResponse) GetStatusCode() int {
if a == nil {
return 0
}
return a.StatusCode
}
func (a *AddCollectionItemsResponse) GetRawResponse() *http.Response {
if a == nil {
return nil
}
return a.RawResponse
}
func (a *AddCollectionItemsResponse) GetMediaContainerWithMetadata() *components.MediaContainerWithMetadata {
if a == nil {
return nil
}
return a.MediaContainerWithMetadata
}

View File

@@ -0,0 +1,283 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/components"
"net/http"
)
type AddDeviceGlobals struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
}
func (a AddDeviceGlobals) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(a, "", false)
}
func (a *AddDeviceGlobals) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &a, "", false, nil); err != nil {
return err
}
return nil
}
func (a *AddDeviceGlobals) GetAccepts() *components.Accepts {
if a == nil {
return nil
}
return a.Accepts
}
func (a *AddDeviceGlobals) GetClientIdentifier() *string {
if a == nil {
return nil
}
return a.ClientIdentifier
}
func (a *AddDeviceGlobals) GetProduct() *string {
if a == nil {
return nil
}
return a.Product
}
func (a *AddDeviceGlobals) GetVersion() *string {
if a == nil {
return nil
}
return a.Version
}
func (a *AddDeviceGlobals) GetPlatform() *string {
if a == nil {
return nil
}
return a.Platform
}
func (a *AddDeviceGlobals) GetPlatformVersion() *string {
if a == nil {
return nil
}
return a.PlatformVersion
}
func (a *AddDeviceGlobals) GetDevice() *string {
if a == nil {
return nil
}
return a.Device
}
func (a *AddDeviceGlobals) GetModel() *string {
if a == nil {
return nil
}
return a.Model
}
func (a *AddDeviceGlobals) GetDeviceVendor() *string {
if a == nil {
return nil
}
return a.DeviceVendor
}
func (a *AddDeviceGlobals) GetDeviceName() *string {
if a == nil {
return nil
}
return a.DeviceName
}
func (a *AddDeviceGlobals) GetMarketplace() *string {
if a == nil {
return nil
}
return a.Marketplace
}
type AddDeviceRequest struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
// The URI of the device.
URI *string `queryParam:"style=form,explode=true,name=uri"`
}
func (a AddDeviceRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(a, "", false)
}
func (a *AddDeviceRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &a, "", false, nil); err != nil {
return err
}
return nil
}
func (a *AddDeviceRequest) GetAccepts() *components.Accepts {
if a == nil {
return nil
}
return a.Accepts
}
func (a *AddDeviceRequest) GetClientIdentifier() *string {
if a == nil {
return nil
}
return a.ClientIdentifier
}
func (a *AddDeviceRequest) GetProduct() *string {
if a == nil {
return nil
}
return a.Product
}
func (a *AddDeviceRequest) GetVersion() *string {
if a == nil {
return nil
}
return a.Version
}
func (a *AddDeviceRequest) GetPlatform() *string {
if a == nil {
return nil
}
return a.Platform
}
func (a *AddDeviceRequest) GetPlatformVersion() *string {
if a == nil {
return nil
}
return a.PlatformVersion
}
func (a *AddDeviceRequest) GetDevice() *string {
if a == nil {
return nil
}
return a.Device
}
func (a *AddDeviceRequest) GetModel() *string {
if a == nil {
return nil
}
return a.Model
}
func (a *AddDeviceRequest) GetDeviceVendor() *string {
if a == nil {
return nil
}
return a.DeviceVendor
}
func (a *AddDeviceRequest) GetDeviceName() *string {
if a == nil {
return nil
}
return a.DeviceName
}
func (a *AddDeviceRequest) GetMarketplace() *string {
if a == nil {
return nil
}
return a.Marketplace
}
func (a *AddDeviceRequest) GetURI() *string {
if a == nil {
return nil
}
return a.URI
}
type AddDeviceResponse 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
// OK
MediaContainerWithDevice *components.MediaContainerWithDevice
}
func (a *AddDeviceResponse) GetContentType() string {
if a == nil {
return ""
}
return a.ContentType
}
func (a *AddDeviceResponse) GetStatusCode() int {
if a == nil {
return 0
}
return a.StatusCode
}
func (a *AddDeviceResponse) GetRawResponse() *http.Response {
if a == nil {
return nil
}
return a.RawResponse
}
func (a *AddDeviceResponse) GetMediaContainerWithDevice() *components.MediaContainerWithDevice {
if a == nil {
return nil
}
return a.MediaContainerWithDevice
}

View File

@@ -0,0 +1,425 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/components"
"net/http"
)
type AddDeviceToDVRGlobals struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
}
func (a AddDeviceToDVRGlobals) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(a, "", false)
}
func (a *AddDeviceToDVRGlobals) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &a, "", false, nil); err != nil {
return err
}
return nil
}
func (a *AddDeviceToDVRGlobals) GetAccepts() *components.Accepts {
if a == nil {
return nil
}
return a.Accepts
}
func (a *AddDeviceToDVRGlobals) GetClientIdentifier() *string {
if a == nil {
return nil
}
return a.ClientIdentifier
}
func (a *AddDeviceToDVRGlobals) GetProduct() *string {
if a == nil {
return nil
}
return a.Product
}
func (a *AddDeviceToDVRGlobals) GetVersion() *string {
if a == nil {
return nil
}
return a.Version
}
func (a *AddDeviceToDVRGlobals) GetPlatform() *string {
if a == nil {
return nil
}
return a.Platform
}
func (a *AddDeviceToDVRGlobals) GetPlatformVersion() *string {
if a == nil {
return nil
}
return a.PlatformVersion
}
func (a *AddDeviceToDVRGlobals) GetDevice() *string {
if a == nil {
return nil
}
return a.Device
}
func (a *AddDeviceToDVRGlobals) GetModel() *string {
if a == nil {
return nil
}
return a.Model
}
func (a *AddDeviceToDVRGlobals) GetDeviceVendor() *string {
if a == nil {
return nil
}
return a.DeviceVendor
}
func (a *AddDeviceToDVRGlobals) GetDeviceName() *string {
if a == nil {
return nil
}
return a.DeviceName
}
func (a *AddDeviceToDVRGlobals) GetMarketplace() *string {
if a == nil {
return nil
}
return a.Marketplace
}
type AddDeviceToDVRRequest struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
// The ID of the DVR.
DvrID int64 `pathParam:"style=simple,explode=false,name=dvrId"`
// The ID of the device to add.
DeviceID int64 `pathParam:"style=simple,explode=false,name=deviceId"`
}
func (a AddDeviceToDVRRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(a, "", false)
}
func (a *AddDeviceToDVRRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &a, "", false, []string{"dvrId", "deviceId"}); err != nil {
return err
}
return nil
}
func (a *AddDeviceToDVRRequest) GetAccepts() *components.Accepts {
if a == nil {
return nil
}
return a.Accepts
}
func (a *AddDeviceToDVRRequest) GetClientIdentifier() *string {
if a == nil {
return nil
}
return a.ClientIdentifier
}
func (a *AddDeviceToDVRRequest) GetProduct() *string {
if a == nil {
return nil
}
return a.Product
}
func (a *AddDeviceToDVRRequest) GetVersion() *string {
if a == nil {
return nil
}
return a.Version
}
func (a *AddDeviceToDVRRequest) GetPlatform() *string {
if a == nil {
return nil
}
return a.Platform
}
func (a *AddDeviceToDVRRequest) GetPlatformVersion() *string {
if a == nil {
return nil
}
return a.PlatformVersion
}
func (a *AddDeviceToDVRRequest) GetDevice() *string {
if a == nil {
return nil
}
return a.Device
}
func (a *AddDeviceToDVRRequest) GetModel() *string {
if a == nil {
return nil
}
return a.Model
}
func (a *AddDeviceToDVRRequest) GetDeviceVendor() *string {
if a == nil {
return nil
}
return a.DeviceVendor
}
func (a *AddDeviceToDVRRequest) GetDeviceName() *string {
if a == nil {
return nil
}
return a.DeviceName
}
func (a *AddDeviceToDVRRequest) GetMarketplace() *string {
if a == nil {
return nil
}
return a.Marketplace
}
func (a *AddDeviceToDVRRequest) GetDvrID() int64 {
if a == nil {
return 0
}
return a.DvrID
}
func (a *AddDeviceToDVRRequest) GetDeviceID() int64 {
if a == nil {
return 0
}
return a.DeviceID
}
// AddDeviceToDVRDVRsMediaContainer - `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
// Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
// The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
type AddDeviceToDVRDVRsMediaContainer struct {
Identifier *string `json:"identifier,omitempty"`
// The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
//
Offset *int64 `json:"offset,omitempty"`
Size *int64 `json:"size,omitempty"`
// The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
//
TotalSize *int64 `json:"totalSize,omitempty"`
// A status indicator. If present and non-zero, indicates an error
Status *int64 `json:"status,omitempty"`
}
func (a *AddDeviceToDVRDVRsMediaContainer) GetIdentifier() *string {
if a == nil {
return nil
}
return a.Identifier
}
func (a *AddDeviceToDVRDVRsMediaContainer) GetOffset() *int64 {
if a == nil {
return nil
}
return a.Offset
}
func (a *AddDeviceToDVRDVRsMediaContainer) GetSize() *int64 {
if a == nil {
return nil
}
return a.Size
}
func (a *AddDeviceToDVRDVRsMediaContainer) GetTotalSize() *int64 {
if a == nil {
return nil
}
return a.TotalSize
}
func (a *AddDeviceToDVRDVRsMediaContainer) GetStatus() *int64 {
if a == nil {
return nil
}
return a.Status
}
type AddDeviceToDVRDVR struct {
Device []components.Device `json:"Device,omitempty"`
Key *string `json:"key,omitempty"`
Language *string `json:"language,omitempty"`
Lineup *string `json:"lineup,omitempty"`
UUID *string `json:"uuid,omitempty"`
}
func (a *AddDeviceToDVRDVR) GetDevice() []components.Device {
if a == nil {
return nil
}
return a.Device
}
func (a *AddDeviceToDVRDVR) GetKey() *string {
if a == nil {
return nil
}
return a.Key
}
func (a *AddDeviceToDVRDVR) GetLanguage() *string {
if a == nil {
return nil
}
return a.Language
}
func (a *AddDeviceToDVRDVR) GetLineup() *string {
if a == nil {
return nil
}
return a.Lineup
}
func (a *AddDeviceToDVRDVR) GetUUID() *string {
if a == nil {
return nil
}
return a.UUID
}
type AddDeviceToDVRMediaContainer struct {
MediaContainer *AddDeviceToDVRDVRsMediaContainer `json:"MediaContainer,omitempty"`
Dvr []AddDeviceToDVRDVR `json:"DVR,omitempty"`
}
func (a *AddDeviceToDVRMediaContainer) GetMediaContainer() *AddDeviceToDVRDVRsMediaContainer {
if a == nil {
return nil
}
return a.MediaContainer
}
func (a *AddDeviceToDVRMediaContainer) GetDvr() []AddDeviceToDVRDVR {
if a == nil {
return nil
}
return a.Dvr
}
// AddDeviceToDVRResponseBody - OK
type AddDeviceToDVRResponseBody struct {
MediaContainer *AddDeviceToDVRMediaContainer `json:"MediaContainer,omitempty"`
}
func (a *AddDeviceToDVRResponseBody) GetMediaContainer() *AddDeviceToDVRMediaContainer {
if a == nil {
return nil
}
return a.MediaContainer
}
type AddDeviceToDVRResponse 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
// OK
Object *AddDeviceToDVRResponseBody
Headers map[string][]string
}
func (a *AddDeviceToDVRResponse) GetContentType() string {
if a == nil {
return ""
}
return a.ContentType
}
func (a *AddDeviceToDVRResponse) GetStatusCode() int {
if a == nil {
return 0
}
return a.StatusCode
}
func (a *AddDeviceToDVRResponse) GetRawResponse() *http.Response {
if a == nil {
return nil
}
return a.RawResponse
}
func (a *AddDeviceToDVRResponse) GetObject() *AddDeviceToDVRResponseBody {
if a == nil {
return nil
}
return a.Object
}
func (a *AddDeviceToDVRResponse) GetHeaders() map[string][]string {
if a == nil {
return map[string][]string{}
}
return a.Headers
}

View File

@@ -0,0 +1,612 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/components"
"net/http"
)
type AddDownloadQueueItemsGlobals struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
}
func (a AddDownloadQueueItemsGlobals) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(a, "", false)
}
func (a *AddDownloadQueueItemsGlobals) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &a, "", false, nil); err != nil {
return err
}
return nil
}
func (a *AddDownloadQueueItemsGlobals) GetAccepts() *components.Accepts {
if a == nil {
return nil
}
return a.Accepts
}
func (a *AddDownloadQueueItemsGlobals) GetClientIdentifier() *string {
if a == nil {
return nil
}
return a.ClientIdentifier
}
func (a *AddDownloadQueueItemsGlobals) GetProduct() *string {
if a == nil {
return nil
}
return a.Product
}
func (a *AddDownloadQueueItemsGlobals) GetVersion() *string {
if a == nil {
return nil
}
return a.Version
}
func (a *AddDownloadQueueItemsGlobals) GetPlatform() *string {
if a == nil {
return nil
}
return a.Platform
}
func (a *AddDownloadQueueItemsGlobals) GetPlatformVersion() *string {
if a == nil {
return nil
}
return a.PlatformVersion
}
func (a *AddDownloadQueueItemsGlobals) GetDevice() *string {
if a == nil {
return nil
}
return a.Device
}
func (a *AddDownloadQueueItemsGlobals) GetModel() *string {
if a == nil {
return nil
}
return a.Model
}
func (a *AddDownloadQueueItemsGlobals) GetDeviceVendor() *string {
if a == nil {
return nil
}
return a.DeviceVendor
}
func (a *AddDownloadQueueItemsGlobals) GetDeviceName() *string {
if a == nil {
return nil
}
return a.DeviceName
}
func (a *AddDownloadQueueItemsGlobals) GetMarketplace() *string {
if a == nil {
return nil
}
return a.Marketplace
}
type AddDownloadQueueItemsRequest struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
// The queue id
QueueID int64 `pathParam:"style=simple,explode=false,name=queueId"`
// Keys to add
Keys []string `queryParam:"style=form,explode=false,name=keys"`
// Indicates how incompatible advanced subtitles (such as ass/ssa) should be included: * 'burn' - Burn incompatible advanced text subtitles into the video stream * 'text' - Transcode incompatible advanced text subtitles to a compatible text format, even if some markup is lost
//
AdvancedSubtitles *components.AdvancedSubtitles `queryParam:"style=form,explode=true,name=advancedSubtitles"`
// Percentage of original audio loudness to use when transcoding (100 is equivalent to original volume, 50 is half, 200 is double, etc)
AudioBoost *int64 `queryParam:"style=form,explode=true,name=audioBoost"`
// Target video number of audio channels.
AudioChannelCount *int64 `queryParam:"style=form,explode=true,name=audioChannelCount"`
// Indicates the client supports ABR.
AutoAdjustQuality *components.BoolInt `queryParam:"style=form,explode=true,name=autoAdjustQuality"`
// Indicates if the server should adjust subtitles based on Voice Activity Data.
AutoAdjustSubtitle *components.BoolInt `queryParam:"style=form,explode=true,name=autoAdjustSubtitle"`
// Indicates the client supports direct playing the indicated content.
DirectPlay *components.BoolInt `queryParam:"style=form,explode=true,name=directPlay"`
// Indicates the client supports direct streaming the video of the indicated content.
DirectStream *components.BoolInt `queryParam:"style=form,explode=true,name=directStream"`
// Indicates the client supports direct streaming the audio of the indicated content.
DirectStreamAudio *components.BoolInt `queryParam:"style=form,explode=true,name=directStreamAudio"`
// Indicates if resolution should be adjusted for orientation.
DisableResolutionRotation *components.BoolInt `queryParam:"style=form,explode=true,name=disableResolutionRotation"`
// Ignore client profiles when determining if direct play is possible. Only has an effect when directPlay=1 and both mediaIndex and partIndex are specified and neither are -1
HasMDE *components.BoolInt `queryParam:"style=form,explode=true,name=hasMDE"`
// Network type of the client, can be used to help determine target bitrate.
Location *components.Location `queryParam:"style=form,explode=true,name=location"`
// Buffer size used in playback (in KB). Clients should specify a lower bound if not known exactly. This value could make the difference between transcoding and direct play on bandwidth constrained networks.
MediaBufferSize *int64 `queryParam:"style=form,explode=true,name=mediaBufferSize"`
// Index of the media to transcode. -1 or not specified indicates let the server choose.
MediaIndex *int64 `queryParam:"style=form,explode=true,name=mediaIndex"`
// Target bitrate for audio only files (in kbps, used to transcode).
MusicBitrate *int64 `queryParam:"style=form,explode=true,name=musicBitrate"`
// Offset from the start of the media (in seconds).
Offset *float64 `queryParam:"style=form,explode=true,name=offset"`
// Index of the part to transcode. -1 or not specified indicates the server should join parts together in a transcode
PartIndex *int64 `queryParam:"style=form,explode=true,name=partIndex"`
// Internal PMS path of the media to transcode.
Path *string `queryParam:"style=form,explode=true,name=path"`
// Maximum bitrate (in kbps) to use in ABR.
PeakBitrate *int64 `queryParam:"style=form,explode=true,name=peakBitrate"`
// Target photo resolution.
PhotoResolution *string `queryParam:"style=form,explode=true,name=photoResolution"`
// Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022)
//
Protocol *components.Protocol `queryParam:"style=form,explode=true,name=protocol"`
// Number of seconds to include in each transcoded segment
SecondsPerSegment *int64 `queryParam:"style=form,explode=true,name=secondsPerSegment"`
// Percentage of original subtitle size to use when burning subtitles (100 is equivalent to original size, 50 is half, ect)
SubtitleSize *int64 `queryParam:"style=form,explode=true,name=subtitleSize"`
// Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream
//
Subtitles *components.Subtitles `queryParam:"style=form,explode=true,name=subtitles"`
// Target video bitrate (in kbps).
VideoBitrate *int64 `queryParam:"style=form,explode=true,name=videoBitrate"`
// Target photo quality.
VideoQuality *int64 `queryParam:"style=form,explode=true,name=videoQuality"`
// Target maximum video resolution.
VideoResolution *string `queryParam:"style=form,explode=true,name=videoResolution"`
}
func (a AddDownloadQueueItemsRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(a, "", false)
}
func (a *AddDownloadQueueItemsRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &a, "", false, []string{"queueId", "keys"}); err != nil {
return err
}
return nil
}
func (a *AddDownloadQueueItemsRequest) GetAccepts() *components.Accepts {
if a == nil {
return nil
}
return a.Accepts
}
func (a *AddDownloadQueueItemsRequest) GetClientIdentifier() *string {
if a == nil {
return nil
}
return a.ClientIdentifier
}
func (a *AddDownloadQueueItemsRequest) GetProduct() *string {
if a == nil {
return nil
}
return a.Product
}
func (a *AddDownloadQueueItemsRequest) GetVersion() *string {
if a == nil {
return nil
}
return a.Version
}
func (a *AddDownloadQueueItemsRequest) GetPlatform() *string {
if a == nil {
return nil
}
return a.Platform
}
func (a *AddDownloadQueueItemsRequest) GetPlatformVersion() *string {
if a == nil {
return nil
}
return a.PlatformVersion
}
func (a *AddDownloadQueueItemsRequest) GetDevice() *string {
if a == nil {
return nil
}
return a.Device
}
func (a *AddDownloadQueueItemsRequest) GetModel() *string {
if a == nil {
return nil
}
return a.Model
}
func (a *AddDownloadQueueItemsRequest) GetDeviceVendor() *string {
if a == nil {
return nil
}
return a.DeviceVendor
}
func (a *AddDownloadQueueItemsRequest) GetDeviceName() *string {
if a == nil {
return nil
}
return a.DeviceName
}
func (a *AddDownloadQueueItemsRequest) GetMarketplace() *string {
if a == nil {
return nil
}
return a.Marketplace
}
func (a *AddDownloadQueueItemsRequest) GetQueueID() int64 {
if a == nil {
return 0
}
return a.QueueID
}
func (a *AddDownloadQueueItemsRequest) GetKeys() []string {
if a == nil {
return []string{}
}
return a.Keys
}
func (a *AddDownloadQueueItemsRequest) GetAdvancedSubtitles() *components.AdvancedSubtitles {
if a == nil {
return nil
}
return a.AdvancedSubtitles
}
func (a *AddDownloadQueueItemsRequest) GetAudioBoost() *int64 {
if a == nil {
return nil
}
return a.AudioBoost
}
func (a *AddDownloadQueueItemsRequest) GetAudioChannelCount() *int64 {
if a == nil {
return nil
}
return a.AudioChannelCount
}
func (a *AddDownloadQueueItemsRequest) GetAutoAdjustQuality() *components.BoolInt {
if a == nil {
return nil
}
return a.AutoAdjustQuality
}
func (a *AddDownloadQueueItemsRequest) GetAutoAdjustSubtitle() *components.BoolInt {
if a == nil {
return nil
}
return a.AutoAdjustSubtitle
}
func (a *AddDownloadQueueItemsRequest) GetDirectPlay() *components.BoolInt {
if a == nil {
return nil
}
return a.DirectPlay
}
func (a *AddDownloadQueueItemsRequest) GetDirectStream() *components.BoolInt {
if a == nil {
return nil
}
return a.DirectStream
}
func (a *AddDownloadQueueItemsRequest) GetDirectStreamAudio() *components.BoolInt {
if a == nil {
return nil
}
return a.DirectStreamAudio
}
func (a *AddDownloadQueueItemsRequest) GetDisableResolutionRotation() *components.BoolInt {
if a == nil {
return nil
}
return a.DisableResolutionRotation
}
func (a *AddDownloadQueueItemsRequest) GetHasMDE() *components.BoolInt {
if a == nil {
return nil
}
return a.HasMDE
}
func (a *AddDownloadQueueItemsRequest) GetLocation() *components.Location {
if a == nil {
return nil
}
return a.Location
}
func (a *AddDownloadQueueItemsRequest) GetMediaBufferSize() *int64 {
if a == nil {
return nil
}
return a.MediaBufferSize
}
func (a *AddDownloadQueueItemsRequest) GetMediaIndex() *int64 {
if a == nil {
return nil
}
return a.MediaIndex
}
func (a *AddDownloadQueueItemsRequest) GetMusicBitrate() *int64 {
if a == nil {
return nil
}
return a.MusicBitrate
}
func (a *AddDownloadQueueItemsRequest) GetOffset() *float64 {
if a == nil {
return nil
}
return a.Offset
}
func (a *AddDownloadQueueItemsRequest) GetPartIndex() *int64 {
if a == nil {
return nil
}
return a.PartIndex
}
func (a *AddDownloadQueueItemsRequest) GetPath() *string {
if a == nil {
return nil
}
return a.Path
}
func (a *AddDownloadQueueItemsRequest) GetPeakBitrate() *int64 {
if a == nil {
return nil
}
return a.PeakBitrate
}
func (a *AddDownloadQueueItemsRequest) GetPhotoResolution() *string {
if a == nil {
return nil
}
return a.PhotoResolution
}
func (a *AddDownloadQueueItemsRequest) GetProtocol() *components.Protocol {
if a == nil {
return nil
}
return a.Protocol
}
func (a *AddDownloadQueueItemsRequest) GetSecondsPerSegment() *int64 {
if a == nil {
return nil
}
return a.SecondsPerSegment
}
func (a *AddDownloadQueueItemsRequest) GetSubtitleSize() *int64 {
if a == nil {
return nil
}
return a.SubtitleSize
}
func (a *AddDownloadQueueItemsRequest) GetSubtitles() *components.Subtitles {
if a == nil {
return nil
}
return a.Subtitles
}
func (a *AddDownloadQueueItemsRequest) GetVideoBitrate() *int64 {
if a == nil {
return nil
}
return a.VideoBitrate
}
func (a *AddDownloadQueueItemsRequest) GetVideoQuality() *int64 {
if a == nil {
return nil
}
return a.VideoQuality
}
func (a *AddDownloadQueueItemsRequest) GetVideoResolution() *string {
if a == nil {
return nil
}
return a.VideoResolution
}
type AddedQueueItems struct {
// The queue item id that was added or the existing one if an item already exists in this queue with the same parameters
ID *int64 `json:"id,omitempty"`
// The key added to the queue
Key *string `json:"key,omitempty"`
}
func (a *AddedQueueItems) GetID() *int64 {
if a == nil {
return nil
}
return a.ID
}
func (a *AddedQueueItems) GetKey() *string {
if a == nil {
return nil
}
return a.Key
}
// AddDownloadQueueItemsMediaContainer - `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
// Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
// The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
type AddDownloadQueueItemsMediaContainer struct {
Identifier *string `json:"identifier,omitempty"`
// The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
//
Offset *int64 `json:"offset,omitempty"`
Size *int64 `json:"size,omitempty"`
// The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
//
TotalSize *int64 `json:"totalSize,omitempty"`
AddedQueueItems []AddedQueueItems `json:"AddedQueueItems,omitempty"`
}
func (a *AddDownloadQueueItemsMediaContainer) GetIdentifier() *string {
if a == nil {
return nil
}
return a.Identifier
}
func (a *AddDownloadQueueItemsMediaContainer) GetOffset() *int64 {
if a == nil {
return nil
}
return a.Offset
}
func (a *AddDownloadQueueItemsMediaContainer) GetSize() *int64 {
if a == nil {
return nil
}
return a.Size
}
func (a *AddDownloadQueueItemsMediaContainer) GetTotalSize() *int64 {
if a == nil {
return nil
}
return a.TotalSize
}
func (a *AddDownloadQueueItemsMediaContainer) GetAddedQueueItems() []AddedQueueItems {
if a == nil {
return nil
}
return a.AddedQueueItems
}
// AddDownloadQueueItemsResponseBody - OK
type AddDownloadQueueItemsResponseBody struct {
MediaContainer *AddDownloadQueueItemsMediaContainer `json:"MediaContainer,omitempty"`
}
func (a *AddDownloadQueueItemsResponseBody) GetMediaContainer() *AddDownloadQueueItemsMediaContainer {
if a == nil {
return nil
}
return a.MediaContainer
}
type AddDownloadQueueItemsResponse 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
// OK
Object *AddDownloadQueueItemsResponseBody
}
func (a *AddDownloadQueueItemsResponse) GetContentType() string {
if a == nil {
return ""
}
return a.ContentType
}
func (a *AddDownloadQueueItemsResponse) GetStatusCode() int {
if a == nil {
return 0
}
return a.StatusCode
}
func (a *AddDownloadQueueItemsResponse) GetRawResponse() *http.Response {
if a == nil {
return nil
}
return a.RawResponse
}
func (a *AddDownloadQueueItemsResponse) GetObject() *AddDownloadQueueItemsResponseBody {
if a == nil {
return nil
}
return a.Object
}

View File

@@ -0,0 +1,300 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/components"
"net/http"
)
type AddExtrasGlobals struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
}
func (a AddExtrasGlobals) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(a, "", false)
}
func (a *AddExtrasGlobals) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &a, "", false, nil); err != nil {
return err
}
return nil
}
func (a *AddExtrasGlobals) GetAccepts() *components.Accepts {
if a == nil {
return nil
}
return a.Accepts
}
func (a *AddExtrasGlobals) GetClientIdentifier() *string {
if a == nil {
return nil
}
return a.ClientIdentifier
}
func (a *AddExtrasGlobals) GetProduct() *string {
if a == nil {
return nil
}
return a.Product
}
func (a *AddExtrasGlobals) GetVersion() *string {
if a == nil {
return nil
}
return a.Version
}
func (a *AddExtrasGlobals) GetPlatform() *string {
if a == nil {
return nil
}
return a.Platform
}
func (a *AddExtrasGlobals) GetPlatformVersion() *string {
if a == nil {
return nil
}
return a.PlatformVersion
}
func (a *AddExtrasGlobals) GetDevice() *string {
if a == nil {
return nil
}
return a.Device
}
func (a *AddExtrasGlobals) GetModel() *string {
if a == nil {
return nil
}
return a.Model
}
func (a *AddExtrasGlobals) GetDeviceVendor() *string {
if a == nil {
return nil
}
return a.DeviceVendor
}
func (a *AddExtrasGlobals) GetDeviceName() *string {
if a == nil {
return nil
}
return a.DeviceName
}
func (a *AddExtrasGlobals) GetMarketplace() *string {
if a == nil {
return nil
}
return a.Marketplace
}
type AddExtrasRequest struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
Ids string `pathParam:"style=simple,explode=false,name=ids"`
// The metadata type of the extra
ExtraType *int64 `queryParam:"style=form,explode=true,name=extraType"`
// The URL of the extra
URL string `queryParam:"style=form,explode=true,name=url"`
// The title to filter by or assign
Title *string `queryParam:"style=form,explode=true,name=title"`
}
func (a AddExtrasRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(a, "", false)
}
func (a *AddExtrasRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &a, "", false, []string{"ids", "url"}); err != nil {
return err
}
return nil
}
func (a *AddExtrasRequest) GetAccepts() *components.Accepts {
if a == nil {
return nil
}
return a.Accepts
}
func (a *AddExtrasRequest) GetClientIdentifier() *string {
if a == nil {
return nil
}
return a.ClientIdentifier
}
func (a *AddExtrasRequest) GetProduct() *string {
if a == nil {
return nil
}
return a.Product
}
func (a *AddExtrasRequest) GetVersion() *string {
if a == nil {
return nil
}
return a.Version
}
func (a *AddExtrasRequest) GetPlatform() *string {
if a == nil {
return nil
}
return a.Platform
}
func (a *AddExtrasRequest) GetPlatformVersion() *string {
if a == nil {
return nil
}
return a.PlatformVersion
}
func (a *AddExtrasRequest) GetDevice() *string {
if a == nil {
return nil
}
return a.Device
}
func (a *AddExtrasRequest) GetModel() *string {
if a == nil {
return nil
}
return a.Model
}
func (a *AddExtrasRequest) GetDeviceVendor() *string {
if a == nil {
return nil
}
return a.DeviceVendor
}
func (a *AddExtrasRequest) GetDeviceName() *string {
if a == nil {
return nil
}
return a.DeviceName
}
func (a *AddExtrasRequest) GetMarketplace() *string {
if a == nil {
return nil
}
return a.Marketplace
}
func (a *AddExtrasRequest) GetIds() string {
if a == nil {
return ""
}
return a.Ids
}
func (a *AddExtrasRequest) GetExtraType() *int64 {
if a == nil {
return nil
}
return a.ExtraType
}
func (a *AddExtrasRequest) GetURL() string {
if a == nil {
return ""
}
return a.URL
}
func (a *AddExtrasRequest) GetTitle() *string {
if a == nil {
return nil
}
return a.Title
}
type AddExtrasResponse 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
}
func (a *AddExtrasResponse) GetContentType() string {
if a == nil {
return ""
}
return a.ContentType
}
func (a *AddExtrasResponse) GetStatusCode() int {
if a == nil {
return 0
}
return a.StatusCode
}
func (a *AddExtrasResponse) GetRawResponse() *http.Response {
if a == nil {
return nil
}
return a.RawResponse
}

View File

@@ -0,0 +1,425 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/components"
"net/http"
)
type AddLineupGlobals struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
}
func (a AddLineupGlobals) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(a, "", false)
}
func (a *AddLineupGlobals) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &a, "", false, nil); err != nil {
return err
}
return nil
}
func (a *AddLineupGlobals) GetAccepts() *components.Accepts {
if a == nil {
return nil
}
return a.Accepts
}
func (a *AddLineupGlobals) GetClientIdentifier() *string {
if a == nil {
return nil
}
return a.ClientIdentifier
}
func (a *AddLineupGlobals) GetProduct() *string {
if a == nil {
return nil
}
return a.Product
}
func (a *AddLineupGlobals) GetVersion() *string {
if a == nil {
return nil
}
return a.Version
}
func (a *AddLineupGlobals) GetPlatform() *string {
if a == nil {
return nil
}
return a.Platform
}
func (a *AddLineupGlobals) GetPlatformVersion() *string {
if a == nil {
return nil
}
return a.PlatformVersion
}
func (a *AddLineupGlobals) GetDevice() *string {
if a == nil {
return nil
}
return a.Device
}
func (a *AddLineupGlobals) GetModel() *string {
if a == nil {
return nil
}
return a.Model
}
func (a *AddLineupGlobals) GetDeviceVendor() *string {
if a == nil {
return nil
}
return a.DeviceVendor
}
func (a *AddLineupGlobals) GetDeviceName() *string {
if a == nil {
return nil
}
return a.DeviceName
}
func (a *AddLineupGlobals) GetMarketplace() *string {
if a == nil {
return nil
}
return a.Marketplace
}
type AddLineupRequest struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
// The ID of the DVR.
DvrID int64 `pathParam:"style=simple,explode=false,name=dvrId"`
// The lineup to delete
Lineup string `queryParam:"style=form,explode=true,name=lineup"`
}
func (a AddLineupRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(a, "", false)
}
func (a *AddLineupRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &a, "", false, []string{"dvrId", "lineup"}); err != nil {
return err
}
return nil
}
func (a *AddLineupRequest) GetAccepts() *components.Accepts {
if a == nil {
return nil
}
return a.Accepts
}
func (a *AddLineupRequest) GetClientIdentifier() *string {
if a == nil {
return nil
}
return a.ClientIdentifier
}
func (a *AddLineupRequest) GetProduct() *string {
if a == nil {
return nil
}
return a.Product
}
func (a *AddLineupRequest) GetVersion() *string {
if a == nil {
return nil
}
return a.Version
}
func (a *AddLineupRequest) GetPlatform() *string {
if a == nil {
return nil
}
return a.Platform
}
func (a *AddLineupRequest) GetPlatformVersion() *string {
if a == nil {
return nil
}
return a.PlatformVersion
}
func (a *AddLineupRequest) GetDevice() *string {
if a == nil {
return nil
}
return a.Device
}
func (a *AddLineupRequest) GetModel() *string {
if a == nil {
return nil
}
return a.Model
}
func (a *AddLineupRequest) GetDeviceVendor() *string {
if a == nil {
return nil
}
return a.DeviceVendor
}
func (a *AddLineupRequest) GetDeviceName() *string {
if a == nil {
return nil
}
return a.DeviceName
}
func (a *AddLineupRequest) GetMarketplace() *string {
if a == nil {
return nil
}
return a.Marketplace
}
func (a *AddLineupRequest) GetDvrID() int64 {
if a == nil {
return 0
}
return a.DvrID
}
func (a *AddLineupRequest) GetLineup() string {
if a == nil {
return ""
}
return a.Lineup
}
// AddLineupDVRsMediaContainer - `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
// Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
// The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
type AddLineupDVRsMediaContainer struct {
Identifier *string `json:"identifier,omitempty"`
// The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
//
Offset *int64 `json:"offset,omitempty"`
Size *int64 `json:"size,omitempty"`
// The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
//
TotalSize *int64 `json:"totalSize,omitempty"`
// A status indicator. If present and non-zero, indicates an error
Status *int64 `json:"status,omitempty"`
}
func (a *AddLineupDVRsMediaContainer) GetIdentifier() *string {
if a == nil {
return nil
}
return a.Identifier
}
func (a *AddLineupDVRsMediaContainer) GetOffset() *int64 {
if a == nil {
return nil
}
return a.Offset
}
func (a *AddLineupDVRsMediaContainer) GetSize() *int64 {
if a == nil {
return nil
}
return a.Size
}
func (a *AddLineupDVRsMediaContainer) GetTotalSize() *int64 {
if a == nil {
return nil
}
return a.TotalSize
}
func (a *AddLineupDVRsMediaContainer) GetStatus() *int64 {
if a == nil {
return nil
}
return a.Status
}
type AddLineupDVR struct {
Device []components.Device `json:"Device,omitempty"`
Key *string `json:"key,omitempty"`
Language *string `json:"language,omitempty"`
Lineup *string `json:"lineup,omitempty"`
UUID *string `json:"uuid,omitempty"`
}
func (a *AddLineupDVR) GetDevice() []components.Device {
if a == nil {
return nil
}
return a.Device
}
func (a *AddLineupDVR) GetKey() *string {
if a == nil {
return nil
}
return a.Key
}
func (a *AddLineupDVR) GetLanguage() *string {
if a == nil {
return nil
}
return a.Language
}
func (a *AddLineupDVR) GetLineup() *string {
if a == nil {
return nil
}
return a.Lineup
}
func (a *AddLineupDVR) GetUUID() *string {
if a == nil {
return nil
}
return a.UUID
}
type AddLineupMediaContainer struct {
MediaContainer *AddLineupDVRsMediaContainer `json:"MediaContainer,omitempty"`
Dvr []AddLineupDVR `json:"DVR,omitempty"`
}
func (a *AddLineupMediaContainer) GetMediaContainer() *AddLineupDVRsMediaContainer {
if a == nil {
return nil
}
return a.MediaContainer
}
func (a *AddLineupMediaContainer) GetDvr() []AddLineupDVR {
if a == nil {
return nil
}
return a.Dvr
}
// AddLineupResponseBody - OK
type AddLineupResponseBody struct {
MediaContainer *AddLineupMediaContainer `json:"MediaContainer,omitempty"`
}
func (a *AddLineupResponseBody) GetMediaContainer() *AddLineupMediaContainer {
if a == nil {
return nil
}
return a.MediaContainer
}
type AddLineupResponse 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
// OK
Object *AddLineupResponseBody
Headers map[string][]string
}
func (a *AddLineupResponse) GetContentType() string {
if a == nil {
return ""
}
return a.ContentType
}
func (a *AddLineupResponse) GetStatusCode() int {
if a == nil {
return 0
}
return a.StatusCode
}
func (a *AddLineupResponse) GetRawResponse() *http.Response {
if a == nil {
return nil
}
return a.RawResponse
}
func (a *AddLineupResponse) GetObject() *AddLineupResponseBody {
if a == nil {
return nil
}
return a.Object
}
func (a *AddLineupResponse) GetHeaders() map[string][]string {
if a == nil {
return map[string][]string{}
}
return a.Headers
}

View File

@@ -1,230 +0,0 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"net/http"
)
type AddPlaylistContentsRequest struct {
// the ID of the playlist
PlaylistID float64 `pathParam:"style=simple,explode=false,name=playlistID"`
// the content URI for the playlist
URI string `queryParam:"style=form,explode=true,name=uri"`
// the play queue to add to a playlist
PlayQueueID *float64 `queryParam:"style=form,explode=true,name=playQueueID"`
}
func (a *AddPlaylistContentsRequest) GetPlaylistID() float64 {
if a == nil {
return 0.0
}
return a.PlaylistID
}
func (a *AddPlaylistContentsRequest) GetURI() string {
if a == nil {
return ""
}
return a.URI
}
func (a *AddPlaylistContentsRequest) GetPlayQueueID() *float64 {
if a == nil {
return nil
}
return a.PlayQueueID
}
type AddPlaylistContentsMetadata struct {
RatingKey *string `json:"ratingKey,omitempty"`
Key *string `json:"key,omitempty"`
GUID *string `json:"guid,omitempty"`
Type *string `json:"type,omitempty"`
Title *string `json:"title,omitempty"`
Summary *string `json:"summary,omitempty"`
Smart *bool `json:"smart,omitempty"`
PlaylistType *string `json:"playlistType,omitempty"`
Composite *string `json:"composite,omitempty"`
Duration *int `json:"duration,omitempty"`
LeafCount *int `json:"leafCount,omitempty"`
AddedAt *int `json:"addedAt,omitempty"`
UpdatedAt *int `json:"updatedAt,omitempty"`
}
func (a *AddPlaylistContentsMetadata) GetRatingKey() *string {
if a == nil {
return nil
}
return a.RatingKey
}
func (a *AddPlaylistContentsMetadata) GetKey() *string {
if a == nil {
return nil
}
return a.Key
}
func (a *AddPlaylistContentsMetadata) GetGUID() *string {
if a == nil {
return nil
}
return a.GUID
}
func (a *AddPlaylistContentsMetadata) GetType() *string {
if a == nil {
return nil
}
return a.Type
}
func (a *AddPlaylistContentsMetadata) GetTitle() *string {
if a == nil {
return nil
}
return a.Title
}
func (a *AddPlaylistContentsMetadata) GetSummary() *string {
if a == nil {
return nil
}
return a.Summary
}
func (a *AddPlaylistContentsMetadata) GetSmart() *bool {
if a == nil {
return nil
}
return a.Smart
}
func (a *AddPlaylistContentsMetadata) GetPlaylistType() *string {
if a == nil {
return nil
}
return a.PlaylistType
}
func (a *AddPlaylistContentsMetadata) GetComposite() *string {
if a == nil {
return nil
}
return a.Composite
}
func (a *AddPlaylistContentsMetadata) GetDuration() *int {
if a == nil {
return nil
}
return a.Duration
}
func (a *AddPlaylistContentsMetadata) GetLeafCount() *int {
if a == nil {
return nil
}
return a.LeafCount
}
func (a *AddPlaylistContentsMetadata) GetAddedAt() *int {
if a == nil {
return nil
}
return a.AddedAt
}
func (a *AddPlaylistContentsMetadata) GetUpdatedAt() *int {
if a == nil {
return nil
}
return a.UpdatedAt
}
type AddPlaylistContentsMediaContainer struct {
Size *int `json:"size,omitempty"`
LeafCountAdded *int `json:"leafCountAdded,omitempty"`
LeafCountRequested *int `json:"leafCountRequested,omitempty"`
Metadata []AddPlaylistContentsMetadata `json:"Metadata,omitempty"`
}
func (a *AddPlaylistContentsMediaContainer) GetSize() *int {
if a == nil {
return nil
}
return a.Size
}
func (a *AddPlaylistContentsMediaContainer) GetLeafCountAdded() *int {
if a == nil {
return nil
}
return a.LeafCountAdded
}
func (a *AddPlaylistContentsMediaContainer) GetLeafCountRequested() *int {
if a == nil {
return nil
}
return a.LeafCountRequested
}
func (a *AddPlaylistContentsMediaContainer) GetMetadata() []AddPlaylistContentsMetadata {
if a == nil {
return nil
}
return a.Metadata
}
// AddPlaylistContentsResponseBody - Playlist Updated
type AddPlaylistContentsResponseBody struct {
MediaContainer *AddPlaylistContentsMediaContainer `json:"MediaContainer,omitempty"`
}
func (a *AddPlaylistContentsResponseBody) GetMediaContainer() *AddPlaylistContentsMediaContainer {
if a == nil {
return nil
}
return a.MediaContainer
}
type AddPlaylistContentsResponse 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
// Playlist Updated
Object *AddPlaylistContentsResponseBody
}
func (a *AddPlaylistContentsResponse) GetContentType() string {
if a == nil {
return ""
}
return a.ContentType
}
func (a *AddPlaylistContentsResponse) GetStatusCode() int {
if a == nil {
return 0
}
return a.StatusCode
}
func (a *AddPlaylistContentsResponse) GetRawResponse() *http.Response {
if a == nil {
return nil
}
return a.RawResponse
}
func (a *AddPlaylistContentsResponse) GetObject() *AddPlaylistContentsResponseBody {
if a == nil {
return nil
}
return a.Object
}

View File

@@ -0,0 +1,301 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/components"
"net/http"
)
type AddPlaylistItemsGlobals struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
}
func (a AddPlaylistItemsGlobals) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(a, "", false)
}
func (a *AddPlaylistItemsGlobals) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &a, "", false, nil); err != nil {
return err
}
return nil
}
func (a *AddPlaylistItemsGlobals) GetAccepts() *components.Accepts {
if a == nil {
return nil
}
return a.Accepts
}
func (a *AddPlaylistItemsGlobals) GetClientIdentifier() *string {
if a == nil {
return nil
}
return a.ClientIdentifier
}
func (a *AddPlaylistItemsGlobals) GetProduct() *string {
if a == nil {
return nil
}
return a.Product
}
func (a *AddPlaylistItemsGlobals) GetVersion() *string {
if a == nil {
return nil
}
return a.Version
}
func (a *AddPlaylistItemsGlobals) GetPlatform() *string {
if a == nil {
return nil
}
return a.Platform
}
func (a *AddPlaylistItemsGlobals) GetPlatformVersion() *string {
if a == nil {
return nil
}
return a.PlatformVersion
}
func (a *AddPlaylistItemsGlobals) GetDevice() *string {
if a == nil {
return nil
}
return a.Device
}
func (a *AddPlaylistItemsGlobals) GetModel() *string {
if a == nil {
return nil
}
return a.Model
}
func (a *AddPlaylistItemsGlobals) GetDeviceVendor() *string {
if a == nil {
return nil
}
return a.DeviceVendor
}
func (a *AddPlaylistItemsGlobals) GetDeviceName() *string {
if a == nil {
return nil
}
return a.DeviceName
}
func (a *AddPlaylistItemsGlobals) GetMarketplace() *string {
if a == nil {
return nil
}
return a.Marketplace
}
type AddPlaylistItemsRequest struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
// The ID of the playlist
PlaylistID int64 `pathParam:"style=simple,explode=false,name=playlistId"`
// The content URI for the playlist.
URI *string `queryParam:"style=form,explode=true,name=uri"`
// The play queue to add to a playlist.
PlayQueueID *int64 `queryParam:"style=form,explode=true,name=playQueueID"`
}
func (a AddPlaylistItemsRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(a, "", false)
}
func (a *AddPlaylistItemsRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &a, "", false, []string{"playlistId"}); err != nil {
return err
}
return nil
}
func (a *AddPlaylistItemsRequest) GetAccepts() *components.Accepts {
if a == nil {
return nil
}
return a.Accepts
}
func (a *AddPlaylistItemsRequest) GetClientIdentifier() *string {
if a == nil {
return nil
}
return a.ClientIdentifier
}
func (a *AddPlaylistItemsRequest) GetProduct() *string {
if a == nil {
return nil
}
return a.Product
}
func (a *AddPlaylistItemsRequest) GetVersion() *string {
if a == nil {
return nil
}
return a.Version
}
func (a *AddPlaylistItemsRequest) GetPlatform() *string {
if a == nil {
return nil
}
return a.Platform
}
func (a *AddPlaylistItemsRequest) GetPlatformVersion() *string {
if a == nil {
return nil
}
return a.PlatformVersion
}
func (a *AddPlaylistItemsRequest) GetDevice() *string {
if a == nil {
return nil
}
return a.Device
}
func (a *AddPlaylistItemsRequest) GetModel() *string {
if a == nil {
return nil
}
return a.Model
}
func (a *AddPlaylistItemsRequest) GetDeviceVendor() *string {
if a == nil {
return nil
}
return a.DeviceVendor
}
func (a *AddPlaylistItemsRequest) GetDeviceName() *string {
if a == nil {
return nil
}
return a.DeviceName
}
func (a *AddPlaylistItemsRequest) GetMarketplace() *string {
if a == nil {
return nil
}
return a.Marketplace
}
func (a *AddPlaylistItemsRequest) GetPlaylistID() int64 {
if a == nil {
return 0
}
return a.PlaylistID
}
func (a *AddPlaylistItemsRequest) GetURI() *string {
if a == nil {
return nil
}
return a.URI
}
func (a *AddPlaylistItemsRequest) GetPlayQueueID() *int64 {
if a == nil {
return nil
}
return a.PlayQueueID
}
type AddPlaylistItemsResponse 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
// OK
MediaContainerWithPlaylistMetadata *components.MediaContainerWithPlaylistMetadata
}
func (a *AddPlaylistItemsResponse) GetContentType() string {
if a == nil {
return ""
}
return a.ContentType
}
func (a *AddPlaylistItemsResponse) GetStatusCode() int {
if a == nil {
return 0
}
return a.StatusCode
}
func (a *AddPlaylistItemsResponse) GetRawResponse() *http.Response {
if a == nil {
return nil
}
return a.RawResponse
}
func (a *AddPlaylistItemsResponse) GetMediaContainerWithPlaylistMetadata() *components.MediaContainerWithPlaylistMetadata {
if a == nil {
return nil
}
return a.MediaContainerWithPlaylistMetadata
}

View File

@@ -0,0 +1,274 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/components"
"net/http"
)
type AddProviderGlobals struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
}
func (a AddProviderGlobals) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(a, "", false)
}
func (a *AddProviderGlobals) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &a, "", false, nil); err != nil {
return err
}
return nil
}
func (a *AddProviderGlobals) GetAccepts() *components.Accepts {
if a == nil {
return nil
}
return a.Accepts
}
func (a *AddProviderGlobals) GetClientIdentifier() *string {
if a == nil {
return nil
}
return a.ClientIdentifier
}
func (a *AddProviderGlobals) GetProduct() *string {
if a == nil {
return nil
}
return a.Product
}
func (a *AddProviderGlobals) GetVersion() *string {
if a == nil {
return nil
}
return a.Version
}
func (a *AddProviderGlobals) GetPlatform() *string {
if a == nil {
return nil
}
return a.Platform
}
func (a *AddProviderGlobals) GetPlatformVersion() *string {
if a == nil {
return nil
}
return a.PlatformVersion
}
func (a *AddProviderGlobals) GetDevice() *string {
if a == nil {
return nil
}
return a.Device
}
func (a *AddProviderGlobals) GetModel() *string {
if a == nil {
return nil
}
return a.Model
}
func (a *AddProviderGlobals) GetDeviceVendor() *string {
if a == nil {
return nil
}
return a.DeviceVendor
}
func (a *AddProviderGlobals) GetDeviceName() *string {
if a == nil {
return nil
}
return a.DeviceName
}
func (a *AddProviderGlobals) GetMarketplace() *string {
if a == nil {
return nil
}
return a.Marketplace
}
type AddProviderRequest struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
// The URL of the media provider to add.
URL string `queryParam:"style=form,explode=true,name=url"`
}
func (a AddProviderRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(a, "", false)
}
func (a *AddProviderRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &a, "", false, []string{"url"}); err != nil {
return err
}
return nil
}
func (a *AddProviderRequest) GetAccepts() *components.Accepts {
if a == nil {
return nil
}
return a.Accepts
}
func (a *AddProviderRequest) GetClientIdentifier() *string {
if a == nil {
return nil
}
return a.ClientIdentifier
}
func (a *AddProviderRequest) GetProduct() *string {
if a == nil {
return nil
}
return a.Product
}
func (a *AddProviderRequest) GetVersion() *string {
if a == nil {
return nil
}
return a.Version
}
func (a *AddProviderRequest) GetPlatform() *string {
if a == nil {
return nil
}
return a.Platform
}
func (a *AddProviderRequest) GetPlatformVersion() *string {
if a == nil {
return nil
}
return a.PlatformVersion
}
func (a *AddProviderRequest) GetDevice() *string {
if a == nil {
return nil
}
return a.Device
}
func (a *AddProviderRequest) GetModel() *string {
if a == nil {
return nil
}
return a.Model
}
func (a *AddProviderRequest) GetDeviceVendor() *string {
if a == nil {
return nil
}
return a.DeviceVendor
}
func (a *AddProviderRequest) GetDeviceName() *string {
if a == nil {
return nil
}
return a.DeviceName
}
func (a *AddProviderRequest) GetMarketplace() *string {
if a == nil {
return nil
}
return a.Marketplace
}
func (a *AddProviderRequest) GetURL() string {
if a == nil {
return ""
}
return a.URL
}
type AddProviderResponse 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
}
func (a *AddProviderResponse) GetContentType() string {
if a == nil {
return ""
}
return a.ContentType
}
func (a *AddProviderResponse) GetStatusCode() int {
if a == nil {
return 0
}
return a.StatusCode
}
func (a *AddProviderResponse) GetRawResponse() *http.Response {
if a == nil {
return nil
}
return a.RawResponse
}

View File

@@ -0,0 +1,368 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/components"
"net/http"
)
type AddSectionGlobals struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
}
func (a AddSectionGlobals) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(a, "", false)
}
func (a *AddSectionGlobals) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &a, "", false, nil); err != nil {
return err
}
return nil
}
func (a *AddSectionGlobals) GetAccepts() *components.Accepts {
if a == nil {
return nil
}
return a.Accepts
}
func (a *AddSectionGlobals) GetClientIdentifier() *string {
if a == nil {
return nil
}
return a.ClientIdentifier
}
func (a *AddSectionGlobals) GetProduct() *string {
if a == nil {
return nil
}
return a.Product
}
func (a *AddSectionGlobals) GetVersion() *string {
if a == nil {
return nil
}
return a.Version
}
func (a *AddSectionGlobals) GetPlatform() *string {
if a == nil {
return nil
}
return a.Platform
}
func (a *AddSectionGlobals) GetPlatformVersion() *string {
if a == nil {
return nil
}
return a.PlatformVersion
}
func (a *AddSectionGlobals) GetDevice() *string {
if a == nil {
return nil
}
return a.Device
}
func (a *AddSectionGlobals) GetModel() *string {
if a == nil {
return nil
}
return a.Model
}
func (a *AddSectionGlobals) GetDeviceVendor() *string {
if a == nil {
return nil
}
return a.DeviceVendor
}
func (a *AddSectionGlobals) GetDeviceName() *string {
if a == nil {
return nil
}
return a.DeviceName
}
func (a *AddSectionGlobals) GetMarketplace() *string {
if a == nil {
return nil
}
return a.Marketplace
}
// QueryParamPrefs - The preferences for this section
type QueryParamPrefs struct {
}
type AddSectionRequest struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
// The name of the new section
Name string `queryParam:"style=form,explode=true,name=name"`
// The type of library section
Type int64 `queryParam:"style=form,explode=true,name=type"`
// The scanner this section should use
Scanner *string `queryParam:"style=form,explode=true,name=scanner"`
// The agent this section should use for metadata
Agent string `queryParam:"style=form,explode=true,name=agent"`
// The agent group id for this section
MetadataAgentProviderGroupID *string `queryParam:"style=form,explode=true,name=metadataAgentProviderGroupId"`
// The language of this section
Language string `queryParam:"style=form,explode=true,name=language"`
// The locations on disk to add to this section
Locations []string `queryParam:"style=form,explode=true,name=locations"`
// The preferences for this section
Prefs *QueryParamPrefs `queryParam:"style=deepObject,explode=true,name=prefs"`
// If set, paths are relative to `Media Upload` path
Relative *components.BoolInt `queryParam:"style=form,explode=true,name=relative"`
// If set, import media from iTunes.
ImportFromiTunes *components.BoolInt `queryParam:"style=form,explode=true,name=importFromiTunes"`
}
func (a AddSectionRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(a, "", false)
}
func (a *AddSectionRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &a, "", false, []string{"name", "type", "agent", "language"}); err != nil {
return err
}
return nil
}
func (a *AddSectionRequest) GetAccepts() *components.Accepts {
if a == nil {
return nil
}
return a.Accepts
}
func (a *AddSectionRequest) GetClientIdentifier() *string {
if a == nil {
return nil
}
return a.ClientIdentifier
}
func (a *AddSectionRequest) GetProduct() *string {
if a == nil {
return nil
}
return a.Product
}
func (a *AddSectionRequest) GetVersion() *string {
if a == nil {
return nil
}
return a.Version
}
func (a *AddSectionRequest) GetPlatform() *string {
if a == nil {
return nil
}
return a.Platform
}
func (a *AddSectionRequest) GetPlatformVersion() *string {
if a == nil {
return nil
}
return a.PlatformVersion
}
func (a *AddSectionRequest) GetDevice() *string {
if a == nil {
return nil
}
return a.Device
}
func (a *AddSectionRequest) GetModel() *string {
if a == nil {
return nil
}
return a.Model
}
func (a *AddSectionRequest) GetDeviceVendor() *string {
if a == nil {
return nil
}
return a.DeviceVendor
}
func (a *AddSectionRequest) GetDeviceName() *string {
if a == nil {
return nil
}
return a.DeviceName
}
func (a *AddSectionRequest) GetMarketplace() *string {
if a == nil {
return nil
}
return a.Marketplace
}
func (a *AddSectionRequest) GetName() string {
if a == nil {
return ""
}
return a.Name
}
func (a *AddSectionRequest) GetType() int64 {
if a == nil {
return 0
}
return a.Type
}
func (a *AddSectionRequest) GetScanner() *string {
if a == nil {
return nil
}
return a.Scanner
}
func (a *AddSectionRequest) GetAgent() string {
if a == nil {
return ""
}
return a.Agent
}
func (a *AddSectionRequest) GetMetadataAgentProviderGroupID() *string {
if a == nil {
return nil
}
return a.MetadataAgentProviderGroupID
}
func (a *AddSectionRequest) GetLanguage() string {
if a == nil {
return ""
}
return a.Language
}
func (a *AddSectionRequest) GetLocations() []string {
if a == nil {
return nil
}
return a.Locations
}
func (a *AddSectionRequest) GetPrefs() *QueryParamPrefs {
if a == nil {
return nil
}
return a.Prefs
}
func (a *AddSectionRequest) GetRelative() *components.BoolInt {
if a == nil {
return nil
}
return a.Relative
}
func (a *AddSectionRequest) GetImportFromiTunes() *components.BoolInt {
if a == nil {
return nil
}
return a.ImportFromiTunes
}
type AddSectionResponse 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
// OK
SlashGetResponses200 *components.SlashGetResponses200
}
func (a *AddSectionResponse) GetContentType() string {
if a == nil {
return ""
}
return a.ContentType
}
func (a *AddSectionResponse) GetStatusCode() int {
if a == nil {
return 0
}
return a.StatusCode
}
func (a *AddSectionResponse) GetRawResponse() *http.Response {
if a == nil {
return nil
}
return a.RawResponse
}
func (a *AddSectionResponse) GetSlashGetResponses200() *components.SlashGetResponses200 {
if a == nil {
return nil
}
return a.SlashGetResponses200
}

View File

@@ -0,0 +1,330 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/components"
"net/http"
)
type AddSubtitlesGlobals struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
}
func (a AddSubtitlesGlobals) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(a, "", false)
}
func (a *AddSubtitlesGlobals) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &a, "", false, nil); err != nil {
return err
}
return nil
}
func (a *AddSubtitlesGlobals) GetAccepts() *components.Accepts {
if a == nil {
return nil
}
return a.Accepts
}
func (a *AddSubtitlesGlobals) GetClientIdentifier() *string {
if a == nil {
return nil
}
return a.ClientIdentifier
}
func (a *AddSubtitlesGlobals) GetProduct() *string {
if a == nil {
return nil
}
return a.Product
}
func (a *AddSubtitlesGlobals) GetVersion() *string {
if a == nil {
return nil
}
return a.Version
}
func (a *AddSubtitlesGlobals) GetPlatform() *string {
if a == nil {
return nil
}
return a.Platform
}
func (a *AddSubtitlesGlobals) GetPlatformVersion() *string {
if a == nil {
return nil
}
return a.PlatformVersion
}
func (a *AddSubtitlesGlobals) GetDevice() *string {
if a == nil {
return nil
}
return a.Device
}
func (a *AddSubtitlesGlobals) GetModel() *string {
if a == nil {
return nil
}
return a.Model
}
func (a *AddSubtitlesGlobals) GetDeviceVendor() *string {
if a == nil {
return nil
}
return a.DeviceVendor
}
func (a *AddSubtitlesGlobals) GetDeviceName() *string {
if a == nil {
return nil
}
return a.DeviceName
}
func (a *AddSubtitlesGlobals) GetMarketplace() *string {
if a == nil {
return nil
}
return a.Marketplace
}
type AddSubtitlesRequest struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
Ids string `pathParam:"style=simple,explode=false,name=ids"`
Title *string `queryParam:"style=form,explode=true,name=title"`
Language *string `queryParam:"style=form,explode=true,name=language"`
MediaItemID *int64 `queryParam:"style=form,explode=true,name=mediaItemID"`
// The URL of the subtitle. If not provided, the contents of the subtitle must be in the post body
URL *string `queryParam:"style=form,explode=true,name=url"`
Format *string `queryParam:"style=form,explode=true,name=format"`
Forced *components.BoolInt `queryParam:"style=form,explode=true,name=forced"`
HearingImpaired *components.BoolInt `queryParam:"style=form,explode=true,name=hearingImpaired"`
}
func (a AddSubtitlesRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(a, "", false)
}
func (a *AddSubtitlesRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &a, "", false, []string{"ids"}); err != nil {
return err
}
return nil
}
func (a *AddSubtitlesRequest) GetAccepts() *components.Accepts {
if a == nil {
return nil
}
return a.Accepts
}
func (a *AddSubtitlesRequest) GetClientIdentifier() *string {
if a == nil {
return nil
}
return a.ClientIdentifier
}
func (a *AddSubtitlesRequest) GetProduct() *string {
if a == nil {
return nil
}
return a.Product
}
func (a *AddSubtitlesRequest) GetVersion() *string {
if a == nil {
return nil
}
return a.Version
}
func (a *AddSubtitlesRequest) GetPlatform() *string {
if a == nil {
return nil
}
return a.Platform
}
func (a *AddSubtitlesRequest) GetPlatformVersion() *string {
if a == nil {
return nil
}
return a.PlatformVersion
}
func (a *AddSubtitlesRequest) GetDevice() *string {
if a == nil {
return nil
}
return a.Device
}
func (a *AddSubtitlesRequest) GetModel() *string {
if a == nil {
return nil
}
return a.Model
}
func (a *AddSubtitlesRequest) GetDeviceVendor() *string {
if a == nil {
return nil
}
return a.DeviceVendor
}
func (a *AddSubtitlesRequest) GetDeviceName() *string {
if a == nil {
return nil
}
return a.DeviceName
}
func (a *AddSubtitlesRequest) GetMarketplace() *string {
if a == nil {
return nil
}
return a.Marketplace
}
func (a *AddSubtitlesRequest) GetIds() string {
if a == nil {
return ""
}
return a.Ids
}
func (a *AddSubtitlesRequest) GetTitle() *string {
if a == nil {
return nil
}
return a.Title
}
func (a *AddSubtitlesRequest) GetLanguage() *string {
if a == nil {
return nil
}
return a.Language
}
func (a *AddSubtitlesRequest) GetMediaItemID() *int64 {
if a == nil {
return nil
}
return a.MediaItemID
}
func (a *AddSubtitlesRequest) GetURL() *string {
if a == nil {
return nil
}
return a.URL
}
func (a *AddSubtitlesRequest) GetFormat() *string {
if a == nil {
return nil
}
return a.Format
}
func (a *AddSubtitlesRequest) GetForced() *components.BoolInt {
if a == nil {
return nil
}
return a.Forced
}
func (a *AddSubtitlesRequest) GetHearingImpaired() *components.BoolInt {
if a == nil {
return nil
}
return a.HearingImpaired
}
type AddSubtitlesResponse 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
}
func (a *AddSubtitlesResponse) GetContentType() string {
if a == nil {
return ""
}
return a.ContentType
}
func (a *AddSubtitlesResponse) GetStatusCode() int {
if a == nil {
return 0
}
return a.StatusCode
}
func (a *AddSubtitlesResponse) GetRawResponse() *http.Response {
if a == nil {
return nil
}
return a.RawResponse
}

View File

@@ -0,0 +1,310 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/components"
"net/http"
)
type AddToPlayQueueGlobals struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
}
func (a AddToPlayQueueGlobals) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(a, "", false)
}
func (a *AddToPlayQueueGlobals) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &a, "", false, nil); err != nil {
return err
}
return nil
}
func (a *AddToPlayQueueGlobals) GetAccepts() *components.Accepts {
if a == nil {
return nil
}
return a.Accepts
}
func (a *AddToPlayQueueGlobals) GetClientIdentifier() *string {
if a == nil {
return nil
}
return a.ClientIdentifier
}
func (a *AddToPlayQueueGlobals) GetProduct() *string {
if a == nil {
return nil
}
return a.Product
}
func (a *AddToPlayQueueGlobals) GetVersion() *string {
if a == nil {
return nil
}
return a.Version
}
func (a *AddToPlayQueueGlobals) GetPlatform() *string {
if a == nil {
return nil
}
return a.Platform
}
func (a *AddToPlayQueueGlobals) GetPlatformVersion() *string {
if a == nil {
return nil
}
return a.PlatformVersion
}
func (a *AddToPlayQueueGlobals) GetDevice() *string {
if a == nil {
return nil
}
return a.Device
}
func (a *AddToPlayQueueGlobals) GetModel() *string {
if a == nil {
return nil
}
return a.Model
}
func (a *AddToPlayQueueGlobals) GetDeviceVendor() *string {
if a == nil {
return nil
}
return a.DeviceVendor
}
func (a *AddToPlayQueueGlobals) GetDeviceName() *string {
if a == nil {
return nil
}
return a.DeviceName
}
func (a *AddToPlayQueueGlobals) GetMarketplace() *string {
if a == nil {
return nil
}
return a.Marketplace
}
type AddToPlayQueueRequest struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
// The ID of the play queue.
PlayQueueID int64 `pathParam:"style=simple,explode=false,name=playQueueId"`
// The content URI for what we're adding to the queue.
URI *string `queryParam:"style=form,explode=true,name=uri"`
// The ID of the playlist to add to the playQueue.
PlaylistID *string `queryParam:"style=form,explode=true,name=playlistID"`
// Play this item next (defaults to 0 - queueing at the end of manually queued items).
Next *components.BoolInt `queryParam:"style=form,explode=true,name=next"`
}
func (a AddToPlayQueueRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(a, "", false)
}
func (a *AddToPlayQueueRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &a, "", false, []string{"playQueueId"}); err != nil {
return err
}
return nil
}
func (a *AddToPlayQueueRequest) GetAccepts() *components.Accepts {
if a == nil {
return nil
}
return a.Accepts
}
func (a *AddToPlayQueueRequest) GetClientIdentifier() *string {
if a == nil {
return nil
}
return a.ClientIdentifier
}
func (a *AddToPlayQueueRequest) GetProduct() *string {
if a == nil {
return nil
}
return a.Product
}
func (a *AddToPlayQueueRequest) GetVersion() *string {
if a == nil {
return nil
}
return a.Version
}
func (a *AddToPlayQueueRequest) GetPlatform() *string {
if a == nil {
return nil
}
return a.Platform
}
func (a *AddToPlayQueueRequest) GetPlatformVersion() *string {
if a == nil {
return nil
}
return a.PlatformVersion
}
func (a *AddToPlayQueueRequest) GetDevice() *string {
if a == nil {
return nil
}
return a.Device
}
func (a *AddToPlayQueueRequest) GetModel() *string {
if a == nil {
return nil
}
return a.Model
}
func (a *AddToPlayQueueRequest) GetDeviceVendor() *string {
if a == nil {
return nil
}
return a.DeviceVendor
}
func (a *AddToPlayQueueRequest) GetDeviceName() *string {
if a == nil {
return nil
}
return a.DeviceName
}
func (a *AddToPlayQueueRequest) GetMarketplace() *string {
if a == nil {
return nil
}
return a.Marketplace
}
func (a *AddToPlayQueueRequest) GetPlayQueueID() int64 {
if a == nil {
return 0
}
return a.PlayQueueID
}
func (a *AddToPlayQueueRequest) GetURI() *string {
if a == nil {
return nil
}
return a.URI
}
func (a *AddToPlayQueueRequest) GetPlaylistID() *string {
if a == nil {
return nil
}
return a.PlaylistID
}
func (a *AddToPlayQueueRequest) GetNext() *components.BoolInt {
if a == nil {
return nil
}
return a.Next
}
type AddToPlayQueueResponse 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
// OK
MediaContainerWithPlaylistMetadata *components.MediaContainerWithPlaylistMetadata
}
func (a *AddToPlayQueueResponse) GetContentType() string {
if a == nil {
return ""
}
return a.ContentType
}
func (a *AddToPlayQueueResponse) GetStatusCode() int {
if a == nil {
return 0
}
return a.StatusCode
}
func (a *AddToPlayQueueResponse) GetRawResponse() *http.Response {
if a == nil {
return nil
}
return a.RawResponse
}
func (a *AddToPlayQueueResponse) GetMediaContainerWithPlaylistMetadata() *components.MediaContainerWithPlaylistMetadata {
if a == nil {
return nil
}
return a.MediaContainerWithPlaylistMetadata
}

View File

@@ -0,0 +1,291 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/components"
"net/http"
)
type AnalyzeMetadataGlobals struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
}
func (a AnalyzeMetadataGlobals) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(a, "", false)
}
func (a *AnalyzeMetadataGlobals) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &a, "", false, nil); err != nil {
return err
}
return nil
}
func (a *AnalyzeMetadataGlobals) GetAccepts() *components.Accepts {
if a == nil {
return nil
}
return a.Accepts
}
func (a *AnalyzeMetadataGlobals) GetClientIdentifier() *string {
if a == nil {
return nil
}
return a.ClientIdentifier
}
func (a *AnalyzeMetadataGlobals) GetProduct() *string {
if a == nil {
return nil
}
return a.Product
}
func (a *AnalyzeMetadataGlobals) GetVersion() *string {
if a == nil {
return nil
}
return a.Version
}
func (a *AnalyzeMetadataGlobals) GetPlatform() *string {
if a == nil {
return nil
}
return a.Platform
}
func (a *AnalyzeMetadataGlobals) GetPlatformVersion() *string {
if a == nil {
return nil
}
return a.PlatformVersion
}
func (a *AnalyzeMetadataGlobals) GetDevice() *string {
if a == nil {
return nil
}
return a.Device
}
func (a *AnalyzeMetadataGlobals) GetModel() *string {
if a == nil {
return nil
}
return a.Model
}
func (a *AnalyzeMetadataGlobals) GetDeviceVendor() *string {
if a == nil {
return nil
}
return a.DeviceVendor
}
func (a *AnalyzeMetadataGlobals) GetDeviceName() *string {
if a == nil {
return nil
}
return a.DeviceName
}
func (a *AnalyzeMetadataGlobals) GetMarketplace() *string {
if a == nil {
return nil
}
return a.Marketplace
}
type AnalyzeMetadataRequest struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
Ids string `pathParam:"style=simple,explode=false,name=ids"`
// Set the offset to be used for thumbnails
ThumbOffset *float64 `queryParam:"style=form,explode=true,name=thumbOffset"`
// Set the offset to be used for artwork
ArtOffset *float64 `queryParam:"style=form,explode=true,name=artOffset"`
}
func (a AnalyzeMetadataRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(a, "", false)
}
func (a *AnalyzeMetadataRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &a, "", false, []string{"ids"}); err != nil {
return err
}
return nil
}
func (a *AnalyzeMetadataRequest) GetAccepts() *components.Accepts {
if a == nil {
return nil
}
return a.Accepts
}
func (a *AnalyzeMetadataRequest) GetClientIdentifier() *string {
if a == nil {
return nil
}
return a.ClientIdentifier
}
func (a *AnalyzeMetadataRequest) GetProduct() *string {
if a == nil {
return nil
}
return a.Product
}
func (a *AnalyzeMetadataRequest) GetVersion() *string {
if a == nil {
return nil
}
return a.Version
}
func (a *AnalyzeMetadataRequest) GetPlatform() *string {
if a == nil {
return nil
}
return a.Platform
}
func (a *AnalyzeMetadataRequest) GetPlatformVersion() *string {
if a == nil {
return nil
}
return a.PlatformVersion
}
func (a *AnalyzeMetadataRequest) GetDevice() *string {
if a == nil {
return nil
}
return a.Device
}
func (a *AnalyzeMetadataRequest) GetModel() *string {
if a == nil {
return nil
}
return a.Model
}
func (a *AnalyzeMetadataRequest) GetDeviceVendor() *string {
if a == nil {
return nil
}
return a.DeviceVendor
}
func (a *AnalyzeMetadataRequest) GetDeviceName() *string {
if a == nil {
return nil
}
return a.DeviceName
}
func (a *AnalyzeMetadataRequest) GetMarketplace() *string {
if a == nil {
return nil
}
return a.Marketplace
}
func (a *AnalyzeMetadataRequest) GetIds() string {
if a == nil {
return ""
}
return a.Ids
}
func (a *AnalyzeMetadataRequest) GetThumbOffset() *float64 {
if a == nil {
return nil
}
return a.ThumbOffset
}
func (a *AnalyzeMetadataRequest) GetArtOffset() *float64 {
if a == nil {
return nil
}
return a.ArtOffset
}
type AnalyzeMetadataResponse 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
}
func (a *AnalyzeMetadataResponse) GetContentType() string {
if a == nil {
return ""
}
return a.ContentType
}
func (a *AnalyzeMetadataResponse) GetStatusCode() int {
if a == nil {
return 0
}
return a.StatusCode
}
func (a *AnalyzeMetadataResponse) GetRawResponse() *http.Response {
if a == nil {
return nil
}
return a.RawResponse
}

View File

@@ -3,80 +3,249 @@
package operations
import (
"encoding/json"
"fmt"
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/components"
"net/http"
)
// Tonight - Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install
type Tonight int64
const (
TonightZero Tonight = 0
TonightOne Tonight = 1
)
func (e Tonight) ToPointer() *Tonight {
return &e
type ApplyUpdatesGlobals struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
}
func (e *Tonight) UnmarshalJSON(data []byte) error {
var v int64
if err := json.Unmarshal(data, &v); err != nil {
func (a ApplyUpdatesGlobals) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(a, "", false)
}
func (a *ApplyUpdatesGlobals) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &a, "", false, nil); err != nil {
return err
}
switch v {
case 0:
fallthrough
case 1:
*e = Tonight(v)
return nil
default:
return fmt.Errorf("invalid value for Tonight: %v", v)
}
return nil
}
// Skip - Indicate that the latest version should be marked as skipped. The [Release] entry for this version will have the `state` set to `skipped`.
type Skip int64
const (
SkipZero Skip = 0
SkipOne Skip = 1
)
func (e Skip) ToPointer() *Skip {
return &e
}
func (e *Skip) UnmarshalJSON(data []byte) error {
var v int64
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case 0:
fallthrough
case 1:
*e = Skip(v)
func (a *ApplyUpdatesGlobals) GetAccepts() *components.Accepts {
if a == nil {
return nil
default:
return fmt.Errorf("invalid value for Skip: %v", v)
}
return a.Accepts
}
func (a *ApplyUpdatesGlobals) GetClientIdentifier() *string {
if a == nil {
return nil
}
return a.ClientIdentifier
}
func (a *ApplyUpdatesGlobals) GetProduct() *string {
if a == nil {
return nil
}
return a.Product
}
func (a *ApplyUpdatesGlobals) GetVersion() *string {
if a == nil {
return nil
}
return a.Version
}
func (a *ApplyUpdatesGlobals) GetPlatform() *string {
if a == nil {
return nil
}
return a.Platform
}
func (a *ApplyUpdatesGlobals) GetPlatformVersion() *string {
if a == nil {
return nil
}
return a.PlatformVersion
}
func (a *ApplyUpdatesGlobals) GetDevice() *string {
if a == nil {
return nil
}
return a.Device
}
func (a *ApplyUpdatesGlobals) GetModel() *string {
if a == nil {
return nil
}
return a.Model
}
func (a *ApplyUpdatesGlobals) GetDeviceVendor() *string {
if a == nil {
return nil
}
return a.DeviceVendor
}
func (a *ApplyUpdatesGlobals) GetDeviceName() *string {
if a == nil {
return nil
}
return a.DeviceName
}
func (a *ApplyUpdatesGlobals) GetMarketplace() *string {
if a == nil {
return nil
}
return a.Marketplace
}
type ApplyUpdatesRequest struct {
// Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install
Tonight *Tonight `queryParam:"style=form,explode=true,name=tonight"`
// Indicate that the latest version should be marked as skipped. The [Release] entry for this version will have the `state` set to `skipped`.
Skip *Skip `queryParam:"style=form,explode=true,name=skip"`
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
// Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install immediately.
Tonight *components.BoolInt `queryParam:"style=form,explode=true,name=tonight"`
// Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`.
Skip *components.BoolInt `queryParam:"style=form,explode=true,name=skip"`
}
func (a *ApplyUpdatesRequest) GetTonight() *Tonight {
func (a ApplyUpdatesRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(a, "", false)
}
func (a *ApplyUpdatesRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &a, "", false, nil); err != nil {
return err
}
return nil
}
func (a *ApplyUpdatesRequest) GetAccepts() *components.Accepts {
if a == nil {
return nil
}
return a.Accepts
}
func (a *ApplyUpdatesRequest) GetClientIdentifier() *string {
if a == nil {
return nil
}
return a.ClientIdentifier
}
func (a *ApplyUpdatesRequest) GetProduct() *string {
if a == nil {
return nil
}
return a.Product
}
func (a *ApplyUpdatesRequest) GetVersion() *string {
if a == nil {
return nil
}
return a.Version
}
func (a *ApplyUpdatesRequest) GetPlatform() *string {
if a == nil {
return nil
}
return a.Platform
}
func (a *ApplyUpdatesRequest) GetPlatformVersion() *string {
if a == nil {
return nil
}
return a.PlatformVersion
}
func (a *ApplyUpdatesRequest) GetDevice() *string {
if a == nil {
return nil
}
return a.Device
}
func (a *ApplyUpdatesRequest) GetModel() *string {
if a == nil {
return nil
}
return a.Model
}
func (a *ApplyUpdatesRequest) GetDeviceVendor() *string {
if a == nil {
return nil
}
return a.DeviceVendor
}
func (a *ApplyUpdatesRequest) GetDeviceName() *string {
if a == nil {
return nil
}
return a.DeviceName
}
func (a *ApplyUpdatesRequest) GetMarketplace() *string {
if a == nil {
return nil
}
return a.Marketplace
}
func (a *ApplyUpdatesRequest) GetTonight() *components.BoolInt {
if a == nil {
return nil
}
return a.Tonight
}
func (a *ApplyUpdatesRequest) GetSkip() *Skip {
func (a *ApplyUpdatesRequest) GetSkip() *components.BoolInt {
if a == nil {
return nil
}

View File

@@ -0,0 +1,318 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/components"
"net/http"
)
type AutocompleteGlobals struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
}
func (a AutocompleteGlobals) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(a, "", false)
}
func (a *AutocompleteGlobals) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &a, "", false, nil); err != nil {
return err
}
return nil
}
func (a *AutocompleteGlobals) GetAccepts() *components.Accepts {
if a == nil {
return nil
}
return a.Accepts
}
func (a *AutocompleteGlobals) GetClientIdentifier() *string {
if a == nil {
return nil
}
return a.ClientIdentifier
}
func (a *AutocompleteGlobals) GetProduct() *string {
if a == nil {
return nil
}
return a.Product
}
func (a *AutocompleteGlobals) GetVersion() *string {
if a == nil {
return nil
}
return a.Version
}
func (a *AutocompleteGlobals) GetPlatform() *string {
if a == nil {
return nil
}
return a.Platform
}
func (a *AutocompleteGlobals) GetPlatformVersion() *string {
if a == nil {
return nil
}
return a.PlatformVersion
}
func (a *AutocompleteGlobals) GetDevice() *string {
if a == nil {
return nil
}
return a.Device
}
func (a *AutocompleteGlobals) GetModel() *string {
if a == nil {
return nil
}
return a.Model
}
func (a *AutocompleteGlobals) GetDeviceVendor() *string {
if a == nil {
return nil
}
return a.DeviceVendor
}
func (a *AutocompleteGlobals) GetDeviceName() *string {
if a == nil {
return nil
}
return a.DeviceName
}
func (a *AutocompleteGlobals) GetMarketplace() *string {
if a == nil {
return nil
}
return a.Marketplace
}
type AutocompleteRequest struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
// Section identifier
SectionID int64 `pathParam:"style=simple,explode=false,name=sectionId"`
// Item type
Type *int64 `queryParam:"style=form,explode=true,name=type"`
// The "field" stands in for any field, the value is a partial string for matching
FieldQuery *string `queryParam:"style=form,explode=true,name=field.query"`
// This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries
MediaQuery *components.MediaQuery `queryParam:"style=form,explode=true,name=mediaQuery"`
}
func (a AutocompleteRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(a, "", false)
}
func (a *AutocompleteRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &a, "", false, []string{"sectionId"}); err != nil {
return err
}
return nil
}
func (a *AutocompleteRequest) GetAccepts() *components.Accepts {
if a == nil {
return nil
}
return a.Accepts
}
func (a *AutocompleteRequest) GetClientIdentifier() *string {
if a == nil {
return nil
}
return a.ClientIdentifier
}
func (a *AutocompleteRequest) GetProduct() *string {
if a == nil {
return nil
}
return a.Product
}
func (a *AutocompleteRequest) GetVersion() *string {
if a == nil {
return nil
}
return a.Version
}
func (a *AutocompleteRequest) GetPlatform() *string {
if a == nil {
return nil
}
return a.Platform
}
func (a *AutocompleteRequest) GetPlatformVersion() *string {
if a == nil {
return nil
}
return a.PlatformVersion
}
func (a *AutocompleteRequest) GetDevice() *string {
if a == nil {
return nil
}
return a.Device
}
func (a *AutocompleteRequest) GetModel() *string {
if a == nil {
return nil
}
return a.Model
}
func (a *AutocompleteRequest) GetDeviceVendor() *string {
if a == nil {
return nil
}
return a.DeviceVendor
}
func (a *AutocompleteRequest) GetDeviceName() *string {
if a == nil {
return nil
}
return a.DeviceName
}
func (a *AutocompleteRequest) GetMarketplace() *string {
if a == nil {
return nil
}
return a.Marketplace
}
func (a *AutocompleteRequest) GetSectionID() int64 {
if a == nil {
return 0
}
return a.SectionID
}
func (a *AutocompleteRequest) GetType() *int64 {
if a == nil {
return nil
}
return a.Type
}
func (a *AutocompleteRequest) GetFieldQuery() *string {
if a == nil {
return nil
}
return a.FieldQuery
}
func (a *AutocompleteRequest) GetMediaQuery() *components.MediaQuery {
if a == nil {
return nil
}
return a.MediaQuery
}
type AutocompleteResponse 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
// OK
MediaContainerWithMetadata *components.MediaContainerWithMetadata
Headers map[string][]string
}
func (a *AutocompleteResponse) GetContentType() string {
if a == nil {
return ""
}
return a.ContentType
}
func (a *AutocompleteResponse) GetStatusCode() int {
if a == nil {
return 0
}
return a.StatusCode
}
func (a *AutocompleteResponse) GetRawResponse() *http.Response {
if a == nil {
return nil
}
return a.RawResponse
}
func (a *AutocompleteResponse) GetMediaContainerWithMetadata() *components.MediaContainerWithMetadata {
if a == nil {
return nil
}
return a.MediaContainerWithMetadata
}
func (a *AutocompleteResponse) GetHeaders() map[string][]string {
if a == nil {
return map[string][]string{}
}
return a.Headers
}

View File

@@ -0,0 +1,274 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/components"
"net/http"
)
type CancelActivityGlobals struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
}
func (c CancelActivityGlobals) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(c, "", false)
}
func (c *CancelActivityGlobals) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &c, "", false, nil); err != nil {
return err
}
return nil
}
func (c *CancelActivityGlobals) GetAccepts() *components.Accepts {
if c == nil {
return nil
}
return c.Accepts
}
func (c *CancelActivityGlobals) GetClientIdentifier() *string {
if c == nil {
return nil
}
return c.ClientIdentifier
}
func (c *CancelActivityGlobals) GetProduct() *string {
if c == nil {
return nil
}
return c.Product
}
func (c *CancelActivityGlobals) GetVersion() *string {
if c == nil {
return nil
}
return c.Version
}
func (c *CancelActivityGlobals) GetPlatform() *string {
if c == nil {
return nil
}
return c.Platform
}
func (c *CancelActivityGlobals) GetPlatformVersion() *string {
if c == nil {
return nil
}
return c.PlatformVersion
}
func (c *CancelActivityGlobals) GetDevice() *string {
if c == nil {
return nil
}
return c.Device
}
func (c *CancelActivityGlobals) GetModel() *string {
if c == nil {
return nil
}
return c.Model
}
func (c *CancelActivityGlobals) GetDeviceVendor() *string {
if c == nil {
return nil
}
return c.DeviceVendor
}
func (c *CancelActivityGlobals) GetDeviceName() *string {
if c == nil {
return nil
}
return c.DeviceName
}
func (c *CancelActivityGlobals) GetMarketplace() *string {
if c == nil {
return nil
}
return c.Marketplace
}
type CancelActivityRequest struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
// The UUID of the activity to cancel.
ActivityID string `pathParam:"style=simple,explode=false,name=activityId"`
}
func (c CancelActivityRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(c, "", false)
}
func (c *CancelActivityRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &c, "", false, []string{"activityId"}); err != nil {
return err
}
return nil
}
func (c *CancelActivityRequest) GetAccepts() *components.Accepts {
if c == nil {
return nil
}
return c.Accepts
}
func (c *CancelActivityRequest) GetClientIdentifier() *string {
if c == nil {
return nil
}
return c.ClientIdentifier
}
func (c *CancelActivityRequest) GetProduct() *string {
if c == nil {
return nil
}
return c.Product
}
func (c *CancelActivityRequest) GetVersion() *string {
if c == nil {
return nil
}
return c.Version
}
func (c *CancelActivityRequest) GetPlatform() *string {
if c == nil {
return nil
}
return c.Platform
}
func (c *CancelActivityRequest) GetPlatformVersion() *string {
if c == nil {
return nil
}
return c.PlatformVersion
}
func (c *CancelActivityRequest) GetDevice() *string {
if c == nil {
return nil
}
return c.Device
}
func (c *CancelActivityRequest) GetModel() *string {
if c == nil {
return nil
}
return c.Model
}
func (c *CancelActivityRequest) GetDeviceVendor() *string {
if c == nil {
return nil
}
return c.DeviceVendor
}
func (c *CancelActivityRequest) GetDeviceName() *string {
if c == nil {
return nil
}
return c.DeviceName
}
func (c *CancelActivityRequest) GetMarketplace() *string {
if c == nil {
return nil
}
return c.Marketplace
}
func (c *CancelActivityRequest) GetActivityID() string {
if c == nil {
return ""
}
return c.ActivityID
}
type CancelActivityResponse 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
}
func (c *CancelActivityResponse) GetContentType() string {
if c == nil {
return ""
}
return c.ContentType
}
func (c *CancelActivityResponse) GetStatusCode() int {
if c == nil {
return 0
}
return c.StatusCode
}
func (c *CancelActivityResponse) GetRawResponse() *http.Response {
if c == nil {
return nil
}
return c.RawResponse
}

View File

@@ -0,0 +1,274 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/components"
"net/http"
)
type CancelGrabGlobals struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
}
func (c CancelGrabGlobals) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(c, "", false)
}
func (c *CancelGrabGlobals) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &c, "", false, nil); err != nil {
return err
}
return nil
}
func (c *CancelGrabGlobals) GetAccepts() *components.Accepts {
if c == nil {
return nil
}
return c.Accepts
}
func (c *CancelGrabGlobals) GetClientIdentifier() *string {
if c == nil {
return nil
}
return c.ClientIdentifier
}
func (c *CancelGrabGlobals) GetProduct() *string {
if c == nil {
return nil
}
return c.Product
}
func (c *CancelGrabGlobals) GetVersion() *string {
if c == nil {
return nil
}
return c.Version
}
func (c *CancelGrabGlobals) GetPlatform() *string {
if c == nil {
return nil
}
return c.Platform
}
func (c *CancelGrabGlobals) GetPlatformVersion() *string {
if c == nil {
return nil
}
return c.PlatformVersion
}
func (c *CancelGrabGlobals) GetDevice() *string {
if c == nil {
return nil
}
return c.Device
}
func (c *CancelGrabGlobals) GetModel() *string {
if c == nil {
return nil
}
return c.Model
}
func (c *CancelGrabGlobals) GetDeviceVendor() *string {
if c == nil {
return nil
}
return c.DeviceVendor
}
func (c *CancelGrabGlobals) GetDeviceName() *string {
if c == nil {
return nil
}
return c.DeviceName
}
func (c *CancelGrabGlobals) GetMarketplace() *string {
if c == nil {
return nil
}
return c.Marketplace
}
type CancelGrabRequest struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
// The ID of the operation.
OperationID string `pathParam:"style=simple,explode=false,name=operationId"`
}
func (c CancelGrabRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(c, "", false)
}
func (c *CancelGrabRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &c, "", false, []string{"operationId"}); err != nil {
return err
}
return nil
}
func (c *CancelGrabRequest) GetAccepts() *components.Accepts {
if c == nil {
return nil
}
return c.Accepts
}
func (c *CancelGrabRequest) GetClientIdentifier() *string {
if c == nil {
return nil
}
return c.ClientIdentifier
}
func (c *CancelGrabRequest) GetProduct() *string {
if c == nil {
return nil
}
return c.Product
}
func (c *CancelGrabRequest) GetVersion() *string {
if c == nil {
return nil
}
return c.Version
}
func (c *CancelGrabRequest) GetPlatform() *string {
if c == nil {
return nil
}
return c.Platform
}
func (c *CancelGrabRequest) GetPlatformVersion() *string {
if c == nil {
return nil
}
return c.PlatformVersion
}
func (c *CancelGrabRequest) GetDevice() *string {
if c == nil {
return nil
}
return c.Device
}
func (c *CancelGrabRequest) GetModel() *string {
if c == nil {
return nil
}
return c.Model
}
func (c *CancelGrabRequest) GetDeviceVendor() *string {
if c == nil {
return nil
}
return c.DeviceVendor
}
func (c *CancelGrabRequest) GetDeviceName() *string {
if c == nil {
return nil
}
return c.DeviceName
}
func (c *CancelGrabRequest) GetMarketplace() *string {
if c == nil {
return nil
}
return c.Marketplace
}
func (c *CancelGrabRequest) GetOperationID() string {
if c == nil {
return ""
}
return c.OperationID
}
type CancelGrabResponse 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
}
func (c *CancelGrabResponse) GetContentType() string {
if c == nil {
return ""
}
return c.ContentType
}
func (c *CancelGrabResponse) GetStatusCode() int {
if c == nil {
return 0
}
return c.StatusCode
}
func (c *CancelGrabResponse) GetRawResponse() *http.Response {
if c == nil {
return nil
}
return c.RawResponse
}

View File

@@ -0,0 +1,274 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/components"
"net/http"
)
type CancelRefreshGlobals struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
}
func (c CancelRefreshGlobals) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(c, "", false)
}
func (c *CancelRefreshGlobals) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &c, "", false, nil); err != nil {
return err
}
return nil
}
func (c *CancelRefreshGlobals) GetAccepts() *components.Accepts {
if c == nil {
return nil
}
return c.Accepts
}
func (c *CancelRefreshGlobals) GetClientIdentifier() *string {
if c == nil {
return nil
}
return c.ClientIdentifier
}
func (c *CancelRefreshGlobals) GetProduct() *string {
if c == nil {
return nil
}
return c.Product
}
func (c *CancelRefreshGlobals) GetVersion() *string {
if c == nil {
return nil
}
return c.Version
}
func (c *CancelRefreshGlobals) GetPlatform() *string {
if c == nil {
return nil
}
return c.Platform
}
func (c *CancelRefreshGlobals) GetPlatformVersion() *string {
if c == nil {
return nil
}
return c.PlatformVersion
}
func (c *CancelRefreshGlobals) GetDevice() *string {
if c == nil {
return nil
}
return c.Device
}
func (c *CancelRefreshGlobals) GetModel() *string {
if c == nil {
return nil
}
return c.Model
}
func (c *CancelRefreshGlobals) GetDeviceVendor() *string {
if c == nil {
return nil
}
return c.DeviceVendor
}
func (c *CancelRefreshGlobals) GetDeviceName() *string {
if c == nil {
return nil
}
return c.DeviceName
}
func (c *CancelRefreshGlobals) GetMarketplace() *string {
if c == nil {
return nil
}
return c.Marketplace
}
type CancelRefreshRequest struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
// Section identifier
SectionID int64 `pathParam:"style=simple,explode=false,name=sectionId"`
}
func (c CancelRefreshRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(c, "", false)
}
func (c *CancelRefreshRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &c, "", false, []string{"sectionId"}); err != nil {
return err
}
return nil
}
func (c *CancelRefreshRequest) GetAccepts() *components.Accepts {
if c == nil {
return nil
}
return c.Accepts
}
func (c *CancelRefreshRequest) GetClientIdentifier() *string {
if c == nil {
return nil
}
return c.ClientIdentifier
}
func (c *CancelRefreshRequest) GetProduct() *string {
if c == nil {
return nil
}
return c.Product
}
func (c *CancelRefreshRequest) GetVersion() *string {
if c == nil {
return nil
}
return c.Version
}
func (c *CancelRefreshRequest) GetPlatform() *string {
if c == nil {
return nil
}
return c.Platform
}
func (c *CancelRefreshRequest) GetPlatformVersion() *string {
if c == nil {
return nil
}
return c.PlatformVersion
}
func (c *CancelRefreshRequest) GetDevice() *string {
if c == nil {
return nil
}
return c.Device
}
func (c *CancelRefreshRequest) GetModel() *string {
if c == nil {
return nil
}
return c.Model
}
func (c *CancelRefreshRequest) GetDeviceVendor() *string {
if c == nil {
return nil
}
return c.DeviceVendor
}
func (c *CancelRefreshRequest) GetDeviceName() *string {
if c == nil {
return nil
}
return c.DeviceName
}
func (c *CancelRefreshRequest) GetMarketplace() *string {
if c == nil {
return nil
}
return c.Marketplace
}
func (c *CancelRefreshRequest) GetSectionID() int64 {
if c == nil {
return 0
}
return c.SectionID
}
type CancelRefreshResponse 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
}
func (c *CancelRefreshResponse) GetContentType() string {
if c == nil {
return ""
}
return c.ContentType
}
func (c *CancelRefreshResponse) GetStatusCode() int {
if c == nil {
return 0
}
return c.StatusCode
}
func (c *CancelRefreshResponse) GetRawResponse() *http.Response {
if c == nil {
return nil
}
return c.RawResponse
}

View File

@@ -1,49 +0,0 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"net/http"
)
type CancelServerActivitiesRequest struct {
// The UUID of the activity to cancel.
ActivityUUID string `pathParam:"style=simple,explode=false,name=activityUUID"`
}
func (c *CancelServerActivitiesRequest) GetActivityUUID() string {
if c == nil {
return ""
}
return c.ActivityUUID
}
type CancelServerActivitiesResponse 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
}
func (c *CancelServerActivitiesResponse) GetContentType() string {
if c == nil {
return ""
}
return c.ContentType
}
func (c *CancelServerActivitiesResponse) GetStatusCode() int {
if c == nil {
return 0
}
return c.StatusCode
}
func (c *CancelServerActivitiesResponse) GetRawResponse() *http.Response {
if c == nil {
return nil
}
return c.RawResponse
}

View File

@@ -1,78 +0,0 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"encoding/json"
"fmt"
"net/http"
)
// Download - Indicate that you want to start download any updates found.
type Download int64
const (
DownloadZero Download = 0
DownloadOne Download = 1
)
func (e Download) ToPointer() *Download {
return &e
}
func (e *Download) UnmarshalJSON(data []byte) error {
var v int64
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case 0:
fallthrough
case 1:
*e = Download(v)
return nil
default:
return fmt.Errorf("invalid value for Download: %v", v)
}
}
type CheckForUpdatesRequest struct {
// Indicate that you want to start download any updates found.
Download *Download `queryParam:"style=form,explode=true,name=download"`
}
func (c *CheckForUpdatesRequest) GetDownload() *Download {
if c == nil {
return nil
}
return c.Download
}
type CheckForUpdatesResponse 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
}
func (c *CheckForUpdatesResponse) GetContentType() string {
if c == nil {
return ""
}
return c.ContentType
}
func (c *CheckForUpdatesResponse) GetStatusCode() int {
if c == nil {
return 0
}
return c.StatusCode
}
func (c *CheckForUpdatesResponse) GetRawResponse() *http.Response {
if c == nil {
return nil
}
return c.RawResponse
}

View File

@@ -0,0 +1,274 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/components"
"net/http"
)
type CheckUpdatesGlobals struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
}
func (c CheckUpdatesGlobals) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(c, "", false)
}
func (c *CheckUpdatesGlobals) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &c, "", false, nil); err != nil {
return err
}
return nil
}
func (c *CheckUpdatesGlobals) GetAccepts() *components.Accepts {
if c == nil {
return nil
}
return c.Accepts
}
func (c *CheckUpdatesGlobals) GetClientIdentifier() *string {
if c == nil {
return nil
}
return c.ClientIdentifier
}
func (c *CheckUpdatesGlobals) GetProduct() *string {
if c == nil {
return nil
}
return c.Product
}
func (c *CheckUpdatesGlobals) GetVersion() *string {
if c == nil {
return nil
}
return c.Version
}
func (c *CheckUpdatesGlobals) GetPlatform() *string {
if c == nil {
return nil
}
return c.Platform
}
func (c *CheckUpdatesGlobals) GetPlatformVersion() *string {
if c == nil {
return nil
}
return c.PlatformVersion
}
func (c *CheckUpdatesGlobals) GetDevice() *string {
if c == nil {
return nil
}
return c.Device
}
func (c *CheckUpdatesGlobals) GetModel() *string {
if c == nil {
return nil
}
return c.Model
}
func (c *CheckUpdatesGlobals) GetDeviceVendor() *string {
if c == nil {
return nil
}
return c.DeviceVendor
}
func (c *CheckUpdatesGlobals) GetDeviceName() *string {
if c == nil {
return nil
}
return c.DeviceName
}
func (c *CheckUpdatesGlobals) GetMarketplace() *string {
if c == nil {
return nil
}
return c.Marketplace
}
type CheckUpdatesRequest struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
// Indicate that you want to start download any updates found.
Download *components.BoolInt `queryParam:"style=form,explode=true,name=download"`
}
func (c CheckUpdatesRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(c, "", false)
}
func (c *CheckUpdatesRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &c, "", false, nil); err != nil {
return err
}
return nil
}
func (c *CheckUpdatesRequest) GetAccepts() *components.Accepts {
if c == nil {
return nil
}
return c.Accepts
}
func (c *CheckUpdatesRequest) GetClientIdentifier() *string {
if c == nil {
return nil
}
return c.ClientIdentifier
}
func (c *CheckUpdatesRequest) GetProduct() *string {
if c == nil {
return nil
}
return c.Product
}
func (c *CheckUpdatesRequest) GetVersion() *string {
if c == nil {
return nil
}
return c.Version
}
func (c *CheckUpdatesRequest) GetPlatform() *string {
if c == nil {
return nil
}
return c.Platform
}
func (c *CheckUpdatesRequest) GetPlatformVersion() *string {
if c == nil {
return nil
}
return c.PlatformVersion
}
func (c *CheckUpdatesRequest) GetDevice() *string {
if c == nil {
return nil
}
return c.Device
}
func (c *CheckUpdatesRequest) GetModel() *string {
if c == nil {
return nil
}
return c.Model
}
func (c *CheckUpdatesRequest) GetDeviceVendor() *string {
if c == nil {
return nil
}
return c.DeviceVendor
}
func (c *CheckUpdatesRequest) GetDeviceName() *string {
if c == nil {
return nil
}
return c.DeviceName
}
func (c *CheckUpdatesRequest) GetMarketplace() *string {
if c == nil {
return nil
}
return c.Marketplace
}
func (c *CheckUpdatesRequest) GetDownload() *components.BoolInt {
if c == nil {
return nil
}
return c.Download
}
type CheckUpdatesResponse 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
}
func (c *CheckUpdatesResponse) GetContentType() string {
if c == nil {
return ""
}
return c.ContentType
}
func (c *CheckUpdatesResponse) GetStatusCode() int {
if c == nil {
return 0
}
return c.StatusCode
}
func (c *CheckUpdatesResponse) GetRawResponse() *http.Response {
if c == nil {
return nil
}
return c.RawResponse
}

View File

@@ -6,7 +6,7 @@ import (
"net/http"
)
type LogMultiLineResponse struct {
type CleanBundlesResponse struct {
// HTTP response content type for this operation
ContentType string
// HTTP response status code for this operation
@@ -15,23 +15,23 @@ type LogMultiLineResponse struct {
RawResponse *http.Response
}
func (l *LogMultiLineResponse) GetContentType() string {
if l == nil {
func (c *CleanBundlesResponse) GetContentType() string {
if c == nil {
return ""
}
return l.ContentType
return c.ContentType
}
func (l *LogMultiLineResponse) GetStatusCode() int {
if l == nil {
func (c *CleanBundlesResponse) GetStatusCode() int {
if c == nil {
return 0
}
return l.StatusCode
return c.StatusCode
}
func (l *LogMultiLineResponse) GetRawResponse() *http.Response {
if l == nil {
func (c *CleanBundlesResponse) GetRawResponse() *http.Response {
if c == nil {
return nil
}
return l.RawResponse
return c.RawResponse
}

View File

@@ -1,49 +0,0 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"net/http"
)
type ClearPlaylistContentsRequest struct {
// the ID of the playlist
PlaylistID float64 `pathParam:"style=simple,explode=false,name=playlistID"`
}
func (c *ClearPlaylistContentsRequest) GetPlaylistID() float64 {
if c == nil {
return 0.0
}
return c.PlaylistID
}
type ClearPlaylistContentsResponse 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
}
func (c *ClearPlaylistContentsResponse) GetContentType() string {
if c == nil {
return ""
}
return c.ContentType
}
func (c *ClearPlaylistContentsResponse) GetStatusCode() int {
if c == nil {
return 0
}
return c.StatusCode
}
func (c *ClearPlaylistContentsResponse) GetRawResponse() *http.Response {
if c == nil {
return nil
}
return c.RawResponse
}

View File

@@ -0,0 +1,283 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/components"
"net/http"
)
type ClearPlaylistItemsGlobals struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
}
func (c ClearPlaylistItemsGlobals) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(c, "", false)
}
func (c *ClearPlaylistItemsGlobals) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &c, "", false, nil); err != nil {
return err
}
return nil
}
func (c *ClearPlaylistItemsGlobals) GetAccepts() *components.Accepts {
if c == nil {
return nil
}
return c.Accepts
}
func (c *ClearPlaylistItemsGlobals) GetClientIdentifier() *string {
if c == nil {
return nil
}
return c.ClientIdentifier
}
func (c *ClearPlaylistItemsGlobals) GetProduct() *string {
if c == nil {
return nil
}
return c.Product
}
func (c *ClearPlaylistItemsGlobals) GetVersion() *string {
if c == nil {
return nil
}
return c.Version
}
func (c *ClearPlaylistItemsGlobals) GetPlatform() *string {
if c == nil {
return nil
}
return c.Platform
}
func (c *ClearPlaylistItemsGlobals) GetPlatformVersion() *string {
if c == nil {
return nil
}
return c.PlatformVersion
}
func (c *ClearPlaylistItemsGlobals) GetDevice() *string {
if c == nil {
return nil
}
return c.Device
}
func (c *ClearPlaylistItemsGlobals) GetModel() *string {
if c == nil {
return nil
}
return c.Model
}
func (c *ClearPlaylistItemsGlobals) GetDeviceVendor() *string {
if c == nil {
return nil
}
return c.DeviceVendor
}
func (c *ClearPlaylistItemsGlobals) GetDeviceName() *string {
if c == nil {
return nil
}
return c.DeviceName
}
func (c *ClearPlaylistItemsGlobals) GetMarketplace() *string {
if c == nil {
return nil
}
return c.Marketplace
}
type ClearPlaylistItemsRequest struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
// The ID of the playlist
PlaylistID int64 `pathParam:"style=simple,explode=false,name=playlistId"`
}
func (c ClearPlaylistItemsRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(c, "", false)
}
func (c *ClearPlaylistItemsRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &c, "", false, []string{"playlistId"}); err != nil {
return err
}
return nil
}
func (c *ClearPlaylistItemsRequest) GetAccepts() *components.Accepts {
if c == nil {
return nil
}
return c.Accepts
}
func (c *ClearPlaylistItemsRequest) GetClientIdentifier() *string {
if c == nil {
return nil
}
return c.ClientIdentifier
}
func (c *ClearPlaylistItemsRequest) GetProduct() *string {
if c == nil {
return nil
}
return c.Product
}
func (c *ClearPlaylistItemsRequest) GetVersion() *string {
if c == nil {
return nil
}
return c.Version
}
func (c *ClearPlaylistItemsRequest) GetPlatform() *string {
if c == nil {
return nil
}
return c.Platform
}
func (c *ClearPlaylistItemsRequest) GetPlatformVersion() *string {
if c == nil {
return nil
}
return c.PlatformVersion
}
func (c *ClearPlaylistItemsRequest) GetDevice() *string {
if c == nil {
return nil
}
return c.Device
}
func (c *ClearPlaylistItemsRequest) GetModel() *string {
if c == nil {
return nil
}
return c.Model
}
func (c *ClearPlaylistItemsRequest) GetDeviceVendor() *string {
if c == nil {
return nil
}
return c.DeviceVendor
}
func (c *ClearPlaylistItemsRequest) GetDeviceName() *string {
if c == nil {
return nil
}
return c.DeviceName
}
func (c *ClearPlaylistItemsRequest) GetMarketplace() *string {
if c == nil {
return nil
}
return c.Marketplace
}
func (c *ClearPlaylistItemsRequest) GetPlaylistID() int64 {
if c == nil {
return 0
}
return c.PlaylistID
}
type ClearPlaylistItemsResponse 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
// OK
MediaContainerWithPlaylistMetadata *components.MediaContainerWithPlaylistMetadata
}
func (c *ClearPlaylistItemsResponse) GetContentType() string {
if c == nil {
return ""
}
return c.ContentType
}
func (c *ClearPlaylistItemsResponse) GetStatusCode() int {
if c == nil {
return 0
}
return c.StatusCode
}
func (c *ClearPlaylistItemsResponse) GetRawResponse() *http.Response {
if c == nil {
return nil
}
return c.RawResponse
}
func (c *ClearPlaylistItemsResponse) GetMediaContainerWithPlaylistMetadata() *components.MediaContainerWithPlaylistMetadata {
if c == nil {
return nil
}
return c.MediaContainerWithPlaylistMetadata
}

View File

@@ -0,0 +1,283 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/components"
"net/http"
)
type ClearPlayQueueGlobals struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
}
func (c ClearPlayQueueGlobals) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(c, "", false)
}
func (c *ClearPlayQueueGlobals) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &c, "", false, nil); err != nil {
return err
}
return nil
}
func (c *ClearPlayQueueGlobals) GetAccepts() *components.Accepts {
if c == nil {
return nil
}
return c.Accepts
}
func (c *ClearPlayQueueGlobals) GetClientIdentifier() *string {
if c == nil {
return nil
}
return c.ClientIdentifier
}
func (c *ClearPlayQueueGlobals) GetProduct() *string {
if c == nil {
return nil
}
return c.Product
}
func (c *ClearPlayQueueGlobals) GetVersion() *string {
if c == nil {
return nil
}
return c.Version
}
func (c *ClearPlayQueueGlobals) GetPlatform() *string {
if c == nil {
return nil
}
return c.Platform
}
func (c *ClearPlayQueueGlobals) GetPlatformVersion() *string {
if c == nil {
return nil
}
return c.PlatformVersion
}
func (c *ClearPlayQueueGlobals) GetDevice() *string {
if c == nil {
return nil
}
return c.Device
}
func (c *ClearPlayQueueGlobals) GetModel() *string {
if c == nil {
return nil
}
return c.Model
}
func (c *ClearPlayQueueGlobals) GetDeviceVendor() *string {
if c == nil {
return nil
}
return c.DeviceVendor
}
func (c *ClearPlayQueueGlobals) GetDeviceName() *string {
if c == nil {
return nil
}
return c.DeviceName
}
func (c *ClearPlayQueueGlobals) GetMarketplace() *string {
if c == nil {
return nil
}
return c.Marketplace
}
type ClearPlayQueueRequest struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
// The ID of the play queue.
PlayQueueID int64 `pathParam:"style=simple,explode=false,name=playQueueId"`
}
func (c ClearPlayQueueRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(c, "", false)
}
func (c *ClearPlayQueueRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &c, "", false, []string{"playQueueId"}); err != nil {
return err
}
return nil
}
func (c *ClearPlayQueueRequest) GetAccepts() *components.Accepts {
if c == nil {
return nil
}
return c.Accepts
}
func (c *ClearPlayQueueRequest) GetClientIdentifier() *string {
if c == nil {
return nil
}
return c.ClientIdentifier
}
func (c *ClearPlayQueueRequest) GetProduct() *string {
if c == nil {
return nil
}
return c.Product
}
func (c *ClearPlayQueueRequest) GetVersion() *string {
if c == nil {
return nil
}
return c.Version
}
func (c *ClearPlayQueueRequest) GetPlatform() *string {
if c == nil {
return nil
}
return c.Platform
}
func (c *ClearPlayQueueRequest) GetPlatformVersion() *string {
if c == nil {
return nil
}
return c.PlatformVersion
}
func (c *ClearPlayQueueRequest) GetDevice() *string {
if c == nil {
return nil
}
return c.Device
}
func (c *ClearPlayQueueRequest) GetModel() *string {
if c == nil {
return nil
}
return c.Model
}
func (c *ClearPlayQueueRequest) GetDeviceVendor() *string {
if c == nil {
return nil
}
return c.DeviceVendor
}
func (c *ClearPlayQueueRequest) GetDeviceName() *string {
if c == nil {
return nil
}
return c.DeviceName
}
func (c *ClearPlayQueueRequest) GetMarketplace() *string {
if c == nil {
return nil
}
return c.Marketplace
}
func (c *ClearPlayQueueRequest) GetPlayQueueID() int64 {
if c == nil {
return 0
}
return c.PlayQueueID
}
type ClearPlayQueueResponse 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
// OK
MediaContainerWithPlaylistMetadata *components.MediaContainerWithPlaylistMetadata
}
func (c *ClearPlayQueueResponse) GetContentType() string {
if c == nil {
return ""
}
return c.ContentType
}
func (c *ClearPlayQueueResponse) GetStatusCode() int {
if c == nil {
return 0
}
return c.StatusCode
}
func (c *ClearPlayQueueResponse) GetRawResponse() *http.Response {
if c == nil {
return nil
}
return c.RawResponse
}
func (c *ClearPlayQueueResponse) GetMediaContainerWithPlaylistMetadata() *components.MediaContainerWithPlaylistMetadata {
if c == nil {
return nil
}
return c.MediaContainerWithPlaylistMetadata
}

View File

@@ -0,0 +1,399 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/components"
"net/http"
)
type ComputeChannelMapGlobals struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
}
func (c ComputeChannelMapGlobals) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(c, "", false)
}
func (c *ComputeChannelMapGlobals) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &c, "", false, nil); err != nil {
return err
}
return nil
}
func (c *ComputeChannelMapGlobals) GetAccepts() *components.Accepts {
if c == nil {
return nil
}
return c.Accepts
}
func (c *ComputeChannelMapGlobals) GetClientIdentifier() *string {
if c == nil {
return nil
}
return c.ClientIdentifier
}
func (c *ComputeChannelMapGlobals) GetProduct() *string {
if c == nil {
return nil
}
return c.Product
}
func (c *ComputeChannelMapGlobals) GetVersion() *string {
if c == nil {
return nil
}
return c.Version
}
func (c *ComputeChannelMapGlobals) GetPlatform() *string {
if c == nil {
return nil
}
return c.Platform
}
func (c *ComputeChannelMapGlobals) GetPlatformVersion() *string {
if c == nil {
return nil
}
return c.PlatformVersion
}
func (c *ComputeChannelMapGlobals) GetDevice() *string {
if c == nil {
return nil
}
return c.Device
}
func (c *ComputeChannelMapGlobals) GetModel() *string {
if c == nil {
return nil
}
return c.Model
}
func (c *ComputeChannelMapGlobals) GetDeviceVendor() *string {
if c == nil {
return nil
}
return c.DeviceVendor
}
func (c *ComputeChannelMapGlobals) GetDeviceName() *string {
if c == nil {
return nil
}
return c.DeviceName
}
func (c *ComputeChannelMapGlobals) GetMarketplace() *string {
if c == nil {
return nil
}
return c.Marketplace
}
type ComputeChannelMapRequest struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
// The URI describing the device
DeviceQueryParameter string `queryParam:"style=form,explode=true,name=device"`
// The URI describing the lineup
Lineup string `queryParam:"style=form,explode=true,name=lineup"`
}
func (c ComputeChannelMapRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(c, "", false)
}
func (c *ComputeChannelMapRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &c, "", false, []string{"device", "lineup"}); err != nil {
return err
}
return nil
}
func (c *ComputeChannelMapRequest) GetAccepts() *components.Accepts {
if c == nil {
return nil
}
return c.Accepts
}
func (c *ComputeChannelMapRequest) GetClientIdentifier() *string {
if c == nil {
return nil
}
return c.ClientIdentifier
}
func (c *ComputeChannelMapRequest) GetProduct() *string {
if c == nil {
return nil
}
return c.Product
}
func (c *ComputeChannelMapRequest) GetVersion() *string {
if c == nil {
return nil
}
return c.Version
}
func (c *ComputeChannelMapRequest) GetPlatform() *string {
if c == nil {
return nil
}
return c.Platform
}
func (c *ComputeChannelMapRequest) GetPlatformVersion() *string {
if c == nil {
return nil
}
return c.PlatformVersion
}
func (c *ComputeChannelMapRequest) GetDevice() *string {
if c == nil {
return nil
}
return c.Device
}
func (c *ComputeChannelMapRequest) GetModel() *string {
if c == nil {
return nil
}
return c.Model
}
func (c *ComputeChannelMapRequest) GetDeviceVendor() *string {
if c == nil {
return nil
}
return c.DeviceVendor
}
func (c *ComputeChannelMapRequest) GetDeviceName() *string {
if c == nil {
return nil
}
return c.DeviceName
}
func (c *ComputeChannelMapRequest) GetMarketplace() *string {
if c == nil {
return nil
}
return c.Marketplace
}
func (c *ComputeChannelMapRequest) GetDeviceQueryParameter() string {
if c == nil {
return ""
}
return c.DeviceQueryParameter
}
func (c *ComputeChannelMapRequest) GetLineup() string {
if c == nil {
return ""
}
return c.Lineup
}
type ComputeChannelMapChannelMapping struct {
ChannelKey *string `json:"channelKey,omitempty"`
// The channel description on the device
DeviceIdentifier *string `json:"deviceIdentifier,omitempty"`
Favorite *bool `json:"favorite,omitempty"`
// The channel identifier in the lineup
LineupIdentifier *string `json:"lineupIdentifier,omitempty"`
}
func (c *ComputeChannelMapChannelMapping) GetChannelKey() *string {
if c == nil {
return nil
}
return c.ChannelKey
}
func (c *ComputeChannelMapChannelMapping) GetDeviceIdentifier() *string {
if c == nil {
return nil
}
return c.DeviceIdentifier
}
func (c *ComputeChannelMapChannelMapping) GetFavorite() *bool {
if c == nil {
return nil
}
return c.Favorite
}
func (c *ComputeChannelMapChannelMapping) GetLineupIdentifier() *string {
if c == nil {
return nil
}
return c.LineupIdentifier
}
// ComputeChannelMapMediaContainer - `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
// Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
// The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
type ComputeChannelMapMediaContainer struct {
Identifier *string `json:"identifier,omitempty"`
// The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
//
Offset *int64 `json:"offset,omitempty"`
Size *int64 `json:"size,omitempty"`
// The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
//
TotalSize *int64 `json:"totalSize,omitempty"`
ChannelMapping []ComputeChannelMapChannelMapping `json:"ChannelMapping,omitempty"`
}
func (c *ComputeChannelMapMediaContainer) GetIdentifier() *string {
if c == nil {
return nil
}
return c.Identifier
}
func (c *ComputeChannelMapMediaContainer) GetOffset() *int64 {
if c == nil {
return nil
}
return c.Offset
}
func (c *ComputeChannelMapMediaContainer) GetSize() *int64 {
if c == nil {
return nil
}
return c.Size
}
func (c *ComputeChannelMapMediaContainer) GetTotalSize() *int64 {
if c == nil {
return nil
}
return c.TotalSize
}
func (c *ComputeChannelMapMediaContainer) GetChannelMapping() []ComputeChannelMapChannelMapping {
if c == nil {
return nil
}
return c.ChannelMapping
}
// ComputeChannelMapResponseBody - OK
type ComputeChannelMapResponseBody struct {
MediaContainer *ComputeChannelMapMediaContainer `json:"MediaContainer,omitempty"`
}
func (c *ComputeChannelMapResponseBody) GetMediaContainer() *ComputeChannelMapMediaContainer {
if c == nil {
return nil
}
return c.MediaContainer
}
type ComputeChannelMapResponse 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
// OK
Object *ComputeChannelMapResponseBody
Headers map[string][]string
}
func (c *ComputeChannelMapResponse) GetContentType() string {
if c == nil {
return ""
}
return c.ContentType
}
func (c *ComputeChannelMapResponse) GetStatusCode() int {
if c == nil {
return 0
}
return c.StatusCode
}
func (c *ComputeChannelMapResponse) GetRawResponse() *http.Response {
if c == nil {
return nil
}
return c.RawResponse
}
func (c *ComputeChannelMapResponse) GetObject() *ComputeChannelMapResponseBody {
if c == nil {
return nil
}
return c.Object
}
func (c *ComputeChannelMapResponse) GetHeaders() map[string][]string {
if c == nil {
return map[string][]string{}
}
return c.Headers
}

View File

@@ -0,0 +1,291 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/components"
"io"
"net/http"
)
type ConnectWebSocketGlobals struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
}
func (c ConnectWebSocketGlobals) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(c, "", false)
}
func (c *ConnectWebSocketGlobals) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &c, "", false, nil); err != nil {
return err
}
return nil
}
func (c *ConnectWebSocketGlobals) GetAccepts() *components.Accepts {
if c == nil {
return nil
}
return c.Accepts
}
func (c *ConnectWebSocketGlobals) GetClientIdentifier() *string {
if c == nil {
return nil
}
return c.ClientIdentifier
}
func (c *ConnectWebSocketGlobals) GetProduct() *string {
if c == nil {
return nil
}
return c.Product
}
func (c *ConnectWebSocketGlobals) GetVersion() *string {
if c == nil {
return nil
}
return c.Version
}
func (c *ConnectWebSocketGlobals) GetPlatform() *string {
if c == nil {
return nil
}
return c.Platform
}
func (c *ConnectWebSocketGlobals) GetPlatformVersion() *string {
if c == nil {
return nil
}
return c.PlatformVersion
}
func (c *ConnectWebSocketGlobals) GetDevice() *string {
if c == nil {
return nil
}
return c.Device
}
func (c *ConnectWebSocketGlobals) GetModel() *string {
if c == nil {
return nil
}
return c.Model
}
func (c *ConnectWebSocketGlobals) GetDeviceVendor() *string {
if c == nil {
return nil
}
return c.DeviceVendor
}
func (c *ConnectWebSocketGlobals) GetDeviceName() *string {
if c == nil {
return nil
}
return c.DeviceName
}
func (c *ConnectWebSocketGlobals) GetMarketplace() *string {
if c == nil {
return nil
}
return c.Marketplace
}
type ConnectWebSocketRequest struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
// By default, all events except logs are sent. A rich filtering mechanism is provided to allow clients to opt into or out of each event type using the `filters` parameter. For example:
//
// - `filters=-log`: All event types except logs (the default).
// - `filters=foo,bar`: Only the foo and bar event types.
// - `filters=`: All events types.
// - `filters=-foo,bar`: All event types except foo and bar.
//
Filter []string `queryParam:"style=form,explode=true,name=filter"`
}
func (c ConnectWebSocketRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(c, "", false)
}
func (c *ConnectWebSocketRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &c, "", false, nil); err != nil {
return err
}
return nil
}
func (c *ConnectWebSocketRequest) GetAccepts() *components.Accepts {
if c == nil {
return nil
}
return c.Accepts
}
func (c *ConnectWebSocketRequest) GetClientIdentifier() *string {
if c == nil {
return nil
}
return c.ClientIdentifier
}
func (c *ConnectWebSocketRequest) GetProduct() *string {
if c == nil {
return nil
}
return c.Product
}
func (c *ConnectWebSocketRequest) GetVersion() *string {
if c == nil {
return nil
}
return c.Version
}
func (c *ConnectWebSocketRequest) GetPlatform() *string {
if c == nil {
return nil
}
return c.Platform
}
func (c *ConnectWebSocketRequest) GetPlatformVersion() *string {
if c == nil {
return nil
}
return c.PlatformVersion
}
func (c *ConnectWebSocketRequest) GetDevice() *string {
if c == nil {
return nil
}
return c.Device
}
func (c *ConnectWebSocketRequest) GetModel() *string {
if c == nil {
return nil
}
return c.Model
}
func (c *ConnectWebSocketRequest) GetDeviceVendor() *string {
if c == nil {
return nil
}
return c.DeviceVendor
}
func (c *ConnectWebSocketRequest) GetDeviceName() *string {
if c == nil {
return nil
}
return c.DeviceName
}
func (c *ConnectWebSocketRequest) GetMarketplace() *string {
if c == nil {
return nil
}
return c.Marketplace
}
func (c *ConnectWebSocketRequest) GetFilter() []string {
if c == nil {
return nil
}
return c.Filter
}
type ConnectWebSocketResponse 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
// OK
// The Close method must be called on this field, even if it is not used, to prevent resource leaks.
ResponseStream io.ReadCloser
}
func (c *ConnectWebSocketResponse) GetContentType() string {
if c == nil {
return ""
}
return c.ContentType
}
func (c *ConnectWebSocketResponse) GetStatusCode() int {
if c == nil {
return 0
}
return c.StatusCode
}
func (c *ConnectWebSocketResponse) GetRawResponse() *http.Response {
if c == nil {
return nil
}
return c.RawResponse
}
func (c *ConnectWebSocketResponse) GetResponseStream() io.ReadCloser {
if c == nil {
return nil
}
return c.ResponseStream
}

View File

@@ -0,0 +1,319 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/components"
"net/http"
)
type CreateCollectionGlobals struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
}
func (c CreateCollectionGlobals) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(c, "", false)
}
func (c *CreateCollectionGlobals) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &c, "", false, nil); err != nil {
return err
}
return nil
}
func (c *CreateCollectionGlobals) GetAccepts() *components.Accepts {
if c == nil {
return nil
}
return c.Accepts
}
func (c *CreateCollectionGlobals) GetClientIdentifier() *string {
if c == nil {
return nil
}
return c.ClientIdentifier
}
func (c *CreateCollectionGlobals) GetProduct() *string {
if c == nil {
return nil
}
return c.Product
}
func (c *CreateCollectionGlobals) GetVersion() *string {
if c == nil {
return nil
}
return c.Version
}
func (c *CreateCollectionGlobals) GetPlatform() *string {
if c == nil {
return nil
}
return c.Platform
}
func (c *CreateCollectionGlobals) GetPlatformVersion() *string {
if c == nil {
return nil
}
return c.PlatformVersion
}
func (c *CreateCollectionGlobals) GetDevice() *string {
if c == nil {
return nil
}
return c.Device
}
func (c *CreateCollectionGlobals) GetModel() *string {
if c == nil {
return nil
}
return c.Model
}
func (c *CreateCollectionGlobals) GetDeviceVendor() *string {
if c == nil {
return nil
}
return c.DeviceVendor
}
func (c *CreateCollectionGlobals) GetDeviceName() *string {
if c == nil {
return nil
}
return c.DeviceName
}
func (c *CreateCollectionGlobals) GetMarketplace() *string {
if c == nil {
return nil
}
return c.Marketplace
}
type CreateCollectionRequest struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
// The section where this collection will be created
SectionID string `queryParam:"style=form,explode=true,name=sectionId"`
// The title to filter by or assign
Title *string `queryParam:"style=form,explode=true,name=title"`
// Whether this is a smart collection/playlist
Smart *bool `queryParam:"style=form,explode=true,name=smart"`
// The URI for processing the smart collection. Required for a smart collection
URI *string `queryParam:"style=form,explode=true,name=uri"`
// The metadata type to filter by
Type *int64 `queryParam:"style=form,explode=true,name=type"`
}
func (c CreateCollectionRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(c, "", false)
}
func (c *CreateCollectionRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &c, "", false, []string{"sectionId"}); err != nil {
return err
}
return nil
}
func (c *CreateCollectionRequest) GetAccepts() *components.Accepts {
if c == nil {
return nil
}
return c.Accepts
}
func (c *CreateCollectionRequest) GetClientIdentifier() *string {
if c == nil {
return nil
}
return c.ClientIdentifier
}
func (c *CreateCollectionRequest) GetProduct() *string {
if c == nil {
return nil
}
return c.Product
}
func (c *CreateCollectionRequest) GetVersion() *string {
if c == nil {
return nil
}
return c.Version
}
func (c *CreateCollectionRequest) GetPlatform() *string {
if c == nil {
return nil
}
return c.Platform
}
func (c *CreateCollectionRequest) GetPlatformVersion() *string {
if c == nil {
return nil
}
return c.PlatformVersion
}
func (c *CreateCollectionRequest) GetDevice() *string {
if c == nil {
return nil
}
return c.Device
}
func (c *CreateCollectionRequest) GetModel() *string {
if c == nil {
return nil
}
return c.Model
}
func (c *CreateCollectionRequest) GetDeviceVendor() *string {
if c == nil {
return nil
}
return c.DeviceVendor
}
func (c *CreateCollectionRequest) GetDeviceName() *string {
if c == nil {
return nil
}
return c.DeviceName
}
func (c *CreateCollectionRequest) GetMarketplace() *string {
if c == nil {
return nil
}
return c.Marketplace
}
func (c *CreateCollectionRequest) GetSectionID() string {
if c == nil {
return ""
}
return c.SectionID
}
func (c *CreateCollectionRequest) GetTitle() *string {
if c == nil {
return nil
}
return c.Title
}
func (c *CreateCollectionRequest) GetSmart() *bool {
if c == nil {
return nil
}
return c.Smart
}
func (c *CreateCollectionRequest) GetURI() *string {
if c == nil {
return nil
}
return c.URI
}
func (c *CreateCollectionRequest) GetType() *int64 {
if c == nil {
return nil
}
return c.Type
}
type CreateCollectionResponse 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
// OK
MediaContainerWithMetadata *components.MediaContainerWithMetadata
}
func (c *CreateCollectionResponse) GetContentType() string {
if c == nil {
return ""
}
return c.ContentType
}
func (c *CreateCollectionResponse) GetStatusCode() int {
if c == nil {
return 0
}
return c.StatusCode
}
func (c *CreateCollectionResponse) GetRawResponse() *http.Response {
if c == nil {
return nil
}
return c.RawResponse
}
func (c *CreateCollectionResponse) GetMediaContainerWithMetadata() *components.MediaContainerWithMetadata {
if c == nil {
return nil
}
return c.MediaContainerWithMetadata
}

View File

@@ -0,0 +1,310 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/components"
"net/http"
)
type CreateCustomHubGlobals struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
}
func (c CreateCustomHubGlobals) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(c, "", false)
}
func (c *CreateCustomHubGlobals) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &c, "", false, nil); err != nil {
return err
}
return nil
}
func (c *CreateCustomHubGlobals) GetAccepts() *components.Accepts {
if c == nil {
return nil
}
return c.Accepts
}
func (c *CreateCustomHubGlobals) GetClientIdentifier() *string {
if c == nil {
return nil
}
return c.ClientIdentifier
}
func (c *CreateCustomHubGlobals) GetProduct() *string {
if c == nil {
return nil
}
return c.Product
}
func (c *CreateCustomHubGlobals) GetVersion() *string {
if c == nil {
return nil
}
return c.Version
}
func (c *CreateCustomHubGlobals) GetPlatform() *string {
if c == nil {
return nil
}
return c.Platform
}
func (c *CreateCustomHubGlobals) GetPlatformVersion() *string {
if c == nil {
return nil
}
return c.PlatformVersion
}
func (c *CreateCustomHubGlobals) GetDevice() *string {
if c == nil {
return nil
}
return c.Device
}
func (c *CreateCustomHubGlobals) GetModel() *string {
if c == nil {
return nil
}
return c.Model
}
func (c *CreateCustomHubGlobals) GetDeviceVendor() *string {
if c == nil {
return nil
}
return c.DeviceVendor
}
func (c *CreateCustomHubGlobals) GetDeviceName() *string {
if c == nil {
return nil
}
return c.DeviceName
}
func (c *CreateCustomHubGlobals) GetMarketplace() *string {
if c == nil {
return nil
}
return c.Marketplace
}
type CreateCustomHubRequest struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
// The section ID for the hubs to reorder
SectionID int64 `pathParam:"style=simple,explode=false,name=sectionId"`
// The metadata item on which to base this hub. This must currently be a collection
MetadataItemID int64 `queryParam:"style=form,explode=true,name=metadataItemId"`
// Whether this hub should be displayed in recommended
PromotedToRecommended *components.BoolInt `queryParam:"style=form,explode=true,name=promotedToRecommended"`
// Whether this hub should be displayed in admin's home
PromotedToOwnHome *components.BoolInt `queryParam:"style=form,explode=true,name=promotedToOwnHome"`
// Whether this hub should be displayed in shared user's home
PromotedToSharedHome *components.BoolInt `queryParam:"style=form,explode=true,name=promotedToSharedHome"`
}
func (c CreateCustomHubRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(c, "", false)
}
func (c *CreateCustomHubRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &c, "", false, []string{"sectionId", "metadataItemId"}); err != nil {
return err
}
return nil
}
func (c *CreateCustomHubRequest) GetAccepts() *components.Accepts {
if c == nil {
return nil
}
return c.Accepts
}
func (c *CreateCustomHubRequest) GetClientIdentifier() *string {
if c == nil {
return nil
}
return c.ClientIdentifier
}
func (c *CreateCustomHubRequest) GetProduct() *string {
if c == nil {
return nil
}
return c.Product
}
func (c *CreateCustomHubRequest) GetVersion() *string {
if c == nil {
return nil
}
return c.Version
}
func (c *CreateCustomHubRequest) GetPlatform() *string {
if c == nil {
return nil
}
return c.Platform
}
func (c *CreateCustomHubRequest) GetPlatformVersion() *string {
if c == nil {
return nil
}
return c.PlatformVersion
}
func (c *CreateCustomHubRequest) GetDevice() *string {
if c == nil {
return nil
}
return c.Device
}
func (c *CreateCustomHubRequest) GetModel() *string {
if c == nil {
return nil
}
return c.Model
}
func (c *CreateCustomHubRequest) GetDeviceVendor() *string {
if c == nil {
return nil
}
return c.DeviceVendor
}
func (c *CreateCustomHubRequest) GetDeviceName() *string {
if c == nil {
return nil
}
return c.DeviceName
}
func (c *CreateCustomHubRequest) GetMarketplace() *string {
if c == nil {
return nil
}
return c.Marketplace
}
func (c *CreateCustomHubRequest) GetSectionID() int64 {
if c == nil {
return 0
}
return c.SectionID
}
func (c *CreateCustomHubRequest) GetMetadataItemID() int64 {
if c == nil {
return 0
}
return c.MetadataItemID
}
func (c *CreateCustomHubRequest) GetPromotedToRecommended() *components.BoolInt {
if c == nil {
return nil
}
return c.PromotedToRecommended
}
func (c *CreateCustomHubRequest) GetPromotedToOwnHome() *components.BoolInt {
if c == nil {
return nil
}
return c.PromotedToOwnHome
}
func (c *CreateCustomHubRequest) GetPromotedToSharedHome() *components.BoolInt {
if c == nil {
return nil
}
return c.PromotedToSharedHome
}
type CreateCustomHubResponse 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
}
func (c *CreateCustomHubResponse) GetContentType() string {
if c == nil {
return ""
}
return c.ContentType
}
func (c *CreateCustomHubResponse) GetStatusCode() int {
if c == nil {
return 0
}
return c.StatusCode
}
func (c *CreateCustomHubResponse) GetRawResponse() *http.Response {
if c == nil {
return nil
}
return c.RawResponse
}

View File

@@ -0,0 +1,185 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"encoding/json"
"fmt"
"net/http"
)
// Status - The state of this queue
// - deciding: At least one item is still being decided
// - waiting: At least one item is waiting for transcode and none are currently transcoding
// - processing: At least one item is being transcoded
// - done: All items are available (or potentially expired)
// - error: At least one item has encountered an error
type Status string
const (
StatusDeciding Status = "deciding"
StatusWaiting Status = "waiting"
StatusProcessing Status = "processing"
StatusDone Status = "done"
StatusError Status = "error"
)
func (e Status) ToPointer() *Status {
return &e
}
func (e *Status) UnmarshalJSON(data []byte) error {
var v string
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case "deciding":
fallthrough
case "waiting":
fallthrough
case "processing":
fallthrough
case "done":
fallthrough
case "error":
*e = Status(v)
return nil
default:
return fmt.Errorf("invalid value for Status: %v", v)
}
}
type DownloadQueue struct {
ID *int64 `json:"id,omitempty"`
ItemCount *int64 `json:"itemCount,omitempty"`
// The state of this queue
// - deciding: At least one item is still being decided
// - waiting: At least one item is waiting for transcode and none are currently transcoding
// - processing: At least one item is being transcoded
// - done: All items are available (or potentially expired)
// - error: At least one item has encountered an error
//
Status *Status `json:"status,omitempty"`
}
func (d *DownloadQueue) GetID() *int64 {
if d == nil {
return nil
}
return d.ID
}
func (d *DownloadQueue) GetItemCount() *int64 {
if d == nil {
return nil
}
return d.ItemCount
}
func (d *DownloadQueue) GetStatus() *Status {
if d == nil {
return nil
}
return d.Status
}
// CreateDownloadQueueMediaContainer - `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
// Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
// The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
type CreateDownloadQueueMediaContainer struct {
Identifier *string `json:"identifier,omitempty"`
// The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
//
Offset *int64 `json:"offset,omitempty"`
Size *int64 `json:"size,omitempty"`
// The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
//
TotalSize *int64 `json:"totalSize,omitempty"`
DownloadQueue []DownloadQueue `json:"DownloadQueue,omitempty"`
}
func (c *CreateDownloadQueueMediaContainer) GetIdentifier() *string {
if c == nil {
return nil
}
return c.Identifier
}
func (c *CreateDownloadQueueMediaContainer) GetOffset() *int64 {
if c == nil {
return nil
}
return c.Offset
}
func (c *CreateDownloadQueueMediaContainer) GetSize() *int64 {
if c == nil {
return nil
}
return c.Size
}
func (c *CreateDownloadQueueMediaContainer) GetTotalSize() *int64 {
if c == nil {
return nil
}
return c.TotalSize
}
func (c *CreateDownloadQueueMediaContainer) GetDownloadQueue() []DownloadQueue {
if c == nil {
return nil
}
return c.DownloadQueue
}
// CreateDownloadQueueResponseBody - OK
type CreateDownloadQueueResponseBody struct {
MediaContainer *CreateDownloadQueueMediaContainer `json:"MediaContainer,omitempty"`
}
func (c *CreateDownloadQueueResponseBody) GetMediaContainer() *CreateDownloadQueueMediaContainer {
if c == nil {
return nil
}
return c.MediaContainer
}
type CreateDownloadQueueResponse 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
// OK
Object *CreateDownloadQueueResponseBody
}
func (c *CreateDownloadQueueResponse) GetContentType() string {
if c == nil {
return ""
}
return c.ContentType
}
func (c *CreateDownloadQueueResponse) GetStatusCode() int {
if c == nil {
return 0
}
return c.StatusCode
}
func (c *CreateDownloadQueueResponse) GetRawResponse() *http.Response {
if c == nil {
return nil
}
return c.RawResponse
}
func (c *CreateDownloadQueueResponse) GetObject() *CreateDownloadQueueResponseBody {
if c == nil {
return nil
}
return c.Object
}

View File

@@ -0,0 +1,309 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/components"
"net/http"
)
type CreateDVRGlobals struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
}
func (c CreateDVRGlobals) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(c, "", false)
}
func (c *CreateDVRGlobals) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &c, "", false, nil); err != nil {
return err
}
return nil
}
func (c *CreateDVRGlobals) GetAccepts() *components.Accepts {
if c == nil {
return nil
}
return c.Accepts
}
func (c *CreateDVRGlobals) GetClientIdentifier() *string {
if c == nil {
return nil
}
return c.ClientIdentifier
}
func (c *CreateDVRGlobals) GetProduct() *string {
if c == nil {
return nil
}
return c.Product
}
func (c *CreateDVRGlobals) GetVersion() *string {
if c == nil {
return nil
}
return c.Version
}
func (c *CreateDVRGlobals) GetPlatform() *string {
if c == nil {
return nil
}
return c.Platform
}
func (c *CreateDVRGlobals) GetPlatformVersion() *string {
if c == nil {
return nil
}
return c.PlatformVersion
}
func (c *CreateDVRGlobals) GetDevice() *string {
if c == nil {
return nil
}
return c.Device
}
func (c *CreateDVRGlobals) GetModel() *string {
if c == nil {
return nil
}
return c.Model
}
func (c *CreateDVRGlobals) GetDeviceVendor() *string {
if c == nil {
return nil
}
return c.DeviceVendor
}
func (c *CreateDVRGlobals) GetDeviceName() *string {
if c == nil {
return nil
}
return c.DeviceName
}
func (c *CreateDVRGlobals) GetMarketplace() *string {
if c == nil {
return nil
}
return c.Marketplace
}
type CreateDVRRequest struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
// The EPG lineup.
Lineup *string `queryParam:"style=form,explode=true,name=lineup"`
// The device.
DeviceQueryParameter []string `queryParam:"style=form,explode=true,name=device"`
// The language.
Language *string `queryParam:"style=form,explode=true,name=language"`
}
func (c CreateDVRRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(c, "", false)
}
func (c *CreateDVRRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &c, "", false, nil); err != nil {
return err
}
return nil
}
func (c *CreateDVRRequest) GetAccepts() *components.Accepts {
if c == nil {
return nil
}
return c.Accepts
}
func (c *CreateDVRRequest) GetClientIdentifier() *string {
if c == nil {
return nil
}
return c.ClientIdentifier
}
func (c *CreateDVRRequest) GetProduct() *string {
if c == nil {
return nil
}
return c.Product
}
func (c *CreateDVRRequest) GetVersion() *string {
if c == nil {
return nil
}
return c.Version
}
func (c *CreateDVRRequest) GetPlatform() *string {
if c == nil {
return nil
}
return c.Platform
}
func (c *CreateDVRRequest) GetPlatformVersion() *string {
if c == nil {
return nil
}
return c.PlatformVersion
}
func (c *CreateDVRRequest) GetDevice() *string {
if c == nil {
return nil
}
return c.Device
}
func (c *CreateDVRRequest) GetModel() *string {
if c == nil {
return nil
}
return c.Model
}
func (c *CreateDVRRequest) GetDeviceVendor() *string {
if c == nil {
return nil
}
return c.DeviceVendor
}
func (c *CreateDVRRequest) GetDeviceName() *string {
if c == nil {
return nil
}
return c.DeviceName
}
func (c *CreateDVRRequest) GetMarketplace() *string {
if c == nil {
return nil
}
return c.Marketplace
}
func (c *CreateDVRRequest) GetLineup() *string {
if c == nil {
return nil
}
return c.Lineup
}
func (c *CreateDVRRequest) GetDeviceQueryParameter() []string {
if c == nil {
return nil
}
return c.DeviceQueryParameter
}
func (c *CreateDVRRequest) GetLanguage() *string {
if c == nil {
return nil
}
return c.Language
}
type CreateDVRResponse 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
// OK
DvrRequestHandlerSlashGetResponses200 *components.DvrRequestHandlerSlashGetResponses200
Headers map[string][]string
}
func (c *CreateDVRResponse) GetContentType() string {
if c == nil {
return ""
}
return c.ContentType
}
func (c *CreateDVRResponse) GetStatusCode() int {
if c == nil {
return 0
}
return c.StatusCode
}
func (c *CreateDVRResponse) GetRawResponse() *http.Response {
if c == nil {
return nil
}
return c.RawResponse
}
func (c *CreateDVRResponse) GetDvrRequestHandlerSlashGetResponses200() *components.DvrRequestHandlerSlashGetResponses200 {
if c == nil {
return nil
}
return c.DvrRequestHandlerSlashGetResponses200
}
func (c *CreateDVRResponse) GetHeaders() map[string][]string {
if c == nil {
return map[string][]string{}
}
return c.Headers
}

View File

@@ -0,0 +1,480 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"encoding/json"
"fmt"
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/components"
"net/http"
)
type CreateMarkerGlobals struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
}
func (c CreateMarkerGlobals) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(c, "", false)
}
func (c *CreateMarkerGlobals) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &c, "", false, nil); err != nil {
return err
}
return nil
}
func (c *CreateMarkerGlobals) GetAccepts() *components.Accepts {
if c == nil {
return nil
}
return c.Accepts
}
func (c *CreateMarkerGlobals) GetClientIdentifier() *string {
if c == nil {
return nil
}
return c.ClientIdentifier
}
func (c *CreateMarkerGlobals) GetProduct() *string {
if c == nil {
return nil
}
return c.Product
}
func (c *CreateMarkerGlobals) GetVersion() *string {
if c == nil {
return nil
}
return c.Version
}
func (c *CreateMarkerGlobals) GetPlatform() *string {
if c == nil {
return nil
}
return c.Platform
}
func (c *CreateMarkerGlobals) GetPlatformVersion() *string {
if c == nil {
return nil
}
return c.PlatformVersion
}
func (c *CreateMarkerGlobals) GetDevice() *string {
if c == nil {
return nil
}
return c.Device
}
func (c *CreateMarkerGlobals) GetModel() *string {
if c == nil {
return nil
}
return c.Model
}
func (c *CreateMarkerGlobals) GetDeviceVendor() *string {
if c == nil {
return nil
}
return c.DeviceVendor
}
func (c *CreateMarkerGlobals) GetDeviceName() *string {
if c == nil {
return nil
}
return c.DeviceName
}
func (c *CreateMarkerGlobals) GetMarketplace() *string {
if c == nil {
return nil
}
return c.Marketplace
}
// Attributes - The attributes to assign to this marker
type Attributes struct {
}
type CreateMarkerRequest struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
Ids string `pathParam:"style=simple,explode=false,name=ids"`
// The type of marker to edit/create
Type int64 `queryParam:"style=form,explode=true,name=type"`
// The start time of the marker
StartTimeOffset int64 `queryParam:"style=form,explode=true,name=startTimeOffset"`
// The end time of the marker
EndTimeOffset *int64 `queryParam:"style=form,explode=true,name=endTimeOffset"`
// The attributes to assign to this marker
Attributes *Attributes `queryParam:"style=deepObject,explode=true,name=attributes"`
}
func (c CreateMarkerRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(c, "", false)
}
func (c *CreateMarkerRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &c, "", false, []string{"ids", "type", "startTimeOffset"}); err != nil {
return err
}
return nil
}
func (c *CreateMarkerRequest) GetAccepts() *components.Accepts {
if c == nil {
return nil
}
return c.Accepts
}
func (c *CreateMarkerRequest) GetClientIdentifier() *string {
if c == nil {
return nil
}
return c.ClientIdentifier
}
func (c *CreateMarkerRequest) GetProduct() *string {
if c == nil {
return nil
}
return c.Product
}
func (c *CreateMarkerRequest) GetVersion() *string {
if c == nil {
return nil
}
return c.Version
}
func (c *CreateMarkerRequest) GetPlatform() *string {
if c == nil {
return nil
}
return c.Platform
}
func (c *CreateMarkerRequest) GetPlatformVersion() *string {
if c == nil {
return nil
}
return c.PlatformVersion
}
func (c *CreateMarkerRequest) GetDevice() *string {
if c == nil {
return nil
}
return c.Device
}
func (c *CreateMarkerRequest) GetModel() *string {
if c == nil {
return nil
}
return c.Model
}
func (c *CreateMarkerRequest) GetDeviceVendor() *string {
if c == nil {
return nil
}
return c.DeviceVendor
}
func (c *CreateMarkerRequest) GetDeviceName() *string {
if c == nil {
return nil
}
return c.DeviceName
}
func (c *CreateMarkerRequest) GetMarketplace() *string {
if c == nil {
return nil
}
return c.Marketplace
}
func (c *CreateMarkerRequest) GetIds() string {
if c == nil {
return ""
}
return c.Ids
}
func (c *CreateMarkerRequest) GetType() int64 {
if c == nil {
return 0
}
return c.Type
}
func (c *CreateMarkerRequest) GetStartTimeOffset() int64 {
if c == nil {
return 0
}
return c.StartTimeOffset
}
func (c *CreateMarkerRequest) GetEndTimeOffset() *int64 {
if c == nil {
return nil
}
return c.EndTimeOffset
}
func (c *CreateMarkerRequest) GetAttributes() *Attributes {
if c == nil {
return nil
}
return c.Attributes
}
type CreateMarkerType string
const (
CreateMarkerTypeIntro CreateMarkerType = "intro"
CreateMarkerTypeCommercial CreateMarkerType = "commercial"
CreateMarkerTypeBookmark CreateMarkerType = "bookmark"
CreateMarkerTypeResume CreateMarkerType = "resume"
CreateMarkerTypeCredit CreateMarkerType = "credit"
)
func (e CreateMarkerType) ToPointer() *CreateMarkerType {
return &e
}
func (e *CreateMarkerType) UnmarshalJSON(data []byte) error {
var v string
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case "intro":
fallthrough
case "commercial":
fallthrough
case "bookmark":
fallthrough
case "resume":
fallthrough
case "credit":
*e = CreateMarkerType(v)
return nil
default:
return fmt.Errorf("invalid value for CreateMarkerType: %v", v)
}
}
// CreateMarkerMediaContainer - `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
// Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
// The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
type CreateMarkerMediaContainer struct {
Identifier *string `json:"identifier,omitempty"`
// The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
//
Offset *int64 `json:"offset,omitempty"`
Size *int64 `json:"size,omitempty"`
// The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
//
TotalSize *int64 `json:"totalSize,omitempty"`
Color *string `json:"color,omitempty"`
EndTimeOffset *int64 `json:"endTimeOffset,omitempty"`
ID *int64 `json:"id,omitempty"`
StartTimeOffset *int64 `json:"startTimeOffset,omitempty"`
Title *string `json:"title,omitempty"`
Type *CreateMarkerType `json:"type,omitempty"`
AdditionalProperties map[string]any `additionalProperties:"true" json:"-"`
}
func (c CreateMarkerMediaContainer) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(c, "", false)
}
func (c *CreateMarkerMediaContainer) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &c, "", false, nil); err != nil {
return err
}
return nil
}
func (c *CreateMarkerMediaContainer) GetIdentifier() *string {
if c == nil {
return nil
}
return c.Identifier
}
func (c *CreateMarkerMediaContainer) GetOffset() *int64 {
if c == nil {
return nil
}
return c.Offset
}
func (c *CreateMarkerMediaContainer) GetSize() *int64 {
if c == nil {
return nil
}
return c.Size
}
func (c *CreateMarkerMediaContainer) GetTotalSize() *int64 {
if c == nil {
return nil
}
return c.TotalSize
}
func (c *CreateMarkerMediaContainer) GetColor() *string {
if c == nil {
return nil
}
return c.Color
}
func (c *CreateMarkerMediaContainer) GetEndTimeOffset() *int64 {
if c == nil {
return nil
}
return c.EndTimeOffset
}
func (c *CreateMarkerMediaContainer) GetID() *int64 {
if c == nil {
return nil
}
return c.ID
}
func (c *CreateMarkerMediaContainer) GetStartTimeOffset() *int64 {
if c == nil {
return nil
}
return c.StartTimeOffset
}
func (c *CreateMarkerMediaContainer) GetTitle() *string {
if c == nil {
return nil
}
return c.Title
}
func (c *CreateMarkerMediaContainer) GetType() *CreateMarkerType {
if c == nil {
return nil
}
return c.Type
}
func (c *CreateMarkerMediaContainer) GetAdditionalProperties() map[string]any {
if c == nil {
return nil
}
return c.AdditionalProperties
}
// CreateMarkerResponseBody - OK
type CreateMarkerResponseBody struct {
MediaContainer *CreateMarkerMediaContainer `json:"MediaContainer,omitempty"`
}
func (c *CreateMarkerResponseBody) GetMediaContainer() *CreateMarkerMediaContainer {
if c == nil {
return nil
}
return c.MediaContainer
}
type CreateMarkerResponse 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
// OK
Object *CreateMarkerResponseBody
}
func (c *CreateMarkerResponse) GetContentType() string {
if c == nil {
return ""
}
return c.ContentType
}
func (c *CreateMarkerResponse) GetStatusCode() int {
if c == nil {
return 0
}
return c.StatusCode
}
func (c *CreateMarkerResponse) GetRawResponse() *http.Response {
if c == nil {
return nil
}
return c.RawResponse
}
func (c *CreateMarkerResponse) GetObject() *CreateMarkerResponseBody {
if c == nil {
return nil
}
return c.Object
}

View File

@@ -3,261 +3,255 @@
package operations
import (
"encoding/json"
"fmt"
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/components"
"net/http"
)
// CreatePlaylistQueryParamType - type of playlist to create
type CreatePlaylistQueryParamType string
const (
CreatePlaylistQueryParamTypeAudio CreatePlaylistQueryParamType = "audio"
CreatePlaylistQueryParamTypeVideo CreatePlaylistQueryParamType = "video"
CreatePlaylistQueryParamTypePhoto CreatePlaylistQueryParamType = "photo"
)
func (e CreatePlaylistQueryParamType) ToPointer() *CreatePlaylistQueryParamType {
return &e
type CreatePlaylistGlobals struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
}
// Smart - whether the playlist is smart or not
type Smart int64
const (
SmartZero Smart = 0
SmartOne Smart = 1
)
func (e Smart) ToPointer() *Smart {
return &e
func (c CreatePlaylistGlobals) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(c, "", false)
}
func (e *Smart) UnmarshalJSON(data []byte) error {
var v int64
if err := json.Unmarshal(data, &v); err != nil {
func (c *CreatePlaylistGlobals) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &c, "", false, nil); err != nil {
return err
}
switch v {
case 0:
fallthrough
case 1:
*e = Smart(v)
return nil
}
func (c *CreatePlaylistGlobals) GetAccepts() *components.Accepts {
if c == nil {
return nil
default:
return fmt.Errorf("invalid value for Smart: %v", v)
}
return c.Accepts
}
func (c *CreatePlaylistGlobals) GetClientIdentifier() *string {
if c == nil {
return nil
}
return c.ClientIdentifier
}
func (c *CreatePlaylistGlobals) GetProduct() *string {
if c == nil {
return nil
}
return c.Product
}
func (c *CreatePlaylistGlobals) GetVersion() *string {
if c == nil {
return nil
}
return c.Version
}
func (c *CreatePlaylistGlobals) GetPlatform() *string {
if c == nil {
return nil
}
return c.Platform
}
func (c *CreatePlaylistGlobals) GetPlatformVersion() *string {
if c == nil {
return nil
}
return c.PlatformVersion
}
func (c *CreatePlaylistGlobals) GetDevice() *string {
if c == nil {
return nil
}
return c.Device
}
func (c *CreatePlaylistGlobals) GetModel() *string {
if c == nil {
return nil
}
return c.Model
}
func (c *CreatePlaylistGlobals) GetDeviceVendor() *string {
if c == nil {
return nil
}
return c.DeviceVendor
}
func (c *CreatePlaylistGlobals) GetDeviceName() *string {
if c == nil {
return nil
}
return c.DeviceName
}
func (c *CreatePlaylistGlobals) GetMarketplace() *string {
if c == nil {
return nil
}
return c.Marketplace
}
type CreatePlaylistRequest struct {
// name of the playlist
Title string `queryParam:"style=form,explode=true,name=title"`
// type of playlist to create
Type CreatePlaylistQueryParamType `queryParam:"style=form,explode=true,name=type"`
// whether the playlist is smart or not
Smart Smart `queryParam:"style=form,explode=true,name=smart"`
// the content URI for the playlist
URI string `queryParam:"style=form,explode=true,name=uri"`
// the play queue to copy to a playlist
PlayQueueID *float64 `queryParam:"style=form,explode=true,name=playQueueID"`
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
// The content URI for what we're playing (e.g. `library://...`).
URI *string `queryParam:"style=form,explode=true,name=uri"`
// To create a playlist from an existing play queue.
PlayQueueID *int64 `queryParam:"style=form,explode=true,name=playQueueID"`
}
func (c *CreatePlaylistRequest) GetTitle() string {
if c == nil {
return ""
func (c CreatePlaylistRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(c, "", false)
}
func (c *CreatePlaylistRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &c, "", false, nil); err != nil {
return err
}
return c.Title
return nil
}
func (c *CreatePlaylistRequest) GetType() CreatePlaylistQueryParamType {
func (c *CreatePlaylistRequest) GetAccepts() *components.Accepts {
if c == nil {
return CreatePlaylistQueryParamType("")
return nil
}
return c.Type
return c.Accepts
}
func (c *CreatePlaylistRequest) GetSmart() Smart {
func (c *CreatePlaylistRequest) GetClientIdentifier() *string {
if c == nil {
return Smart(0)
return nil
}
return c.Smart
return c.ClientIdentifier
}
func (c *CreatePlaylistRequest) GetURI() string {
func (c *CreatePlaylistRequest) GetProduct() *string {
if c == nil {
return ""
return nil
}
return c.Product
}
func (c *CreatePlaylistRequest) GetVersion() *string {
if c == nil {
return nil
}
return c.Version
}
func (c *CreatePlaylistRequest) GetPlatform() *string {
if c == nil {
return nil
}
return c.Platform
}
func (c *CreatePlaylistRequest) GetPlatformVersion() *string {
if c == nil {
return nil
}
return c.PlatformVersion
}
func (c *CreatePlaylistRequest) GetDevice() *string {
if c == nil {
return nil
}
return c.Device
}
func (c *CreatePlaylistRequest) GetModel() *string {
if c == nil {
return nil
}
return c.Model
}
func (c *CreatePlaylistRequest) GetDeviceVendor() *string {
if c == nil {
return nil
}
return c.DeviceVendor
}
func (c *CreatePlaylistRequest) GetDeviceName() *string {
if c == nil {
return nil
}
return c.DeviceName
}
func (c *CreatePlaylistRequest) GetMarketplace() *string {
if c == nil {
return nil
}
return c.Marketplace
}
func (c *CreatePlaylistRequest) GetURI() *string {
if c == nil {
return nil
}
return c.URI
}
func (c *CreatePlaylistRequest) GetPlayQueueID() *float64 {
func (c *CreatePlaylistRequest) GetPlayQueueID() *int64 {
if c == nil {
return nil
}
return c.PlayQueueID
}
type CreatePlaylistMetadata struct {
RatingKey *string `json:"ratingKey,omitempty"`
Key *string `json:"key,omitempty"`
GUID *string `json:"guid,omitempty"`
Type *string `json:"type,omitempty"`
Title *string `json:"title,omitempty"`
Summary *string `json:"summary,omitempty"`
Smart *bool `json:"smart,omitempty"`
PlaylistType *string `json:"playlistType,omitempty"`
Icon *string `json:"icon,omitempty"`
ViewCount *int `json:"viewCount,omitempty"`
LastViewedAt *int `json:"lastViewedAt,omitempty"`
LeafCount *int `json:"leafCount,omitempty"`
AddedAt *int `json:"addedAt,omitempty"`
UpdatedAt *int `json:"updatedAt,omitempty"`
Composite *string `json:"composite,omitempty"`
Duration *int `json:"duration,omitempty"`
}
func (c *CreatePlaylistMetadata) GetRatingKey() *string {
if c == nil {
return nil
}
return c.RatingKey
}
func (c *CreatePlaylistMetadata) GetKey() *string {
if c == nil {
return nil
}
return c.Key
}
func (c *CreatePlaylistMetadata) GetGUID() *string {
if c == nil {
return nil
}
return c.GUID
}
func (c *CreatePlaylistMetadata) GetType() *string {
if c == nil {
return nil
}
return c.Type
}
func (c *CreatePlaylistMetadata) GetTitle() *string {
if c == nil {
return nil
}
return c.Title
}
func (c *CreatePlaylistMetadata) GetSummary() *string {
if c == nil {
return nil
}
return c.Summary
}
func (c *CreatePlaylistMetadata) GetSmart() *bool {
if c == nil {
return nil
}
return c.Smart
}
func (c *CreatePlaylistMetadata) GetPlaylistType() *string {
if c == nil {
return nil
}
return c.PlaylistType
}
func (c *CreatePlaylistMetadata) GetIcon() *string {
if c == nil {
return nil
}
return c.Icon
}
func (c *CreatePlaylistMetadata) GetViewCount() *int {
if c == nil {
return nil
}
return c.ViewCount
}
func (c *CreatePlaylistMetadata) GetLastViewedAt() *int {
if c == nil {
return nil
}
return c.LastViewedAt
}
func (c *CreatePlaylistMetadata) GetLeafCount() *int {
if c == nil {
return nil
}
return c.LeafCount
}
func (c *CreatePlaylistMetadata) GetAddedAt() *int {
if c == nil {
return nil
}
return c.AddedAt
}
func (c *CreatePlaylistMetadata) GetUpdatedAt() *int {
if c == nil {
return nil
}
return c.UpdatedAt
}
func (c *CreatePlaylistMetadata) GetComposite() *string {
if c == nil {
return nil
}
return c.Composite
}
func (c *CreatePlaylistMetadata) GetDuration() *int {
if c == nil {
return nil
}
return c.Duration
}
type CreatePlaylistMediaContainer struct {
Size *int `json:"size,omitempty"`
Metadata []CreatePlaylistMetadata `json:"Metadata,omitempty"`
}
func (c *CreatePlaylistMediaContainer) GetSize() *int {
if c == nil {
return nil
}
return c.Size
}
func (c *CreatePlaylistMediaContainer) GetMetadata() []CreatePlaylistMetadata {
if c == nil {
return nil
}
return c.Metadata
}
// CreatePlaylistResponseBody - returns all playlists
type CreatePlaylistResponseBody struct {
MediaContainer *CreatePlaylistMediaContainer `json:"MediaContainer,omitempty"`
}
func (c *CreatePlaylistResponseBody) GetMediaContainer() *CreatePlaylistMediaContainer {
if c == nil {
return nil
}
return c.MediaContainer
}
type CreatePlaylistResponse struct {
// HTTP response content type for this operation
ContentType string
@@ -265,8 +259,8 @@ type CreatePlaylistResponse struct {
StatusCode int
// Raw HTTP response; suitable for custom response parsing
RawResponse *http.Response
// returns all playlists
Object *CreatePlaylistResponseBody
// OK
MediaContainerWithPlaylistMetadata *components.MediaContainerWithPlaylistMetadata
}
func (c *CreatePlaylistResponse) GetContentType() string {
@@ -290,9 +284,9 @@ func (c *CreatePlaylistResponse) GetRawResponse() *http.Response {
return c.RawResponse
}
func (c *CreatePlaylistResponse) GetObject() *CreatePlaylistResponseBody {
func (c *CreatePlaylistResponse) GetMediaContainerWithPlaylistMetadata() *components.MediaContainerWithPlaylistMetadata {
if c == nil {
return nil
}
return c.Object
return c.MediaContainerWithPlaylistMetadata
}

View File

@@ -0,0 +1,539 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"encoding/json"
"fmt"
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/components"
"net/http"
)
type CreatePlayQueueGlobals struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
}
func (c CreatePlayQueueGlobals) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(c, "", false)
}
func (c *CreatePlayQueueGlobals) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &c, "", false, nil); err != nil {
return err
}
return nil
}
func (c *CreatePlayQueueGlobals) GetAccepts() *components.Accepts {
if c == nil {
return nil
}
return c.Accepts
}
func (c *CreatePlayQueueGlobals) GetClientIdentifier() *string {
if c == nil {
return nil
}
return c.ClientIdentifier
}
func (c *CreatePlayQueueGlobals) GetProduct() *string {
if c == nil {
return nil
}
return c.Product
}
func (c *CreatePlayQueueGlobals) GetVersion() *string {
if c == nil {
return nil
}
return c.Version
}
func (c *CreatePlayQueueGlobals) GetPlatform() *string {
if c == nil {
return nil
}
return c.Platform
}
func (c *CreatePlayQueueGlobals) GetPlatformVersion() *string {
if c == nil {
return nil
}
return c.PlatformVersion
}
func (c *CreatePlayQueueGlobals) GetDevice() *string {
if c == nil {
return nil
}
return c.Device
}
func (c *CreatePlayQueueGlobals) GetModel() *string {
if c == nil {
return nil
}
return c.Model
}
func (c *CreatePlayQueueGlobals) GetDeviceVendor() *string {
if c == nil {
return nil
}
return c.DeviceVendor
}
func (c *CreatePlayQueueGlobals) GetDeviceName() *string {
if c == nil {
return nil
}
return c.DeviceName
}
func (c *CreatePlayQueueGlobals) GetMarketplace() *string {
if c == nil {
return nil
}
return c.Marketplace
}
// Type - The type of play queue to create
type Type string
const (
TypeAudio Type = "audio"
TypeVideo Type = "video"
TypePhoto Type = "photo"
)
func (e Type) ToPointer() *Type {
return &e
}
func (e *Type) UnmarshalJSON(data []byte) error {
var v string
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case "audio":
fallthrough
case "video":
fallthrough
case "photo":
*e = Type(v)
return nil
default:
return fmt.Errorf("invalid value for Type: %v", v)
}
}
type CreatePlayQueueRequest struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
// The content URI for what we're playing.
URI *string `queryParam:"style=form,explode=true,name=uri"`
// the ID of the playlist we're playing.
PlaylistID *int64 `queryParam:"style=form,explode=true,name=playlistID"`
// The type of play queue to create
Type Type `queryParam:"style=form,explode=true,name=type"`
// The key of the first item to play, defaults to the first in the play queue.
Key *string `queryParam:"style=form,explode=true,name=key"`
// Whether to shuffle the playlist, defaults to 0.
Shuffle *components.BoolInt `queryParam:"style=form,explode=true,name=shuffle"`
// If the PQ is bigger than the window, fill any empty space with wraparound items, defaults to 0.
Repeat *components.BoolInt `queryParam:"style=form,explode=true,name=repeat"`
// Whether to create a continuous play queue (e.g. from an episode), defaults to 0.
Continuous *components.BoolInt `queryParam:"style=form,explode=true,name=continuous"`
// Number of trailers to prepend a movie with not including the pre-roll. If omitted the pre-roll will not be returned in the play queue. When resuming a movie `extrasPrefixCount` should be omitted as a parameter instead of passing 0.
ExtrasPrefixCount *int64 `queryParam:"style=form,explode=true,name=extrasPrefixCount"`
// Only applies to queues of type photo, whether to retrieve all descendent photos from an album or section, defaults to 1.
Recursive *components.BoolInt `queryParam:"style=form,explode=true,name=recursive"`
// Only applies to queues of type show or seasons, whether to return a queue that is started on the On Deck episode if one exists. Otherwise begins the play queue on the beginning of the show or season.
OnDeck *components.BoolInt `queryParam:"style=form,explode=true,name=onDeck"`
}
func (c CreatePlayQueueRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(c, "", false)
}
func (c *CreatePlayQueueRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &c, "", false, []string{"type"}); err != nil {
return err
}
return nil
}
func (c *CreatePlayQueueRequest) GetAccepts() *components.Accepts {
if c == nil {
return nil
}
return c.Accepts
}
func (c *CreatePlayQueueRequest) GetClientIdentifier() *string {
if c == nil {
return nil
}
return c.ClientIdentifier
}
func (c *CreatePlayQueueRequest) GetProduct() *string {
if c == nil {
return nil
}
return c.Product
}
func (c *CreatePlayQueueRequest) GetVersion() *string {
if c == nil {
return nil
}
return c.Version
}
func (c *CreatePlayQueueRequest) GetPlatform() *string {
if c == nil {
return nil
}
return c.Platform
}
func (c *CreatePlayQueueRequest) GetPlatformVersion() *string {
if c == nil {
return nil
}
return c.PlatformVersion
}
func (c *CreatePlayQueueRequest) GetDevice() *string {
if c == nil {
return nil
}
return c.Device
}
func (c *CreatePlayQueueRequest) GetModel() *string {
if c == nil {
return nil
}
return c.Model
}
func (c *CreatePlayQueueRequest) GetDeviceVendor() *string {
if c == nil {
return nil
}
return c.DeviceVendor
}
func (c *CreatePlayQueueRequest) GetDeviceName() *string {
if c == nil {
return nil
}
return c.DeviceName
}
func (c *CreatePlayQueueRequest) GetMarketplace() *string {
if c == nil {
return nil
}
return c.Marketplace
}
func (c *CreatePlayQueueRequest) GetURI() *string {
if c == nil {
return nil
}
return c.URI
}
func (c *CreatePlayQueueRequest) GetPlaylistID() *int64 {
if c == nil {
return nil
}
return c.PlaylistID
}
func (c *CreatePlayQueueRequest) GetType() Type {
if c == nil {
return Type("")
}
return c.Type
}
func (c *CreatePlayQueueRequest) GetKey() *string {
if c == nil {
return nil
}
return c.Key
}
func (c *CreatePlayQueueRequest) GetShuffle() *components.BoolInt {
if c == nil {
return nil
}
return c.Shuffle
}
func (c *CreatePlayQueueRequest) GetRepeat() *components.BoolInt {
if c == nil {
return nil
}
return c.Repeat
}
func (c *CreatePlayQueueRequest) GetContinuous() *components.BoolInt {
if c == nil {
return nil
}
return c.Continuous
}
func (c *CreatePlayQueueRequest) GetExtrasPrefixCount() *int64 {
if c == nil {
return nil
}
return c.ExtrasPrefixCount
}
func (c *CreatePlayQueueRequest) GetRecursive() *components.BoolInt {
if c == nil {
return nil
}
return c.Recursive
}
func (c *CreatePlayQueueRequest) GetOnDeck() *components.BoolInt {
if c == nil {
return nil
}
return c.OnDeck
}
// CreatePlayQueueMediaContainer - `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
// Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
// The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
type CreatePlayQueueMediaContainer struct {
Identifier *string `json:"identifier,omitempty"`
// The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
//
Offset *int64 `json:"offset,omitempty"`
Size *int64 `json:"size,omitempty"`
// The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
//
TotalSize *int64 `json:"totalSize,omitempty"`
// The ID of the play queue, which is used in subsequent requests.
PlayQueueID *int64 `json:"playQueueID,omitempty"`
// Defines where the "Up Next" region starts
PlayQueueLastAddedItemID *string `json:"playQueueLastAddedItemID,omitempty"`
// The queue item ID of the currently selected item.
PlayQueueSelectedItemID *int64 `json:"playQueueSelectedItemID,omitempty"`
// The offset of the selected item in the play queue, from the beginning of the queue.
PlayQueueSelectedItemOffset *int64 `json:"playQueueSelectedItemOffset,omitempty"`
// The metadata item ID of the currently selected item (matches `ratingKey` attribute in metadata item if the media provider is a library).
PlayQueueSelectedMetadataItemID *int64 `json:"playQueueSelectedMetadataItemID,omitempty"`
// Whether or not the queue is shuffled.
PlayQueueShuffled *bool `json:"playQueueShuffled,omitempty"`
// The original URI used to create the play queue.
PlayQueueSourceURI *string `json:"playQueueSourceURI,omitempty"`
// The total number of items in the play queue.
PlayQueueTotalCount *int64 `json:"playQueueTotalCount,omitempty"`
// The version of the play queue. It increments every time a change is made to the play queue to assist clients in knowing when to refresh.
PlayQueueVersion *int64 `json:"playQueueVersion,omitempty"`
}
func (c *CreatePlayQueueMediaContainer) GetIdentifier() *string {
if c == nil {
return nil
}
return c.Identifier
}
func (c *CreatePlayQueueMediaContainer) GetOffset() *int64 {
if c == nil {
return nil
}
return c.Offset
}
func (c *CreatePlayQueueMediaContainer) GetSize() *int64 {
if c == nil {
return nil
}
return c.Size
}
func (c *CreatePlayQueueMediaContainer) GetTotalSize() *int64 {
if c == nil {
return nil
}
return c.TotalSize
}
func (c *CreatePlayQueueMediaContainer) GetPlayQueueID() *int64 {
if c == nil {
return nil
}
return c.PlayQueueID
}
func (c *CreatePlayQueueMediaContainer) GetPlayQueueLastAddedItemID() *string {
if c == nil {
return nil
}
return c.PlayQueueLastAddedItemID
}
func (c *CreatePlayQueueMediaContainer) GetPlayQueueSelectedItemID() *int64 {
if c == nil {
return nil
}
return c.PlayQueueSelectedItemID
}
func (c *CreatePlayQueueMediaContainer) GetPlayQueueSelectedItemOffset() *int64 {
if c == nil {
return nil
}
return c.PlayQueueSelectedItemOffset
}
func (c *CreatePlayQueueMediaContainer) GetPlayQueueSelectedMetadataItemID() *int64 {
if c == nil {
return nil
}
return c.PlayQueueSelectedMetadataItemID
}
func (c *CreatePlayQueueMediaContainer) GetPlayQueueShuffled() *bool {
if c == nil {
return nil
}
return c.PlayQueueShuffled
}
func (c *CreatePlayQueueMediaContainer) GetPlayQueueSourceURI() *string {
if c == nil {
return nil
}
return c.PlayQueueSourceURI
}
func (c *CreatePlayQueueMediaContainer) GetPlayQueueTotalCount() *int64 {
if c == nil {
return nil
}
return c.PlayQueueTotalCount
}
func (c *CreatePlayQueueMediaContainer) GetPlayQueueVersion() *int64 {
if c == nil {
return nil
}
return c.PlayQueueVersion
}
// CreatePlayQueueResponseBody - OK
type CreatePlayQueueResponseBody struct {
MediaContainer *CreatePlayQueueMediaContainer `json:"MediaContainer,omitempty"`
}
func (c *CreatePlayQueueResponseBody) GetMediaContainer() *CreatePlayQueueMediaContainer {
if c == nil {
return nil
}
return c.MediaContainer
}
type CreatePlayQueueResponse 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
// OK
Object *CreatePlayQueueResponseBody
Headers map[string][]string
}
func (c *CreatePlayQueueResponse) GetContentType() string {
if c == nil {
return ""
}
return c.ContentType
}
func (c *CreatePlayQueueResponse) GetStatusCode() int {
if c == nil {
return 0
}
return c.StatusCode
}
func (c *CreatePlayQueueResponse) GetRawResponse() *http.Response {
if c == nil {
return nil
}
return c.RawResponse
}
func (c *CreatePlayQueueResponse) GetObject() *CreatePlayQueueResponseBody {
if c == nil {
return nil
}
return c.Object
}
func (c *CreatePlayQueueResponse) GetHeaders() map[string][]string {
if c == nil {
return map[string][]string{}
}
return c.Headers
}

View File

@@ -0,0 +1,415 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/components"
"net/http"
)
type CreateSubscriptionGlobals struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
}
func (c CreateSubscriptionGlobals) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(c, "", false)
}
func (c *CreateSubscriptionGlobals) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &c, "", false, nil); err != nil {
return err
}
return nil
}
func (c *CreateSubscriptionGlobals) GetAccepts() *components.Accepts {
if c == nil {
return nil
}
return c.Accepts
}
func (c *CreateSubscriptionGlobals) GetClientIdentifier() *string {
if c == nil {
return nil
}
return c.ClientIdentifier
}
func (c *CreateSubscriptionGlobals) GetProduct() *string {
if c == nil {
return nil
}
return c.Product
}
func (c *CreateSubscriptionGlobals) GetVersion() *string {
if c == nil {
return nil
}
return c.Version
}
func (c *CreateSubscriptionGlobals) GetPlatform() *string {
if c == nil {
return nil
}
return c.Platform
}
func (c *CreateSubscriptionGlobals) GetPlatformVersion() *string {
if c == nil {
return nil
}
return c.PlatformVersion
}
func (c *CreateSubscriptionGlobals) GetDevice() *string {
if c == nil {
return nil
}
return c.Device
}
func (c *CreateSubscriptionGlobals) GetModel() *string {
if c == nil {
return nil
}
return c.Model
}
func (c *CreateSubscriptionGlobals) GetDeviceVendor() *string {
if c == nil {
return nil
}
return c.DeviceVendor
}
func (c *CreateSubscriptionGlobals) GetDeviceName() *string {
if c == nil {
return nil
}
return c.DeviceName
}
func (c *CreateSubscriptionGlobals) GetMarketplace() *string {
if c == nil {
return nil
}
return c.Marketplace
}
// Hints describing what we're looking for. Note: The hint `ratingKey` is required for downloading from a PMS remote.
type Hints struct {
}
// CreateSubscriptionQueryParamPrefs - Subscription preferences.
type CreateSubscriptionQueryParamPrefs struct {
}
// Params - Subscription parameters.
// - `mediaProviderID`: Required for downloads to indicate which MP the subscription will download into
// - `source`: Required for downloads to indicate the source of the downloaded content.
type Params struct {
}
type CreateSubscriptionRequest struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
// The library section into which we'll grab the media. Not actually required when the subscription is to a playlist.
TargetLibrarySectionID *int64 `queryParam:"style=form,explode=true,name=targetLibrarySectionID"`
// The section location into which to grab.
TargetSectionLocationID *int64 `queryParam:"style=form,explode=true,name=targetSectionLocationID"`
// The type of the thing we're subscribing too (e.g. show, season).
Type *int64 `queryParam:"style=form,explode=true,name=type"`
// Hints describing what we're looking for. Note: The hint `ratingKey` is required for downloading from a PMS remote.
Hints *Hints `queryParam:"style=deepObject,explode=true,name=hints"`
// Subscription preferences.
Prefs *CreateSubscriptionQueryParamPrefs `queryParam:"style=deepObject,explode=true,name=prefs"`
// Subscription parameters.
// - `mediaProviderID`: Required for downloads to indicate which MP the subscription will download into
// - `source`: Required for downloads to indicate the source of the downloaded content.
//
Params *Params `queryParam:"style=deepObject,explode=true,name=params"`
}
func (c CreateSubscriptionRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(c, "", false)
}
func (c *CreateSubscriptionRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &c, "", false, nil); err != nil {
return err
}
return nil
}
func (c *CreateSubscriptionRequest) GetAccepts() *components.Accepts {
if c == nil {
return nil
}
return c.Accepts
}
func (c *CreateSubscriptionRequest) GetClientIdentifier() *string {
if c == nil {
return nil
}
return c.ClientIdentifier
}
func (c *CreateSubscriptionRequest) GetProduct() *string {
if c == nil {
return nil
}
return c.Product
}
func (c *CreateSubscriptionRequest) GetVersion() *string {
if c == nil {
return nil
}
return c.Version
}
func (c *CreateSubscriptionRequest) GetPlatform() *string {
if c == nil {
return nil
}
return c.Platform
}
func (c *CreateSubscriptionRequest) GetPlatformVersion() *string {
if c == nil {
return nil
}
return c.PlatformVersion
}
func (c *CreateSubscriptionRequest) GetDevice() *string {
if c == nil {
return nil
}
return c.Device
}
func (c *CreateSubscriptionRequest) GetModel() *string {
if c == nil {
return nil
}
return c.Model
}
func (c *CreateSubscriptionRequest) GetDeviceVendor() *string {
if c == nil {
return nil
}
return c.DeviceVendor
}
func (c *CreateSubscriptionRequest) GetDeviceName() *string {
if c == nil {
return nil
}
return c.DeviceName
}
func (c *CreateSubscriptionRequest) GetMarketplace() *string {
if c == nil {
return nil
}
return c.Marketplace
}
func (c *CreateSubscriptionRequest) GetTargetLibrarySectionID() *int64 {
if c == nil {
return nil
}
return c.TargetLibrarySectionID
}
func (c *CreateSubscriptionRequest) GetTargetSectionLocationID() *int64 {
if c == nil {
return nil
}
return c.TargetSectionLocationID
}
func (c *CreateSubscriptionRequest) GetType() *int64 {
if c == nil {
return nil
}
return c.Type
}
func (c *CreateSubscriptionRequest) GetHints() *Hints {
if c == nil {
return nil
}
return c.Hints
}
func (c *CreateSubscriptionRequest) GetPrefs() *CreateSubscriptionQueryParamPrefs {
if c == nil {
return nil
}
return c.Prefs
}
func (c *CreateSubscriptionRequest) GetParams() *Params {
if c == nil {
return nil
}
return c.Params
}
// CreateSubscriptionMediaContainer - `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
// Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
// The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
type CreateSubscriptionMediaContainer struct {
Identifier *string `json:"identifier,omitempty"`
// The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
//
Offset *int64 `json:"offset,omitempty"`
Size *int64 `json:"size,omitempty"`
// The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
//
TotalSize *int64 `json:"totalSize,omitempty"`
MediaSubscription []components.MediaSubscription `json:"MediaSubscription,omitempty"`
}
func (c *CreateSubscriptionMediaContainer) GetIdentifier() *string {
if c == nil {
return nil
}
return c.Identifier
}
func (c *CreateSubscriptionMediaContainer) GetOffset() *int64 {
if c == nil {
return nil
}
return c.Offset
}
func (c *CreateSubscriptionMediaContainer) GetSize() *int64 {
if c == nil {
return nil
}
return c.Size
}
func (c *CreateSubscriptionMediaContainer) GetTotalSize() *int64 {
if c == nil {
return nil
}
return c.TotalSize
}
func (c *CreateSubscriptionMediaContainer) GetMediaSubscription() []components.MediaSubscription {
if c == nil {
return nil
}
return c.MediaSubscription
}
// CreateSubscriptionResponseBody - OK
type CreateSubscriptionResponseBody struct {
MediaContainer *CreateSubscriptionMediaContainer `json:"MediaContainer,omitempty"`
}
func (c *CreateSubscriptionResponseBody) GetMediaContainer() *CreateSubscriptionMediaContainer {
if c == nil {
return nil
}
return c.MediaContainer
}
type CreateSubscriptionResponse 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
// OK
Object *CreateSubscriptionResponseBody
Headers map[string][]string
}
func (c *CreateSubscriptionResponse) GetContentType() string {
if c == nil {
return ""
}
return c.ContentType
}
func (c *CreateSubscriptionResponse) GetStatusCode() int {
if c == nil {
return 0
}
return c.StatusCode
}
func (c *CreateSubscriptionResponse) GetRawResponse() *http.Response {
if c == nil {
return nil
}
return c.RawResponse
}
func (c *CreateSubscriptionResponse) GetObject() *CreateSubscriptionResponseBody {
if c == nil {
return nil
}
return c.Object
}
func (c *CreateSubscriptionResponse) GetHeaders() map[string][]string {
if c == nil {
return map[string][]string{}
}
return c.Headers
}

View File

@@ -0,0 +1,37 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"net/http"
)
type DeleteCachesResponse 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
}
func (d *DeleteCachesResponse) GetContentType() string {
if d == nil {
return ""
}
return d.ContentType
}
func (d *DeleteCachesResponse) GetStatusCode() int {
if d == nil {
return 0
}
return d.StatusCode
}
func (d *DeleteCachesResponse) GetRawResponse() *http.Response {
if d == nil {
return nil
}
return d.RawResponse
}

View File

@@ -0,0 +1,283 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/components"
"net/http"
)
type DeleteCollectionGlobals struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
}
func (d DeleteCollectionGlobals) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(d, "", false)
}
func (d *DeleteCollectionGlobals) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &d, "", false, nil); err != nil {
return err
}
return nil
}
func (d *DeleteCollectionGlobals) GetAccepts() *components.Accepts {
if d == nil {
return nil
}
return d.Accepts
}
func (d *DeleteCollectionGlobals) GetClientIdentifier() *string {
if d == nil {
return nil
}
return d.ClientIdentifier
}
func (d *DeleteCollectionGlobals) GetProduct() *string {
if d == nil {
return nil
}
return d.Product
}
func (d *DeleteCollectionGlobals) GetVersion() *string {
if d == nil {
return nil
}
return d.Version
}
func (d *DeleteCollectionGlobals) GetPlatform() *string {
if d == nil {
return nil
}
return d.Platform
}
func (d *DeleteCollectionGlobals) GetPlatformVersion() *string {
if d == nil {
return nil
}
return d.PlatformVersion
}
func (d *DeleteCollectionGlobals) GetDevice() *string {
if d == nil {
return nil
}
return d.Device
}
func (d *DeleteCollectionGlobals) GetModel() *string {
if d == nil {
return nil
}
return d.Model
}
func (d *DeleteCollectionGlobals) GetDeviceVendor() *string {
if d == nil {
return nil
}
return d.DeviceVendor
}
func (d *DeleteCollectionGlobals) GetDeviceName() *string {
if d == nil {
return nil
}
return d.DeviceName
}
func (d *DeleteCollectionGlobals) GetMarketplace() *string {
if d == nil {
return nil
}
return d.Marketplace
}
type DeleteCollectionRequest struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
// Section identifier
SectionID int64 `pathParam:"style=simple,explode=false,name=sectionId"`
// Collection Id
CollectionID int64 `pathParam:"style=simple,explode=false,name=collectionId"`
}
func (d DeleteCollectionRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(d, "", false)
}
func (d *DeleteCollectionRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &d, "", false, []string{"sectionId", "collectionId"}); err != nil {
return err
}
return nil
}
func (d *DeleteCollectionRequest) GetAccepts() *components.Accepts {
if d == nil {
return nil
}
return d.Accepts
}
func (d *DeleteCollectionRequest) GetClientIdentifier() *string {
if d == nil {
return nil
}
return d.ClientIdentifier
}
func (d *DeleteCollectionRequest) GetProduct() *string {
if d == nil {
return nil
}
return d.Product
}
func (d *DeleteCollectionRequest) GetVersion() *string {
if d == nil {
return nil
}
return d.Version
}
func (d *DeleteCollectionRequest) GetPlatform() *string {
if d == nil {
return nil
}
return d.Platform
}
func (d *DeleteCollectionRequest) GetPlatformVersion() *string {
if d == nil {
return nil
}
return d.PlatformVersion
}
func (d *DeleteCollectionRequest) GetDevice() *string {
if d == nil {
return nil
}
return d.Device
}
func (d *DeleteCollectionRequest) GetModel() *string {
if d == nil {
return nil
}
return d.Model
}
func (d *DeleteCollectionRequest) GetDeviceVendor() *string {
if d == nil {
return nil
}
return d.DeviceVendor
}
func (d *DeleteCollectionRequest) GetDeviceName() *string {
if d == nil {
return nil
}
return d.DeviceName
}
func (d *DeleteCollectionRequest) GetMarketplace() *string {
if d == nil {
return nil
}
return d.Marketplace
}
func (d *DeleteCollectionRequest) GetSectionID() int64 {
if d == nil {
return 0
}
return d.SectionID
}
func (d *DeleteCollectionRequest) GetCollectionID() int64 {
if d == nil {
return 0
}
return d.CollectionID
}
type DeleteCollectionResponse 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
}
func (d *DeleteCollectionResponse) GetContentType() string {
if d == nil {
return ""
}
return d.ContentType
}
func (d *DeleteCollectionResponse) GetStatusCode() int {
if d == nil {
return 0
}
return d.StatusCode
}
func (d *DeleteCollectionResponse) GetRawResponse() *http.Response {
if d == nil {
return nil
}
return d.RawResponse
}

View File

@@ -0,0 +1,292 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/components"
"net/http"
)
type DeleteCollectionItemGlobals struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
}
func (d DeleteCollectionItemGlobals) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(d, "", false)
}
func (d *DeleteCollectionItemGlobals) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &d, "", false, nil); err != nil {
return err
}
return nil
}
func (d *DeleteCollectionItemGlobals) GetAccepts() *components.Accepts {
if d == nil {
return nil
}
return d.Accepts
}
func (d *DeleteCollectionItemGlobals) GetClientIdentifier() *string {
if d == nil {
return nil
}
return d.ClientIdentifier
}
func (d *DeleteCollectionItemGlobals) GetProduct() *string {
if d == nil {
return nil
}
return d.Product
}
func (d *DeleteCollectionItemGlobals) GetVersion() *string {
if d == nil {
return nil
}
return d.Version
}
func (d *DeleteCollectionItemGlobals) GetPlatform() *string {
if d == nil {
return nil
}
return d.Platform
}
func (d *DeleteCollectionItemGlobals) GetPlatformVersion() *string {
if d == nil {
return nil
}
return d.PlatformVersion
}
func (d *DeleteCollectionItemGlobals) GetDevice() *string {
if d == nil {
return nil
}
return d.Device
}
func (d *DeleteCollectionItemGlobals) GetModel() *string {
if d == nil {
return nil
}
return d.Model
}
func (d *DeleteCollectionItemGlobals) GetDeviceVendor() *string {
if d == nil {
return nil
}
return d.DeviceVendor
}
func (d *DeleteCollectionItemGlobals) GetDeviceName() *string {
if d == nil {
return nil
}
return d.DeviceName
}
func (d *DeleteCollectionItemGlobals) GetMarketplace() *string {
if d == nil {
return nil
}
return d.Marketplace
}
type DeleteCollectionItemRequest struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
// The collection id
CollectionID int64 `pathParam:"style=simple,explode=false,name=collectionId"`
// The item to delete
ItemID int64 `pathParam:"style=simple,explode=false,name=itemId"`
}
func (d DeleteCollectionItemRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(d, "", false)
}
func (d *DeleteCollectionItemRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &d, "", false, []string{"collectionId", "itemId"}); err != nil {
return err
}
return nil
}
func (d *DeleteCollectionItemRequest) GetAccepts() *components.Accepts {
if d == nil {
return nil
}
return d.Accepts
}
func (d *DeleteCollectionItemRequest) GetClientIdentifier() *string {
if d == nil {
return nil
}
return d.ClientIdentifier
}
func (d *DeleteCollectionItemRequest) GetProduct() *string {
if d == nil {
return nil
}
return d.Product
}
func (d *DeleteCollectionItemRequest) GetVersion() *string {
if d == nil {
return nil
}
return d.Version
}
func (d *DeleteCollectionItemRequest) GetPlatform() *string {
if d == nil {
return nil
}
return d.Platform
}
func (d *DeleteCollectionItemRequest) GetPlatformVersion() *string {
if d == nil {
return nil
}
return d.PlatformVersion
}
func (d *DeleteCollectionItemRequest) GetDevice() *string {
if d == nil {
return nil
}
return d.Device
}
func (d *DeleteCollectionItemRequest) GetModel() *string {
if d == nil {
return nil
}
return d.Model
}
func (d *DeleteCollectionItemRequest) GetDeviceVendor() *string {
if d == nil {
return nil
}
return d.DeviceVendor
}
func (d *DeleteCollectionItemRequest) GetDeviceName() *string {
if d == nil {
return nil
}
return d.DeviceName
}
func (d *DeleteCollectionItemRequest) GetMarketplace() *string {
if d == nil {
return nil
}
return d.Marketplace
}
func (d *DeleteCollectionItemRequest) GetCollectionID() int64 {
if d == nil {
return 0
}
return d.CollectionID
}
func (d *DeleteCollectionItemRequest) GetItemID() int64 {
if d == nil {
return 0
}
return d.ItemID
}
type DeleteCollectionItemResponse 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
// OK
MediaContainerWithMetadata *components.MediaContainerWithMetadata
}
func (d *DeleteCollectionItemResponse) GetContentType() string {
if d == nil {
return ""
}
return d.ContentType
}
func (d *DeleteCollectionItemResponse) GetStatusCode() int {
if d == nil {
return 0
}
return d.StatusCode
}
func (d *DeleteCollectionItemResponse) GetRawResponse() *http.Response {
if d == nil {
return nil
}
return d.RawResponse
}
func (d *DeleteCollectionItemResponse) GetMediaContainerWithMetadata() *components.MediaContainerWithMetadata {
if d == nil {
return nil
}
return d.MediaContainerWithMetadata
}

View File

@@ -0,0 +1,283 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/components"
"net/http"
)
type DeleteCustomHubGlobals struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
}
func (d DeleteCustomHubGlobals) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(d, "", false)
}
func (d *DeleteCustomHubGlobals) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &d, "", false, nil); err != nil {
return err
}
return nil
}
func (d *DeleteCustomHubGlobals) GetAccepts() *components.Accepts {
if d == nil {
return nil
}
return d.Accepts
}
func (d *DeleteCustomHubGlobals) GetClientIdentifier() *string {
if d == nil {
return nil
}
return d.ClientIdentifier
}
func (d *DeleteCustomHubGlobals) GetProduct() *string {
if d == nil {
return nil
}
return d.Product
}
func (d *DeleteCustomHubGlobals) GetVersion() *string {
if d == nil {
return nil
}
return d.Version
}
func (d *DeleteCustomHubGlobals) GetPlatform() *string {
if d == nil {
return nil
}
return d.Platform
}
func (d *DeleteCustomHubGlobals) GetPlatformVersion() *string {
if d == nil {
return nil
}
return d.PlatformVersion
}
func (d *DeleteCustomHubGlobals) GetDevice() *string {
if d == nil {
return nil
}
return d.Device
}
func (d *DeleteCustomHubGlobals) GetModel() *string {
if d == nil {
return nil
}
return d.Model
}
func (d *DeleteCustomHubGlobals) GetDeviceVendor() *string {
if d == nil {
return nil
}
return d.DeviceVendor
}
func (d *DeleteCustomHubGlobals) GetDeviceName() *string {
if d == nil {
return nil
}
return d.DeviceName
}
func (d *DeleteCustomHubGlobals) GetMarketplace() *string {
if d == nil {
return nil
}
return d.Marketplace
}
type DeleteCustomHubRequest struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
// The section ID for the hubs to change
SectionID int64 `pathParam:"style=simple,explode=false,name=sectionId"`
// The identifier of the hub to change
Identifier string `pathParam:"style=simple,explode=false,name=identifier"`
}
func (d DeleteCustomHubRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(d, "", false)
}
func (d *DeleteCustomHubRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &d, "", false, []string{"sectionId", "identifier"}); err != nil {
return err
}
return nil
}
func (d *DeleteCustomHubRequest) GetAccepts() *components.Accepts {
if d == nil {
return nil
}
return d.Accepts
}
func (d *DeleteCustomHubRequest) GetClientIdentifier() *string {
if d == nil {
return nil
}
return d.ClientIdentifier
}
func (d *DeleteCustomHubRequest) GetProduct() *string {
if d == nil {
return nil
}
return d.Product
}
func (d *DeleteCustomHubRequest) GetVersion() *string {
if d == nil {
return nil
}
return d.Version
}
func (d *DeleteCustomHubRequest) GetPlatform() *string {
if d == nil {
return nil
}
return d.Platform
}
func (d *DeleteCustomHubRequest) GetPlatformVersion() *string {
if d == nil {
return nil
}
return d.PlatformVersion
}
func (d *DeleteCustomHubRequest) GetDevice() *string {
if d == nil {
return nil
}
return d.Device
}
func (d *DeleteCustomHubRequest) GetModel() *string {
if d == nil {
return nil
}
return d.Model
}
func (d *DeleteCustomHubRequest) GetDeviceVendor() *string {
if d == nil {
return nil
}
return d.DeviceVendor
}
func (d *DeleteCustomHubRequest) GetDeviceName() *string {
if d == nil {
return nil
}
return d.DeviceName
}
func (d *DeleteCustomHubRequest) GetMarketplace() *string {
if d == nil {
return nil
}
return d.Marketplace
}
func (d *DeleteCustomHubRequest) GetSectionID() int64 {
if d == nil {
return 0
}
return d.SectionID
}
func (d *DeleteCustomHubRequest) GetIdentifier() string {
if d == nil {
return ""
}
return d.Identifier
}
type DeleteCustomHubResponse 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
}
func (d *DeleteCustomHubResponse) GetContentType() string {
if d == nil {
return ""
}
return d.ContentType
}
func (d *DeleteCustomHubResponse) GetStatusCode() int {
if d == nil {
return 0
}
return d.StatusCode
}
func (d *DeleteCustomHubResponse) GetRawResponse() *http.Response {
if d == nil {
return nil
}
return d.RawResponse
}

View File

@@ -0,0 +1,274 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/components"
"net/http"
)
type DeleteDVRGlobals struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
}
func (d DeleteDVRGlobals) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(d, "", false)
}
func (d *DeleteDVRGlobals) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &d, "", false, nil); err != nil {
return err
}
return nil
}
func (d *DeleteDVRGlobals) GetAccepts() *components.Accepts {
if d == nil {
return nil
}
return d.Accepts
}
func (d *DeleteDVRGlobals) GetClientIdentifier() *string {
if d == nil {
return nil
}
return d.ClientIdentifier
}
func (d *DeleteDVRGlobals) GetProduct() *string {
if d == nil {
return nil
}
return d.Product
}
func (d *DeleteDVRGlobals) GetVersion() *string {
if d == nil {
return nil
}
return d.Version
}
func (d *DeleteDVRGlobals) GetPlatform() *string {
if d == nil {
return nil
}
return d.Platform
}
func (d *DeleteDVRGlobals) GetPlatformVersion() *string {
if d == nil {
return nil
}
return d.PlatformVersion
}
func (d *DeleteDVRGlobals) GetDevice() *string {
if d == nil {
return nil
}
return d.Device
}
func (d *DeleteDVRGlobals) GetModel() *string {
if d == nil {
return nil
}
return d.Model
}
func (d *DeleteDVRGlobals) GetDeviceVendor() *string {
if d == nil {
return nil
}
return d.DeviceVendor
}
func (d *DeleteDVRGlobals) GetDeviceName() *string {
if d == nil {
return nil
}
return d.DeviceName
}
func (d *DeleteDVRGlobals) GetMarketplace() *string {
if d == nil {
return nil
}
return d.Marketplace
}
type DeleteDVRRequest struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
// The ID of the DVR.
DvrID int64 `pathParam:"style=simple,explode=false,name=dvrId"`
}
func (d DeleteDVRRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(d, "", false)
}
func (d *DeleteDVRRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &d, "", false, []string{"dvrId"}); err != nil {
return err
}
return nil
}
func (d *DeleteDVRRequest) GetAccepts() *components.Accepts {
if d == nil {
return nil
}
return d.Accepts
}
func (d *DeleteDVRRequest) GetClientIdentifier() *string {
if d == nil {
return nil
}
return d.ClientIdentifier
}
func (d *DeleteDVRRequest) GetProduct() *string {
if d == nil {
return nil
}
return d.Product
}
func (d *DeleteDVRRequest) GetVersion() *string {
if d == nil {
return nil
}
return d.Version
}
func (d *DeleteDVRRequest) GetPlatform() *string {
if d == nil {
return nil
}
return d.Platform
}
func (d *DeleteDVRRequest) GetPlatformVersion() *string {
if d == nil {
return nil
}
return d.PlatformVersion
}
func (d *DeleteDVRRequest) GetDevice() *string {
if d == nil {
return nil
}
return d.Device
}
func (d *DeleteDVRRequest) GetModel() *string {
if d == nil {
return nil
}
return d.Model
}
func (d *DeleteDVRRequest) GetDeviceVendor() *string {
if d == nil {
return nil
}
return d.DeviceVendor
}
func (d *DeleteDVRRequest) GetDeviceName() *string {
if d == nil {
return nil
}
return d.DeviceName
}
func (d *DeleteDVRRequest) GetMarketplace() *string {
if d == nil {
return nil
}
return d.Marketplace
}
func (d *DeleteDVRRequest) GetDvrID() int64 {
if d == nil {
return 0
}
return d.DvrID
}
type DeleteDVRResponse 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
}
func (d *DeleteDVRResponse) GetContentType() string {
if d == nil {
return ""
}
return d.ContentType
}
func (d *DeleteDVRResponse) GetStatusCode() int {
if d == nil {
return 0
}
return d.StatusCode
}
func (d *DeleteDVRResponse) GetRawResponse() *http.Response {
if d == nil {
return nil
}
return d.RawResponse
}

View File

@@ -0,0 +1,291 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/components"
"net/http"
)
type DeleteHistoryGlobals struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
}
func (d DeleteHistoryGlobals) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(d, "", false)
}
func (d *DeleteHistoryGlobals) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &d, "", false, nil); err != nil {
return err
}
return nil
}
func (d *DeleteHistoryGlobals) GetAccepts() *components.Accepts {
if d == nil {
return nil
}
return d.Accepts
}
func (d *DeleteHistoryGlobals) GetClientIdentifier() *string {
if d == nil {
return nil
}
return d.ClientIdentifier
}
func (d *DeleteHistoryGlobals) GetProduct() *string {
if d == nil {
return nil
}
return d.Product
}
func (d *DeleteHistoryGlobals) GetVersion() *string {
if d == nil {
return nil
}
return d.Version
}
func (d *DeleteHistoryGlobals) GetPlatform() *string {
if d == nil {
return nil
}
return d.Platform
}
func (d *DeleteHistoryGlobals) GetPlatformVersion() *string {
if d == nil {
return nil
}
return d.PlatformVersion
}
func (d *DeleteHistoryGlobals) GetDevice() *string {
if d == nil {
return nil
}
return d.Device
}
func (d *DeleteHistoryGlobals) GetModel() *string {
if d == nil {
return nil
}
return d.Model
}
func (d *DeleteHistoryGlobals) GetDeviceVendor() *string {
if d == nil {
return nil
}
return d.DeviceVendor
}
func (d *DeleteHistoryGlobals) GetDeviceName() *string {
if d == nil {
return nil
}
return d.DeviceName
}
func (d *DeleteHistoryGlobals) GetMarketplace() *string {
if d == nil {
return nil
}
return d.Marketplace
}
type DeleteHistoryRequest struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
// The id of the history item (the `historyKey` from above)
HistoryID int64 `pathParam:"style=simple,explode=false,name=historyId"`
}
func (d DeleteHistoryRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(d, "", false)
}
func (d *DeleteHistoryRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &d, "", false, []string{"historyId"}); err != nil {
return err
}
return nil
}
func (d *DeleteHistoryRequest) GetAccepts() *components.Accepts {
if d == nil {
return nil
}
return d.Accepts
}
func (d *DeleteHistoryRequest) GetClientIdentifier() *string {
if d == nil {
return nil
}
return d.ClientIdentifier
}
func (d *DeleteHistoryRequest) GetProduct() *string {
if d == nil {
return nil
}
return d.Product
}
func (d *DeleteHistoryRequest) GetVersion() *string {
if d == nil {
return nil
}
return d.Version
}
func (d *DeleteHistoryRequest) GetPlatform() *string {
if d == nil {
return nil
}
return d.Platform
}
func (d *DeleteHistoryRequest) GetPlatformVersion() *string {
if d == nil {
return nil
}
return d.PlatformVersion
}
func (d *DeleteHistoryRequest) GetDevice() *string {
if d == nil {
return nil
}
return d.Device
}
func (d *DeleteHistoryRequest) GetModel() *string {
if d == nil {
return nil
}
return d.Model
}
func (d *DeleteHistoryRequest) GetDeviceVendor() *string {
if d == nil {
return nil
}
return d.DeviceVendor
}
func (d *DeleteHistoryRequest) GetDeviceName() *string {
if d == nil {
return nil
}
return d.DeviceName
}
func (d *DeleteHistoryRequest) GetMarketplace() *string {
if d == nil {
return nil
}
return d.Marketplace
}
func (d *DeleteHistoryRequest) GetHistoryID() int64 {
if d == nil {
return 0
}
return d.HistoryID
}
type DeleteHistoryResponse 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
// OK
MediaContainer *components.MediaContainer
Headers map[string][]string
}
func (d *DeleteHistoryResponse) GetContentType() string {
if d == nil {
return ""
}
return d.ContentType
}
func (d *DeleteHistoryResponse) GetStatusCode() int {
if d == nil {
return 0
}
return d.StatusCode
}
func (d *DeleteHistoryResponse) GetRawResponse() *http.Response {
if d == nil {
return nil
}
return d.RawResponse
}
func (d *DeleteHistoryResponse) GetMediaContainer() *components.MediaContainer {
if d == nil {
return nil
}
return d.MediaContainer
}
func (d *DeleteHistoryResponse) GetHeaders() map[string][]string {
if d == nil {
return map[string][]string{}
}
return d.Headers
}

View File

@@ -0,0 +1,274 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/components"
"net/http"
)
type DeleteIndexesGlobals struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
}
func (d DeleteIndexesGlobals) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(d, "", false)
}
func (d *DeleteIndexesGlobals) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &d, "", false, nil); err != nil {
return err
}
return nil
}
func (d *DeleteIndexesGlobals) GetAccepts() *components.Accepts {
if d == nil {
return nil
}
return d.Accepts
}
func (d *DeleteIndexesGlobals) GetClientIdentifier() *string {
if d == nil {
return nil
}
return d.ClientIdentifier
}
func (d *DeleteIndexesGlobals) GetProduct() *string {
if d == nil {
return nil
}
return d.Product
}
func (d *DeleteIndexesGlobals) GetVersion() *string {
if d == nil {
return nil
}
return d.Version
}
func (d *DeleteIndexesGlobals) GetPlatform() *string {
if d == nil {
return nil
}
return d.Platform
}
func (d *DeleteIndexesGlobals) GetPlatformVersion() *string {
if d == nil {
return nil
}
return d.PlatformVersion
}
func (d *DeleteIndexesGlobals) GetDevice() *string {
if d == nil {
return nil
}
return d.Device
}
func (d *DeleteIndexesGlobals) GetModel() *string {
if d == nil {
return nil
}
return d.Model
}
func (d *DeleteIndexesGlobals) GetDeviceVendor() *string {
if d == nil {
return nil
}
return d.DeviceVendor
}
func (d *DeleteIndexesGlobals) GetDeviceName() *string {
if d == nil {
return nil
}
return d.DeviceName
}
func (d *DeleteIndexesGlobals) GetMarketplace() *string {
if d == nil {
return nil
}
return d.Marketplace
}
type DeleteIndexesRequest struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
// Section identifier
SectionID int64 `pathParam:"style=simple,explode=false,name=sectionId"`
}
func (d DeleteIndexesRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(d, "", false)
}
func (d *DeleteIndexesRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &d, "", false, []string{"sectionId"}); err != nil {
return err
}
return nil
}
func (d *DeleteIndexesRequest) GetAccepts() *components.Accepts {
if d == nil {
return nil
}
return d.Accepts
}
func (d *DeleteIndexesRequest) GetClientIdentifier() *string {
if d == nil {
return nil
}
return d.ClientIdentifier
}
func (d *DeleteIndexesRequest) GetProduct() *string {
if d == nil {
return nil
}
return d.Product
}
func (d *DeleteIndexesRequest) GetVersion() *string {
if d == nil {
return nil
}
return d.Version
}
func (d *DeleteIndexesRequest) GetPlatform() *string {
if d == nil {
return nil
}
return d.Platform
}
func (d *DeleteIndexesRequest) GetPlatformVersion() *string {
if d == nil {
return nil
}
return d.PlatformVersion
}
func (d *DeleteIndexesRequest) GetDevice() *string {
if d == nil {
return nil
}
return d.Device
}
func (d *DeleteIndexesRequest) GetModel() *string {
if d == nil {
return nil
}
return d.Model
}
func (d *DeleteIndexesRequest) GetDeviceVendor() *string {
if d == nil {
return nil
}
return d.DeviceVendor
}
func (d *DeleteIndexesRequest) GetDeviceName() *string {
if d == nil {
return nil
}
return d.DeviceName
}
func (d *DeleteIndexesRequest) GetMarketplace() *string {
if d == nil {
return nil
}
return d.Marketplace
}
func (d *DeleteIndexesRequest) GetSectionID() int64 {
if d == nil {
return 0
}
return d.SectionID
}
type DeleteIndexesResponse 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
}
func (d *DeleteIndexesResponse) GetContentType() string {
if d == nil {
return ""
}
return d.ContentType
}
func (d *DeleteIndexesResponse) GetStatusCode() int {
if d == nil {
return 0
}
return d.StatusCode
}
func (d *DeleteIndexesResponse) GetRawResponse() *http.Response {
if d == nil {
return nil
}
return d.RawResponse
}

View File

@@ -0,0 +1,274 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/components"
"net/http"
)
type DeleteIntrosGlobals struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
}
func (d DeleteIntrosGlobals) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(d, "", false)
}
func (d *DeleteIntrosGlobals) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &d, "", false, nil); err != nil {
return err
}
return nil
}
func (d *DeleteIntrosGlobals) GetAccepts() *components.Accepts {
if d == nil {
return nil
}
return d.Accepts
}
func (d *DeleteIntrosGlobals) GetClientIdentifier() *string {
if d == nil {
return nil
}
return d.ClientIdentifier
}
func (d *DeleteIntrosGlobals) GetProduct() *string {
if d == nil {
return nil
}
return d.Product
}
func (d *DeleteIntrosGlobals) GetVersion() *string {
if d == nil {
return nil
}
return d.Version
}
func (d *DeleteIntrosGlobals) GetPlatform() *string {
if d == nil {
return nil
}
return d.Platform
}
func (d *DeleteIntrosGlobals) GetPlatformVersion() *string {
if d == nil {
return nil
}
return d.PlatformVersion
}
func (d *DeleteIntrosGlobals) GetDevice() *string {
if d == nil {
return nil
}
return d.Device
}
func (d *DeleteIntrosGlobals) GetModel() *string {
if d == nil {
return nil
}
return d.Model
}
func (d *DeleteIntrosGlobals) GetDeviceVendor() *string {
if d == nil {
return nil
}
return d.DeviceVendor
}
func (d *DeleteIntrosGlobals) GetDeviceName() *string {
if d == nil {
return nil
}
return d.DeviceName
}
func (d *DeleteIntrosGlobals) GetMarketplace() *string {
if d == nil {
return nil
}
return d.Marketplace
}
type DeleteIntrosRequest struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
// Section identifier
SectionID int64 `pathParam:"style=simple,explode=false,name=sectionId"`
}
func (d DeleteIntrosRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(d, "", false)
}
func (d *DeleteIntrosRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &d, "", false, []string{"sectionId"}); err != nil {
return err
}
return nil
}
func (d *DeleteIntrosRequest) GetAccepts() *components.Accepts {
if d == nil {
return nil
}
return d.Accepts
}
func (d *DeleteIntrosRequest) GetClientIdentifier() *string {
if d == nil {
return nil
}
return d.ClientIdentifier
}
func (d *DeleteIntrosRequest) GetProduct() *string {
if d == nil {
return nil
}
return d.Product
}
func (d *DeleteIntrosRequest) GetVersion() *string {
if d == nil {
return nil
}
return d.Version
}
func (d *DeleteIntrosRequest) GetPlatform() *string {
if d == nil {
return nil
}
return d.Platform
}
func (d *DeleteIntrosRequest) GetPlatformVersion() *string {
if d == nil {
return nil
}
return d.PlatformVersion
}
func (d *DeleteIntrosRequest) GetDevice() *string {
if d == nil {
return nil
}
return d.Device
}
func (d *DeleteIntrosRequest) GetModel() *string {
if d == nil {
return nil
}
return d.Model
}
func (d *DeleteIntrosRequest) GetDeviceVendor() *string {
if d == nil {
return nil
}
return d.DeviceVendor
}
func (d *DeleteIntrosRequest) GetDeviceName() *string {
if d == nil {
return nil
}
return d.DeviceName
}
func (d *DeleteIntrosRequest) GetMarketplace() *string {
if d == nil {
return nil
}
return d.Marketplace
}
func (d *DeleteIntrosRequest) GetSectionID() int64 {
if d == nil {
return 0
}
return d.SectionID
}
type DeleteIntrosResponse 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
}
func (d *DeleteIntrosResponse) GetContentType() string {
if d == nil {
return ""
}
return d.ContentType
}
func (d *DeleteIntrosResponse) GetStatusCode() int {
if d == nil {
return 0
}
return d.StatusCode
}
func (d *DeleteIntrosResponse) GetRawResponse() *http.Response {
if d == nil {
return nil
}
return d.RawResponse
}

View File

@@ -0,0 +1,283 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/components"
"net/http"
)
type DeleteLibrarySectionGlobals struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
}
func (d DeleteLibrarySectionGlobals) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(d, "", false)
}
func (d *DeleteLibrarySectionGlobals) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &d, "", false, nil); err != nil {
return err
}
return nil
}
func (d *DeleteLibrarySectionGlobals) GetAccepts() *components.Accepts {
if d == nil {
return nil
}
return d.Accepts
}
func (d *DeleteLibrarySectionGlobals) GetClientIdentifier() *string {
if d == nil {
return nil
}
return d.ClientIdentifier
}
func (d *DeleteLibrarySectionGlobals) GetProduct() *string {
if d == nil {
return nil
}
return d.Product
}
func (d *DeleteLibrarySectionGlobals) GetVersion() *string {
if d == nil {
return nil
}
return d.Version
}
func (d *DeleteLibrarySectionGlobals) GetPlatform() *string {
if d == nil {
return nil
}
return d.Platform
}
func (d *DeleteLibrarySectionGlobals) GetPlatformVersion() *string {
if d == nil {
return nil
}
return d.PlatformVersion
}
func (d *DeleteLibrarySectionGlobals) GetDevice() *string {
if d == nil {
return nil
}
return d.Device
}
func (d *DeleteLibrarySectionGlobals) GetModel() *string {
if d == nil {
return nil
}
return d.Model
}
func (d *DeleteLibrarySectionGlobals) GetDeviceVendor() *string {
if d == nil {
return nil
}
return d.DeviceVendor
}
func (d *DeleteLibrarySectionGlobals) GetDeviceName() *string {
if d == nil {
return nil
}
return d.DeviceName
}
func (d *DeleteLibrarySectionGlobals) GetMarketplace() *string {
if d == nil {
return nil
}
return d.Marketplace
}
type DeleteLibrarySectionRequest struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
// The section identifier
SectionID string `pathParam:"style=simple,explode=false,name=sectionId"`
// If set, response will return an activity with the actual deletion process. Otherwise request will return when deletion is complete
Async *components.BoolInt `queryParam:"style=form,explode=true,name=async"`
}
func (d DeleteLibrarySectionRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(d, "", false)
}
func (d *DeleteLibrarySectionRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &d, "", false, []string{"sectionId"}); err != nil {
return err
}
return nil
}
func (d *DeleteLibrarySectionRequest) GetAccepts() *components.Accepts {
if d == nil {
return nil
}
return d.Accepts
}
func (d *DeleteLibrarySectionRequest) GetClientIdentifier() *string {
if d == nil {
return nil
}
return d.ClientIdentifier
}
func (d *DeleteLibrarySectionRequest) GetProduct() *string {
if d == nil {
return nil
}
return d.Product
}
func (d *DeleteLibrarySectionRequest) GetVersion() *string {
if d == nil {
return nil
}
return d.Version
}
func (d *DeleteLibrarySectionRequest) GetPlatform() *string {
if d == nil {
return nil
}
return d.Platform
}
func (d *DeleteLibrarySectionRequest) GetPlatformVersion() *string {
if d == nil {
return nil
}
return d.PlatformVersion
}
func (d *DeleteLibrarySectionRequest) GetDevice() *string {
if d == nil {
return nil
}
return d.Device
}
func (d *DeleteLibrarySectionRequest) GetModel() *string {
if d == nil {
return nil
}
return d.Model
}
func (d *DeleteLibrarySectionRequest) GetDeviceVendor() *string {
if d == nil {
return nil
}
return d.DeviceVendor
}
func (d *DeleteLibrarySectionRequest) GetDeviceName() *string {
if d == nil {
return nil
}
return d.DeviceName
}
func (d *DeleteLibrarySectionRequest) GetMarketplace() *string {
if d == nil {
return nil
}
return d.Marketplace
}
func (d *DeleteLibrarySectionRequest) GetSectionID() string {
if d == nil {
return ""
}
return d.SectionID
}
func (d *DeleteLibrarySectionRequest) GetAsync() *components.BoolInt {
if d == nil {
return nil
}
return d.Async
}
type DeleteLibrarySectionResponse 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
}
func (d *DeleteLibrarySectionResponse) GetContentType() string {
if d == nil {
return ""
}
return d.ContentType
}
func (d *DeleteLibrarySectionResponse) GetStatusCode() int {
if d == nil {
return 0
}
return d.StatusCode
}
func (d *DeleteLibrarySectionResponse) GetRawResponse() *http.Response {
if d == nil {
return nil
}
return d.RawResponse
}

View File

@@ -0,0 +1,425 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/components"
"net/http"
)
type DeleteLineupGlobals struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
}
func (d DeleteLineupGlobals) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(d, "", false)
}
func (d *DeleteLineupGlobals) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &d, "", false, nil); err != nil {
return err
}
return nil
}
func (d *DeleteLineupGlobals) GetAccepts() *components.Accepts {
if d == nil {
return nil
}
return d.Accepts
}
func (d *DeleteLineupGlobals) GetClientIdentifier() *string {
if d == nil {
return nil
}
return d.ClientIdentifier
}
func (d *DeleteLineupGlobals) GetProduct() *string {
if d == nil {
return nil
}
return d.Product
}
func (d *DeleteLineupGlobals) GetVersion() *string {
if d == nil {
return nil
}
return d.Version
}
func (d *DeleteLineupGlobals) GetPlatform() *string {
if d == nil {
return nil
}
return d.Platform
}
func (d *DeleteLineupGlobals) GetPlatformVersion() *string {
if d == nil {
return nil
}
return d.PlatformVersion
}
func (d *DeleteLineupGlobals) GetDevice() *string {
if d == nil {
return nil
}
return d.Device
}
func (d *DeleteLineupGlobals) GetModel() *string {
if d == nil {
return nil
}
return d.Model
}
func (d *DeleteLineupGlobals) GetDeviceVendor() *string {
if d == nil {
return nil
}
return d.DeviceVendor
}
func (d *DeleteLineupGlobals) GetDeviceName() *string {
if d == nil {
return nil
}
return d.DeviceName
}
func (d *DeleteLineupGlobals) GetMarketplace() *string {
if d == nil {
return nil
}
return d.Marketplace
}
type DeleteLineupRequest struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
// The ID of the DVR.
DvrID int64 `pathParam:"style=simple,explode=false,name=dvrId"`
// The lineup to delete
Lineup string `queryParam:"style=form,explode=true,name=lineup"`
}
func (d DeleteLineupRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(d, "", false)
}
func (d *DeleteLineupRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &d, "", false, []string{"dvrId", "lineup"}); err != nil {
return err
}
return nil
}
func (d *DeleteLineupRequest) GetAccepts() *components.Accepts {
if d == nil {
return nil
}
return d.Accepts
}
func (d *DeleteLineupRequest) GetClientIdentifier() *string {
if d == nil {
return nil
}
return d.ClientIdentifier
}
func (d *DeleteLineupRequest) GetProduct() *string {
if d == nil {
return nil
}
return d.Product
}
func (d *DeleteLineupRequest) GetVersion() *string {
if d == nil {
return nil
}
return d.Version
}
func (d *DeleteLineupRequest) GetPlatform() *string {
if d == nil {
return nil
}
return d.Platform
}
func (d *DeleteLineupRequest) GetPlatformVersion() *string {
if d == nil {
return nil
}
return d.PlatformVersion
}
func (d *DeleteLineupRequest) GetDevice() *string {
if d == nil {
return nil
}
return d.Device
}
func (d *DeleteLineupRequest) GetModel() *string {
if d == nil {
return nil
}
return d.Model
}
func (d *DeleteLineupRequest) GetDeviceVendor() *string {
if d == nil {
return nil
}
return d.DeviceVendor
}
func (d *DeleteLineupRequest) GetDeviceName() *string {
if d == nil {
return nil
}
return d.DeviceName
}
func (d *DeleteLineupRequest) GetMarketplace() *string {
if d == nil {
return nil
}
return d.Marketplace
}
func (d *DeleteLineupRequest) GetDvrID() int64 {
if d == nil {
return 0
}
return d.DvrID
}
func (d *DeleteLineupRequest) GetLineup() string {
if d == nil {
return ""
}
return d.Lineup
}
// DeleteLineupDVRsMediaContainer - `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
// Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
// The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
type DeleteLineupDVRsMediaContainer struct {
Identifier *string `json:"identifier,omitempty"`
// The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
//
Offset *int64 `json:"offset,omitempty"`
Size *int64 `json:"size,omitempty"`
// The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
//
TotalSize *int64 `json:"totalSize,omitempty"`
// A status indicator. If present and non-zero, indicates an error
Status *int64 `json:"status,omitempty"`
}
func (d *DeleteLineupDVRsMediaContainer) GetIdentifier() *string {
if d == nil {
return nil
}
return d.Identifier
}
func (d *DeleteLineupDVRsMediaContainer) GetOffset() *int64 {
if d == nil {
return nil
}
return d.Offset
}
func (d *DeleteLineupDVRsMediaContainer) GetSize() *int64 {
if d == nil {
return nil
}
return d.Size
}
func (d *DeleteLineupDVRsMediaContainer) GetTotalSize() *int64 {
if d == nil {
return nil
}
return d.TotalSize
}
func (d *DeleteLineupDVRsMediaContainer) GetStatus() *int64 {
if d == nil {
return nil
}
return d.Status
}
type DeleteLineupDVR struct {
Device []components.Device `json:"Device,omitempty"`
Key *string `json:"key,omitempty"`
Language *string `json:"language,omitempty"`
Lineup *string `json:"lineup,omitempty"`
UUID *string `json:"uuid,omitempty"`
}
func (d *DeleteLineupDVR) GetDevice() []components.Device {
if d == nil {
return nil
}
return d.Device
}
func (d *DeleteLineupDVR) GetKey() *string {
if d == nil {
return nil
}
return d.Key
}
func (d *DeleteLineupDVR) GetLanguage() *string {
if d == nil {
return nil
}
return d.Language
}
func (d *DeleteLineupDVR) GetLineup() *string {
if d == nil {
return nil
}
return d.Lineup
}
func (d *DeleteLineupDVR) GetUUID() *string {
if d == nil {
return nil
}
return d.UUID
}
type DeleteLineupMediaContainer struct {
MediaContainer *DeleteLineupDVRsMediaContainer `json:"MediaContainer,omitempty"`
Dvr []DeleteLineupDVR `json:"DVR,omitempty"`
}
func (d *DeleteLineupMediaContainer) GetMediaContainer() *DeleteLineupDVRsMediaContainer {
if d == nil {
return nil
}
return d.MediaContainer
}
func (d *DeleteLineupMediaContainer) GetDvr() []DeleteLineupDVR {
if d == nil {
return nil
}
return d.Dvr
}
// DeleteLineupResponseBody - OK
type DeleteLineupResponseBody struct {
MediaContainer *DeleteLineupMediaContainer `json:"MediaContainer,omitempty"`
}
func (d *DeleteLineupResponseBody) GetMediaContainer() *DeleteLineupMediaContainer {
if d == nil {
return nil
}
return d.MediaContainer
}
type DeleteLineupResponse 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
// OK
Object *DeleteLineupResponseBody
Headers map[string][]string
}
func (d *DeleteLineupResponse) GetContentType() string {
if d == nil {
return ""
}
return d.ContentType
}
func (d *DeleteLineupResponse) GetStatusCode() int {
if d == nil {
return 0
}
return d.StatusCode
}
func (d *DeleteLineupResponse) GetRawResponse() *http.Response {
if d == nil {
return nil
}
return d.RawResponse
}
func (d *DeleteLineupResponse) GetObject() *DeleteLineupResponseBody {
if d == nil {
return nil
}
return d.Object
}
func (d *DeleteLineupResponse) GetHeaders() map[string][]string {
if d == nil {
return map[string][]string{}
}
return d.Headers
}

View File

@@ -0,0 +1,281 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/components"
"net/http"
)
type DeleteMarkerGlobals struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
}
func (d DeleteMarkerGlobals) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(d, "", false)
}
func (d *DeleteMarkerGlobals) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &d, "", false, nil); err != nil {
return err
}
return nil
}
func (d *DeleteMarkerGlobals) GetAccepts() *components.Accepts {
if d == nil {
return nil
}
return d.Accepts
}
func (d *DeleteMarkerGlobals) GetClientIdentifier() *string {
if d == nil {
return nil
}
return d.ClientIdentifier
}
func (d *DeleteMarkerGlobals) GetProduct() *string {
if d == nil {
return nil
}
return d.Product
}
func (d *DeleteMarkerGlobals) GetVersion() *string {
if d == nil {
return nil
}
return d.Version
}
func (d *DeleteMarkerGlobals) GetPlatform() *string {
if d == nil {
return nil
}
return d.Platform
}
func (d *DeleteMarkerGlobals) GetPlatformVersion() *string {
if d == nil {
return nil
}
return d.PlatformVersion
}
func (d *DeleteMarkerGlobals) GetDevice() *string {
if d == nil {
return nil
}
return d.Device
}
func (d *DeleteMarkerGlobals) GetModel() *string {
if d == nil {
return nil
}
return d.Model
}
func (d *DeleteMarkerGlobals) GetDeviceVendor() *string {
if d == nil {
return nil
}
return d.DeviceVendor
}
func (d *DeleteMarkerGlobals) GetDeviceName() *string {
if d == nil {
return nil
}
return d.DeviceName
}
func (d *DeleteMarkerGlobals) GetMarketplace() *string {
if d == nil {
return nil
}
return d.Marketplace
}
type DeleteMarkerRequest struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
Ids string `pathParam:"style=simple,explode=false,name=ids"`
Marker string `pathParam:"style=simple,explode=false,name=marker"`
}
func (d DeleteMarkerRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(d, "", false)
}
func (d *DeleteMarkerRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &d, "", false, []string{"ids", "marker"}); err != nil {
return err
}
return nil
}
func (d *DeleteMarkerRequest) GetAccepts() *components.Accepts {
if d == nil {
return nil
}
return d.Accepts
}
func (d *DeleteMarkerRequest) GetClientIdentifier() *string {
if d == nil {
return nil
}
return d.ClientIdentifier
}
func (d *DeleteMarkerRequest) GetProduct() *string {
if d == nil {
return nil
}
return d.Product
}
func (d *DeleteMarkerRequest) GetVersion() *string {
if d == nil {
return nil
}
return d.Version
}
func (d *DeleteMarkerRequest) GetPlatform() *string {
if d == nil {
return nil
}
return d.Platform
}
func (d *DeleteMarkerRequest) GetPlatformVersion() *string {
if d == nil {
return nil
}
return d.PlatformVersion
}
func (d *DeleteMarkerRequest) GetDevice() *string {
if d == nil {
return nil
}
return d.Device
}
func (d *DeleteMarkerRequest) GetModel() *string {
if d == nil {
return nil
}
return d.Model
}
func (d *DeleteMarkerRequest) GetDeviceVendor() *string {
if d == nil {
return nil
}
return d.DeviceVendor
}
func (d *DeleteMarkerRequest) GetDeviceName() *string {
if d == nil {
return nil
}
return d.DeviceName
}
func (d *DeleteMarkerRequest) GetMarketplace() *string {
if d == nil {
return nil
}
return d.Marketplace
}
func (d *DeleteMarkerRequest) GetIds() string {
if d == nil {
return ""
}
return d.Ids
}
func (d *DeleteMarkerRequest) GetMarker() string {
if d == nil {
return ""
}
return d.Marker
}
type DeleteMarkerResponse 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
}
func (d *DeleteMarkerResponse) GetContentType() string {
if d == nil {
return ""
}
return d.ContentType
}
func (d *DeleteMarkerResponse) GetStatusCode() int {
if d == nil {
return 0
}
return d.StatusCode
}
func (d *DeleteMarkerResponse) GetRawResponse() *http.Response {
if d == nil {
return nil
}
return d.RawResponse
}

View File

@@ -0,0 +1,290 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/components"
"net/http"
)
type DeleteMediaItemGlobals struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
}
func (d DeleteMediaItemGlobals) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(d, "", false)
}
func (d *DeleteMediaItemGlobals) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &d, "", false, nil); err != nil {
return err
}
return nil
}
func (d *DeleteMediaItemGlobals) GetAccepts() *components.Accepts {
if d == nil {
return nil
}
return d.Accepts
}
func (d *DeleteMediaItemGlobals) GetClientIdentifier() *string {
if d == nil {
return nil
}
return d.ClientIdentifier
}
func (d *DeleteMediaItemGlobals) GetProduct() *string {
if d == nil {
return nil
}
return d.Product
}
func (d *DeleteMediaItemGlobals) GetVersion() *string {
if d == nil {
return nil
}
return d.Version
}
func (d *DeleteMediaItemGlobals) GetPlatform() *string {
if d == nil {
return nil
}
return d.Platform
}
func (d *DeleteMediaItemGlobals) GetPlatformVersion() *string {
if d == nil {
return nil
}
return d.PlatformVersion
}
func (d *DeleteMediaItemGlobals) GetDevice() *string {
if d == nil {
return nil
}
return d.Device
}
func (d *DeleteMediaItemGlobals) GetModel() *string {
if d == nil {
return nil
}
return d.Model
}
func (d *DeleteMediaItemGlobals) GetDeviceVendor() *string {
if d == nil {
return nil
}
return d.DeviceVendor
}
func (d *DeleteMediaItemGlobals) GetDeviceName() *string {
if d == nil {
return nil
}
return d.DeviceName
}
func (d *DeleteMediaItemGlobals) GetMarketplace() *string {
if d == nil {
return nil
}
return d.Marketplace
}
type DeleteMediaItemRequest struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
Ids string `pathParam:"style=simple,explode=false,name=ids"`
MediaItem string `pathParam:"style=simple,explode=false,name=mediaItem"`
// Whether proxy items, such as media optimized versions, should also be deleted. Defaults to false.
Proxy *components.BoolInt `queryParam:"style=form,explode=true,name=proxy"`
}
func (d DeleteMediaItemRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(d, "", false)
}
func (d *DeleteMediaItemRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &d, "", false, []string{"ids", "mediaItem"}); err != nil {
return err
}
return nil
}
func (d *DeleteMediaItemRequest) GetAccepts() *components.Accepts {
if d == nil {
return nil
}
return d.Accepts
}
func (d *DeleteMediaItemRequest) GetClientIdentifier() *string {
if d == nil {
return nil
}
return d.ClientIdentifier
}
func (d *DeleteMediaItemRequest) GetProduct() *string {
if d == nil {
return nil
}
return d.Product
}
func (d *DeleteMediaItemRequest) GetVersion() *string {
if d == nil {
return nil
}
return d.Version
}
func (d *DeleteMediaItemRequest) GetPlatform() *string {
if d == nil {
return nil
}
return d.Platform
}
func (d *DeleteMediaItemRequest) GetPlatformVersion() *string {
if d == nil {
return nil
}
return d.PlatformVersion
}
func (d *DeleteMediaItemRequest) GetDevice() *string {
if d == nil {
return nil
}
return d.Device
}
func (d *DeleteMediaItemRequest) GetModel() *string {
if d == nil {
return nil
}
return d.Model
}
func (d *DeleteMediaItemRequest) GetDeviceVendor() *string {
if d == nil {
return nil
}
return d.DeviceVendor
}
func (d *DeleteMediaItemRequest) GetDeviceName() *string {
if d == nil {
return nil
}
return d.DeviceName
}
func (d *DeleteMediaItemRequest) GetMarketplace() *string {
if d == nil {
return nil
}
return d.Marketplace
}
func (d *DeleteMediaItemRequest) GetIds() string {
if d == nil {
return ""
}
return d.Ids
}
func (d *DeleteMediaItemRequest) GetMediaItem() string {
if d == nil {
return ""
}
return d.MediaItem
}
func (d *DeleteMediaItemRequest) GetProxy() *components.BoolInt {
if d == nil {
return nil
}
return d.Proxy
}
type DeleteMediaItemResponse 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
}
func (d *DeleteMediaItemResponse) GetContentType() string {
if d == nil {
return ""
}
return d.ContentType
}
func (d *DeleteMediaItemResponse) GetStatusCode() int {
if d == nil {
return 0
}
return d.StatusCode
}
func (d *DeleteMediaItemResponse) GetRawResponse() *http.Response {
if d == nil {
return nil
}
return d.RawResponse
}

View File

@@ -0,0 +1,274 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/components"
"net/http"
)
type DeleteMediaProviderGlobals struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
}
func (d DeleteMediaProviderGlobals) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(d, "", false)
}
func (d *DeleteMediaProviderGlobals) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &d, "", false, nil); err != nil {
return err
}
return nil
}
func (d *DeleteMediaProviderGlobals) GetAccepts() *components.Accepts {
if d == nil {
return nil
}
return d.Accepts
}
func (d *DeleteMediaProviderGlobals) GetClientIdentifier() *string {
if d == nil {
return nil
}
return d.ClientIdentifier
}
func (d *DeleteMediaProviderGlobals) GetProduct() *string {
if d == nil {
return nil
}
return d.Product
}
func (d *DeleteMediaProviderGlobals) GetVersion() *string {
if d == nil {
return nil
}
return d.Version
}
func (d *DeleteMediaProviderGlobals) GetPlatform() *string {
if d == nil {
return nil
}
return d.Platform
}
func (d *DeleteMediaProviderGlobals) GetPlatformVersion() *string {
if d == nil {
return nil
}
return d.PlatformVersion
}
func (d *DeleteMediaProviderGlobals) GetDevice() *string {
if d == nil {
return nil
}
return d.Device
}
func (d *DeleteMediaProviderGlobals) GetModel() *string {
if d == nil {
return nil
}
return d.Model
}
func (d *DeleteMediaProviderGlobals) GetDeviceVendor() *string {
if d == nil {
return nil
}
return d.DeviceVendor
}
func (d *DeleteMediaProviderGlobals) GetDeviceName() *string {
if d == nil {
return nil
}
return d.DeviceName
}
func (d *DeleteMediaProviderGlobals) GetMarketplace() *string {
if d == nil {
return nil
}
return d.Marketplace
}
type DeleteMediaProviderRequest struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
// The ID of the media provider to delete
Provider string `pathParam:"style=simple,explode=false,name=provider"`
}
func (d DeleteMediaProviderRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(d, "", false)
}
func (d *DeleteMediaProviderRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &d, "", false, []string{"provider"}); err != nil {
return err
}
return nil
}
func (d *DeleteMediaProviderRequest) GetAccepts() *components.Accepts {
if d == nil {
return nil
}
return d.Accepts
}
func (d *DeleteMediaProviderRequest) GetClientIdentifier() *string {
if d == nil {
return nil
}
return d.ClientIdentifier
}
func (d *DeleteMediaProviderRequest) GetProduct() *string {
if d == nil {
return nil
}
return d.Product
}
func (d *DeleteMediaProviderRequest) GetVersion() *string {
if d == nil {
return nil
}
return d.Version
}
func (d *DeleteMediaProviderRequest) GetPlatform() *string {
if d == nil {
return nil
}
return d.Platform
}
func (d *DeleteMediaProviderRequest) GetPlatformVersion() *string {
if d == nil {
return nil
}
return d.PlatformVersion
}
func (d *DeleteMediaProviderRequest) GetDevice() *string {
if d == nil {
return nil
}
return d.Device
}
func (d *DeleteMediaProviderRequest) GetModel() *string {
if d == nil {
return nil
}
return d.Model
}
func (d *DeleteMediaProviderRequest) GetDeviceVendor() *string {
if d == nil {
return nil
}
return d.DeviceVendor
}
func (d *DeleteMediaProviderRequest) GetDeviceName() *string {
if d == nil {
return nil
}
return d.DeviceName
}
func (d *DeleteMediaProviderRequest) GetMarketplace() *string {
if d == nil {
return nil
}
return d.Marketplace
}
func (d *DeleteMediaProviderRequest) GetProvider() string {
if d == nil {
return ""
}
return d.Provider
}
type DeleteMediaProviderResponse 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
}
func (d *DeleteMediaProviderResponse) GetContentType() string {
if d == nil {
return ""
}
return d.ContentType
}
func (d *DeleteMediaProviderResponse) GetStatusCode() int {
if d == nil {
return 0
}
return d.StatusCode
}
func (d *DeleteMediaProviderResponse) GetRawResponse() *http.Response {
if d == nil {
return nil
}
return d.RawResponse
}

View File

@@ -0,0 +1,282 @@
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/models/components"
"net/http"
)
type DeleteMetadataItemGlobals struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
}
func (d DeleteMetadataItemGlobals) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(d, "", false)
}
func (d *DeleteMetadataItemGlobals) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &d, "", false, nil); err != nil {
return err
}
return nil
}
func (d *DeleteMetadataItemGlobals) GetAccepts() *components.Accepts {
if d == nil {
return nil
}
return d.Accepts
}
func (d *DeleteMetadataItemGlobals) GetClientIdentifier() *string {
if d == nil {
return nil
}
return d.ClientIdentifier
}
func (d *DeleteMetadataItemGlobals) GetProduct() *string {
if d == nil {
return nil
}
return d.Product
}
func (d *DeleteMetadataItemGlobals) GetVersion() *string {
if d == nil {
return nil
}
return d.Version
}
func (d *DeleteMetadataItemGlobals) GetPlatform() *string {
if d == nil {
return nil
}
return d.Platform
}
func (d *DeleteMetadataItemGlobals) GetPlatformVersion() *string {
if d == nil {
return nil
}
return d.PlatformVersion
}
func (d *DeleteMetadataItemGlobals) GetDevice() *string {
if d == nil {
return nil
}
return d.Device
}
func (d *DeleteMetadataItemGlobals) GetModel() *string {
if d == nil {
return nil
}
return d.Model
}
func (d *DeleteMetadataItemGlobals) GetDeviceVendor() *string {
if d == nil {
return nil
}
return d.DeviceVendor
}
func (d *DeleteMetadataItemGlobals) GetDeviceName() *string {
if d == nil {
return nil
}
return d.DeviceName
}
func (d *DeleteMetadataItemGlobals) GetMarketplace() *string {
if d == nil {
return nil
}
return d.Marketplace
}
type DeleteMetadataItemRequest struct {
// Indicates the client accepts the indicated media types
Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
// An opaque identifier unique to the client
ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
// The name of the client product
Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
// The version of the client application
Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
// The platform of the client
Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
// The version of the platform
PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
// A relatively friendly name for the client device
Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
// A potentially less friendly identifier for the device model
Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
// The device vendor
DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
// A friendly name for the client
DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
// The marketplace on which the client application is distributed
Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
Ids string `pathParam:"style=simple,explode=false,name=ids"`
// Whether proxy items, such as media optimized versions, should also be deleted. Defaults to false.
Proxy *components.BoolInt `queryParam:"style=form,explode=true,name=proxy"`
}
func (d DeleteMetadataItemRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(d, "", false)
}
func (d *DeleteMetadataItemRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &d, "", false, []string{"ids"}); err != nil {
return err
}
return nil
}
func (d *DeleteMetadataItemRequest) GetAccepts() *components.Accepts {
if d == nil {
return nil
}
return d.Accepts
}
func (d *DeleteMetadataItemRequest) GetClientIdentifier() *string {
if d == nil {
return nil
}
return d.ClientIdentifier
}
func (d *DeleteMetadataItemRequest) GetProduct() *string {
if d == nil {
return nil
}
return d.Product
}
func (d *DeleteMetadataItemRequest) GetVersion() *string {
if d == nil {
return nil
}
return d.Version
}
func (d *DeleteMetadataItemRequest) GetPlatform() *string {
if d == nil {
return nil
}
return d.Platform
}
func (d *DeleteMetadataItemRequest) GetPlatformVersion() *string {
if d == nil {
return nil
}
return d.PlatformVersion
}
func (d *DeleteMetadataItemRequest) GetDevice() *string {
if d == nil {
return nil
}
return d.Device
}
func (d *DeleteMetadataItemRequest) GetModel() *string {
if d == nil {
return nil
}
return d.Model
}
func (d *DeleteMetadataItemRequest) GetDeviceVendor() *string {
if d == nil {
return nil
}
return d.DeviceVendor
}
func (d *DeleteMetadataItemRequest) GetDeviceName() *string {
if d == nil {
return nil
}
return d.DeviceName
}
func (d *DeleteMetadataItemRequest) GetMarketplace() *string {
if d == nil {
return nil
}
return d.Marketplace
}
func (d *DeleteMetadataItemRequest) GetIds() string {
if d == nil {
return ""
}
return d.Ids
}
func (d *DeleteMetadataItemRequest) GetProxy() *components.BoolInt {
if d == nil {
return nil
}
return d.Proxy
}
type DeleteMetadataItemResponse 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
}
func (d *DeleteMetadataItemResponse) GetContentType() string {
if d == nil {
return ""
}
return d.ContentType
}
func (d *DeleteMetadataItemResponse) GetStatusCode() int {
if d == nil {
return 0
}
return d.StatusCode
}
func (d *DeleteMetadataItemResponse) GetRawResponse() *http.Response {
if d == nil {
return nil
}
return d.RawResponse
}

Some files were not shown because too many files have changed in this diff Show More