mirror of
https://github.com/LukeHagar/plexcsharp.git
synced 2025-12-06 04:20:46 +00:00
## Csharp 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.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:
57
LukeHagar/PlexAPI/SDK/Models/Components/Accepts.cs
Normal file
57
LukeHagar/PlexAPI/SDK/Models/Components/Accepts.cs
Normal file
@@ -0,0 +1,57 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
|
||||
public enum Accepts
|
||||
{
|
||||
[JsonProperty("application/json")]
|
||||
ApplicationJson,
|
||||
[JsonProperty("application/xml")]
|
||||
ApplicationXml,
|
||||
}
|
||||
|
||||
public static class AcceptsExtension
|
||||
{
|
||||
public static string Value(this Accepts value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static Accepts ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(Accepts).GetFields())
|
||||
{
|
||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
||||
if (attributes.Length == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var attribute = attributes[0] as JsonPropertyAttribute;
|
||||
if (attribute != null && attribute.PropertyName == value)
|
||||
{
|
||||
var enumVal = field.GetValue(null);
|
||||
|
||||
if (enumVal is Accepts)
|
||||
{
|
||||
return (Accepts)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum Accepts");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
59
LukeHagar/PlexAPI/SDK/Models/Components/AdvancedSubtitles.cs
Normal file
59
LukeHagar/PlexAPI/SDK/Models/Components/AdvancedSubtitles.cs
Normal file
@@ -0,0 +1,59 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
|
||||
public enum AdvancedSubtitles
|
||||
{
|
||||
[JsonProperty("burn")]
|
||||
Burn,
|
||||
[JsonProperty("text")]
|
||||
Text,
|
||||
[JsonProperty("unknown")]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
public static class AdvancedSubtitlesExtension
|
||||
{
|
||||
public static string Value(this AdvancedSubtitles value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static AdvancedSubtitles ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(AdvancedSubtitles).GetFields())
|
||||
{
|
||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
||||
if (attributes.Length == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var attribute = attributes[0] as JsonPropertyAttribute;
|
||||
if (attribute != null && attribute.PropertyName == value)
|
||||
{
|
||||
var enumVal = field.GetValue(null);
|
||||
|
||||
if (enumVal is AdvancedSubtitles)
|
||||
{
|
||||
return (AdvancedSubtitles)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum AdvancedSubtitles");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
57
LukeHagar/PlexAPI/SDK/Models/Components/AiringsType.cs
Normal file
57
LukeHagar/PlexAPI/SDK/Models/Components/AiringsType.cs
Normal file
@@ -0,0 +1,57 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
|
||||
public enum AiringsType
|
||||
{
|
||||
[JsonProperty("New Airings Only")]
|
||||
NewAiringsOnly,
|
||||
[JsonProperty("New and Repeat Airings")]
|
||||
NewAndRepeatAirings,
|
||||
}
|
||||
|
||||
public static class AiringsTypeExtension
|
||||
{
|
||||
public static string Value(this AiringsType value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static AiringsType ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(AiringsType).GetFields())
|
||||
{
|
||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
||||
if (attributes.Length == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var attribute = attributes[0] as JsonPropertyAttribute;
|
||||
if (attribute != null && attribute.PropertyName == value)
|
||||
{
|
||||
var enumVal = field.GetValue(null);
|
||||
|
||||
if (enumVal is AiringsType)
|
||||
{
|
||||
return (AiringsType)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum AiringsType");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
20
LukeHagar/PlexAPI/SDK/Models/Components/BoolInt.cs
Normal file
20
LukeHagar/PlexAPI/SDK/Models/Components/BoolInt.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
|
||||
public enum BoolInt
|
||||
{
|
||||
Zero = 0,
|
||||
One = 1,
|
||||
}
|
||||
|
||||
}
|
||||
42
LukeHagar/PlexAPI/SDK/Models/Components/Channel.cs
Normal file
42
LukeHagar/PlexAPI/SDK/Models/Components/Channel.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
public class Channel
|
||||
{
|
||||
|
||||
[JsonProperty("title")]
|
||||
public string? Title { get; set; }
|
||||
|
||||
[JsonProperty("callSign")]
|
||||
public string? CallSign { get; set; }
|
||||
|
||||
[JsonProperty("channelVcn")]
|
||||
public string? ChannelVcn { get; set; }
|
||||
|
||||
[JsonProperty("hd")]
|
||||
public bool? Hd { get; set; }
|
||||
|
||||
[JsonProperty("identifier")]
|
||||
public string? Identifier { get; set; }
|
||||
|
||||
[JsonProperty("key")]
|
||||
public string? Key { get; set; }
|
||||
|
||||
[JsonProperty("language")]
|
||||
public string? Language { get; set; }
|
||||
|
||||
[JsonProperty("thumb")]
|
||||
public string? Thumb { get; set; }
|
||||
}
|
||||
}
|
||||
30
LukeHagar/PlexAPI/SDK/Models/Components/ChannelMapping.cs
Normal file
30
LukeHagar/PlexAPI/SDK/Models/Components/ChannelMapping.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
public class ChannelMapping
|
||||
{
|
||||
|
||||
[JsonProperty("channelKey")]
|
||||
public string? ChannelKey { get; set; }
|
||||
|
||||
[JsonProperty("deviceIdentifier")]
|
||||
public string? DeviceIdentifier { get; set; }
|
||||
|
||||
[JsonProperty("enabled")]
|
||||
public string? Enabled { get; set; }
|
||||
|
||||
[JsonProperty("lineupIdentifier")]
|
||||
public string? LineupIdentifier { get; set; }
|
||||
}
|
||||
}
|
||||
84
LukeHagar/PlexAPI/SDK/Models/Components/Composite.cs
Normal file
84
LukeHagar/PlexAPI/SDK/Models/Components/Composite.cs
Normal file
@@ -0,0 +1,84 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
|
||||
public class Composite
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Limit composite to specified metadata types
|
||||
/// </summary>
|
||||
[SpeakeasyMetadata("queryParam:name=type")]
|
||||
public long? Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The image type
|
||||
/// </summary>
|
||||
[SpeakeasyMetadata("queryParam:name=format")]
|
||||
public Models.Components.Format? Format { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 6 character hex RGB value for background color for image
|
||||
/// </summary>
|
||||
[SpeakeasyMetadata("queryParam:name=backgroundColor")]
|
||||
public string? BackgroundColor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The width of the intra-image border
|
||||
/// </summary>
|
||||
[SpeakeasyMetadata("queryParam:name=border")]
|
||||
public long? Border { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Number of columns to construct in the composite image
|
||||
/// </summary>
|
||||
[SpeakeasyMetadata("queryParam:name=cols")]
|
||||
public long? Cols { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Where to crop source images to fit into composite image proportions
|
||||
/// </summary>
|
||||
[SpeakeasyMetadata("queryParam:name=crop")]
|
||||
public Crop? Crop { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The height of the image
|
||||
/// </summary>
|
||||
[SpeakeasyMetadata("queryParam:name=height")]
|
||||
public long? Height { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The default image type to use as the sources
|
||||
/// </summary>
|
||||
[SpeakeasyMetadata("queryParam:name=media")]
|
||||
public CompositeMedia? Media { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Allow repetion of images if there are not enough source images to fill grid
|
||||
/// </summary>
|
||||
[SpeakeasyMetadata("queryParam:name=repeat")]
|
||||
public bool? Repeat { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Number of rows to construct in the composite image
|
||||
/// </summary>
|
||||
[SpeakeasyMetadata("queryParam:name=rows")]
|
||||
public long? Rows { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The width of the image
|
||||
/// </summary>
|
||||
[SpeakeasyMetadata("queryParam:name=width")]
|
||||
public long? Width { get; set; }
|
||||
}
|
||||
}
|
||||
62
LukeHagar/PlexAPI/SDK/Models/Components/CompositeMedia.cs
Normal file
62
LukeHagar/PlexAPI/SDK/Models/Components/CompositeMedia.cs
Normal file
@@ -0,0 +1,62 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// The default image type to use as the sources
|
||||
/// </summary>
|
||||
public enum CompositeMedia
|
||||
{
|
||||
[JsonProperty("thumb")]
|
||||
Thumb,
|
||||
[JsonProperty("art")]
|
||||
Art,
|
||||
[JsonProperty("banner")]
|
||||
Banner,
|
||||
}
|
||||
|
||||
public static class CompositeMediaExtension
|
||||
{
|
||||
public static string Value(this CompositeMedia value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static CompositeMedia ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(CompositeMedia).GetFields())
|
||||
{
|
||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
||||
if (attributes.Length == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var attribute = attributes[0] as JsonPropertyAttribute;
|
||||
if (attribute != null && attribute.PropertyName == value)
|
||||
{
|
||||
var enumVal = field.GetValue(null);
|
||||
|
||||
if (enumVal is CompositeMedia)
|
||||
{
|
||||
return (CompositeMedia)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum CompositeMedia");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
60
LukeHagar/PlexAPI/SDK/Models/Components/Crop.cs
Normal file
60
LukeHagar/PlexAPI/SDK/Models/Components/Crop.cs
Normal file
@@ -0,0 +1,60 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Where to crop source images to fit into composite image proportions
|
||||
/// </summary>
|
||||
public enum Crop
|
||||
{
|
||||
[JsonProperty("center")]
|
||||
Center,
|
||||
[JsonProperty("top")]
|
||||
Top,
|
||||
}
|
||||
|
||||
public static class CropExtension
|
||||
{
|
||||
public static string Value(this Crop value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static Crop ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(Crop).GetFields())
|
||||
{
|
||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
||||
if (attributes.Length == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var attribute = attributes[0] as JsonPropertyAttribute;
|
||||
if (attribute != null && attribute.PropertyName == value)
|
||||
{
|
||||
var enumVal = field.GetValue(null);
|
||||
|
||||
if (enumVal is Crop)
|
||||
{
|
||||
return (Crop)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum Crop");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
59
LukeHagar/PlexAPI/SDK/Models/Components/Decision.cs
Normal file
59
LukeHagar/PlexAPI/SDK/Models/Components/Decision.cs
Normal file
@@ -0,0 +1,59 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
|
||||
public enum Decision
|
||||
{
|
||||
[JsonProperty("directplay")]
|
||||
Directplay,
|
||||
[JsonProperty("transcode")]
|
||||
Transcode,
|
||||
[JsonProperty("none")]
|
||||
None,
|
||||
}
|
||||
|
||||
public static class DecisionExtension
|
||||
{
|
||||
public static string Value(this Decision value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static Decision ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(Decision).GetFields())
|
||||
{
|
||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
||||
if (attributes.Length == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var attribute = attributes[0] as JsonPropertyAttribute;
|
||||
if (attribute != null && attribute.PropertyName == value)
|
||||
{
|
||||
var enumVal = field.GetValue(null);
|
||||
|
||||
if (enumVal is Decision)
|
||||
{
|
||||
return (Decision)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum Decision");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
207
LukeHagar/PlexAPI/SDK/Models/Components/Default.cs
Normal file
207
LukeHagar/PlexAPI/SDK/Models/Components/Default.cs
Normal file
@@ -0,0 +1,207 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Numerics;
|
||||
using System.Reflection;
|
||||
|
||||
public class DefaultType
|
||||
{
|
||||
private DefaultType(string value) { Value = value; }
|
||||
|
||||
public string Value { get; private set; }
|
||||
|
||||
public static DefaultType Str { get { return new DefaultType("str"); } }
|
||||
|
||||
public static DefaultType Number { get { return new DefaultType("number"); } }
|
||||
|
||||
public static DefaultType Boolean { get { return new DefaultType("boolean"); } }
|
||||
|
||||
public override string ToString() { return Value; }
|
||||
public static implicit operator String(DefaultType v) { return v.Value; }
|
||||
public static DefaultType FromString(string v) {
|
||||
switch(v) {
|
||||
case "str": return Str;
|
||||
case "number": return Number;
|
||||
case "boolean": return Boolean;
|
||||
default: throw new ArgumentException("Invalid value for DefaultType");
|
||||
}
|
||||
}
|
||||
public override bool Equals(object? obj)
|
||||
{
|
||||
if (obj == null || GetType() != obj.GetType())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return Value.Equals(((DefaultType)obj).Value);
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return Value.GetHashCode();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The default value of this setting
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(Default.DefaultConverter))]
|
||||
public class Default
|
||||
{
|
||||
public Default(DefaultType type)
|
||||
{
|
||||
Type = type;
|
||||
}
|
||||
|
||||
[SpeakeasyMetadata("form:explode=true")]
|
||||
public string? Str { get; set; }
|
||||
|
||||
[SpeakeasyMetadata("form:explode=true")]
|
||||
public double? Number { get; set; }
|
||||
|
||||
[SpeakeasyMetadata("form:explode=true")]
|
||||
public bool? Boolean { get; set; }
|
||||
|
||||
public DefaultType Type { get; set; }
|
||||
public static Default CreateStr(string str)
|
||||
{
|
||||
DefaultType typ = DefaultType.Str;
|
||||
|
||||
Default res = new Default(typ);
|
||||
res.Str = str;
|
||||
return res;
|
||||
}
|
||||
public static Default CreateNumber(double number)
|
||||
{
|
||||
DefaultType typ = DefaultType.Number;
|
||||
|
||||
Default res = new Default(typ);
|
||||
res.Number = number;
|
||||
return res;
|
||||
}
|
||||
public static Default CreateBoolean(bool boolean)
|
||||
{
|
||||
DefaultType typ = DefaultType.Boolean;
|
||||
|
||||
Default res = new Default(typ);
|
||||
res.Boolean = boolean;
|
||||
return res;
|
||||
}
|
||||
|
||||
public class DefaultConverter : JsonConverter
|
||||
{
|
||||
public override bool CanConvert(System.Type objectType) => objectType == typeof(Default);
|
||||
|
||||
public override bool CanRead => true;
|
||||
|
||||
public override object? ReadJson(JsonReader reader, System.Type objectType, object? existingValue, JsonSerializer serializer)
|
||||
{
|
||||
if (reader.TokenType == JsonToken.Null)
|
||||
{
|
||||
throw new InvalidOperationException("Received unexpected null JSON value");
|
||||
}
|
||||
|
||||
var json = JRaw.Create(reader).ToString();
|
||||
var fallbackCandidates = new List<(System.Type, object, string)>();
|
||||
|
||||
if (json[0] == '"' && json[^1] == '"'){
|
||||
return new Default(DefaultType.Str)
|
||||
{
|
||||
Str = json[1..^1]
|
||||
};
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
var converted = Convert.ToDouble(json);
|
||||
return new Default(DefaultType.Number)
|
||||
{
|
||||
Number = converted
|
||||
};
|
||||
}
|
||||
catch (System.FormatException)
|
||||
{
|
||||
// try next option
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
var converted = Convert.ToBoolean(json);
|
||||
return new Default(DefaultType.Boolean)
|
||||
{
|
||||
Boolean = converted
|
||||
};
|
||||
}
|
||||
catch (System.FormatException)
|
||||
{
|
||||
// try next option
|
||||
}
|
||||
|
||||
if (fallbackCandidates.Count > 0)
|
||||
{
|
||||
fallbackCandidates.Sort((a, b) => ResponseBodyDeserializer.CompareFallbackCandidates(a.Item1, b.Item1, json));
|
||||
foreach(var (deserializationType, returnObject, propertyName) in fallbackCandidates)
|
||||
{
|
||||
try
|
||||
{
|
||||
return ResponseBodyDeserializer.DeserializeUndiscriminatedUnionFallback(deserializationType, returnObject, propertyName, json);
|
||||
}
|
||||
catch (ResponseBodyDeserializer.DeserializationException)
|
||||
{
|
||||
// try next fallback option
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new InvalidOperationException("Could not deserialize into any supported types.");
|
||||
}
|
||||
|
||||
public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
throw new InvalidOperationException("Unexpected null JSON value.");
|
||||
}
|
||||
|
||||
Default res = (Default)value;
|
||||
|
||||
if (res.Str != null)
|
||||
{
|
||||
writer.WriteRawValue(Utilities.SerializeJSON(res.Str));
|
||||
return;
|
||||
}
|
||||
|
||||
if (res.Number != null)
|
||||
{
|
||||
writer.WriteRawValue(Utilities.SerializeJSON(res.Number));
|
||||
return;
|
||||
}
|
||||
|
||||
if (res.Boolean != null)
|
||||
{
|
||||
writer.WriteRawValue(Utilities.SerializeJSON(res.Boolean));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
60
LukeHagar/PlexAPI/SDK/Models/Components/DefaultDirection.cs
Normal file
60
LukeHagar/PlexAPI/SDK/Models/Components/DefaultDirection.cs
Normal file
@@ -0,0 +1,60 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// This default diction of this sort
|
||||
/// </summary>
|
||||
public enum DefaultDirection
|
||||
{
|
||||
[JsonProperty("asc")]
|
||||
Asc,
|
||||
[JsonProperty("desc")]
|
||||
Desc,
|
||||
}
|
||||
|
||||
public static class DefaultDirectionExtension
|
||||
{
|
||||
public static string Value(this DefaultDirection value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static DefaultDirection ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(DefaultDirection).GetFields())
|
||||
{
|
||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
||||
if (attributes.Length == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var attribute = attributes[0] as JsonPropertyAttribute;
|
||||
if (attribute != null && attribute.PropertyName == value)
|
||||
{
|
||||
var enumVal = field.GetValue(null);
|
||||
|
||||
if (enumVal is DefaultDirection)
|
||||
{
|
||||
return (DefaultDirection)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum DefaultDirection");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
59
LukeHagar/PlexAPI/SDK/Models/Components/Device.cs
Normal file
59
LukeHagar/PlexAPI/SDK/Models/Components/Device.cs
Normal file
@@ -0,0 +1,59 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public class Device
|
||||
{
|
||||
|
||||
[JsonProperty("ChannelMapping")]
|
||||
public List<Models.Components.ChannelMapping>? ChannelMapping { get; set; }
|
||||
|
||||
[JsonProperty("key")]
|
||||
public string? Key { get; set; }
|
||||
|
||||
[JsonProperty("lastSeenAt")]
|
||||
public long? LastSeenAt { get; set; }
|
||||
|
||||
[JsonProperty("make")]
|
||||
public string? Make { get; set; }
|
||||
|
||||
[JsonProperty("model")]
|
||||
public string? Model { get; set; }
|
||||
|
||||
[JsonProperty("modelNumber")]
|
||||
public string? ModelNumber { get; set; }
|
||||
|
||||
[JsonProperty("protocol")]
|
||||
public string? Protocol { get; set; }
|
||||
|
||||
[JsonProperty("sources")]
|
||||
public string? Sources { get; set; }
|
||||
|
||||
[JsonProperty("state")]
|
||||
public string? State { get; set; }
|
||||
|
||||
[JsonProperty("status")]
|
||||
public string? Status { get; set; }
|
||||
|
||||
[JsonProperty("tuners")]
|
||||
public string? Tuners { get; set; }
|
||||
|
||||
[JsonProperty("uri")]
|
||||
public string? Uri { get; set; }
|
||||
|
||||
[JsonProperty("uuid")]
|
||||
public string? Uuid { get; set; }
|
||||
}
|
||||
}
|
||||
68
LukeHagar/PlexAPI/SDK/Models/Components/Directory.cs
Normal file
68
LukeHagar/PlexAPI/SDK/Models/Components/Directory.cs
Normal file
@@ -0,0 +1,68 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public class Directory
|
||||
{
|
||||
|
||||
[JsonProperty("title")]
|
||||
public string? Title { get; set; }
|
||||
|
||||
[JsonProperty("type")]
|
||||
public string? Type { get; set; }
|
||||
|
||||
[JsonProperty("art")]
|
||||
public string? Art { get; set; }
|
||||
|
||||
[JsonProperty("content")]
|
||||
public bool? Content { get; set; }
|
||||
|
||||
[JsonProperty("filter")]
|
||||
public string? Filter { get; set; }
|
||||
|
||||
[JsonProperty("hasPrefs")]
|
||||
public bool? HasPrefs { get; set; }
|
||||
|
||||
[JsonProperty("hasStoreServices")]
|
||||
public bool? HasStoreServices { get; set; }
|
||||
|
||||
[JsonProperty("hubKey")]
|
||||
public string? HubKey { get; set; }
|
||||
|
||||
[JsonProperty("identifier")]
|
||||
public string? Identifier { get; set; }
|
||||
|
||||
[JsonProperty("key")]
|
||||
public string? Key { get; set; }
|
||||
|
||||
[JsonProperty("lastAccessedAt")]
|
||||
public long? LastAccessedAt { get; set; }
|
||||
|
||||
[JsonProperty("Pivot")]
|
||||
public List<Pivot>? Pivot { get; set; }
|
||||
|
||||
[JsonProperty("share")]
|
||||
public long? Share { get; set; }
|
||||
|
||||
[JsonProperty("thumb")]
|
||||
public string? Thumb { get; set; }
|
||||
|
||||
[JsonProperty("titleBar")]
|
||||
public string? TitleBar { get; set; }
|
||||
|
||||
[JsonProperty("additionalProperties")]
|
||||
public Dictionary<string, object>? AdditionalProperties { get; set; }
|
||||
}
|
||||
}
|
||||
35
LukeHagar/PlexAPI/SDK/Models/Components/Dvr.cs
Normal file
35
LukeHagar/PlexAPI/SDK/Models/Components/Dvr.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public class Dvr
|
||||
{
|
||||
|
||||
[JsonProperty("Device")]
|
||||
public List<Models.Components.Device>? Device { get; set; }
|
||||
|
||||
[JsonProperty("key")]
|
||||
public string? Key { get; set; }
|
||||
|
||||
[JsonProperty("language")]
|
||||
public string? Language { get; set; }
|
||||
|
||||
[JsonProperty("lineup")]
|
||||
public string? Lineup { get; set; }
|
||||
|
||||
[JsonProperty("uuid")]
|
||||
public string? Uuid { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
/// <summary>
|
||||
/// OK
|
||||
/// </summary>
|
||||
public class DvrRequestHandlerSlashGetResponses200
|
||||
{
|
||||
|
||||
[JsonProperty("MediaContainer")]
|
||||
public DvrRequestHandlerSlashGetResponses200MediaContainer? MediaContainer { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public class DvrRequestHandlerSlashGetResponses200MediaContainer
|
||||
{
|
||||
|
||||
[JsonProperty("MediaContainer")]
|
||||
public DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer? MediaContainer { get; set; }
|
||||
|
||||
[JsonProperty("DVR")]
|
||||
public List<Models.Components.Dvr>? Dvr { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
/// <summary>
|
||||
/// `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.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
/// 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)<br/>
|
||||
/// 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.<br/>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
public class DvrRequestHandlerSlashGetResponses200MediaContainerMediaContainer
|
||||
{
|
||||
|
||||
[JsonProperty("identifier")]
|
||||
public string? Identifier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("offset")]
|
||||
public long? Offset { get; set; }
|
||||
|
||||
[JsonProperty("size")]
|
||||
public long? Size { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("totalSize")]
|
||||
public long? TotalSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A status indicator. If present and non-zero, indicates an error
|
||||
/// </summary>
|
||||
[JsonProperty("status")]
|
||||
public long? Status { get; set; }
|
||||
}
|
||||
}
|
||||
90
LukeHagar/PlexAPI/SDK/Models/Components/Filter.cs
Normal file
90
LukeHagar/PlexAPI/SDK/Models/Components/Filter.cs
Normal file
@@ -0,0 +1,90 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
/// <summary>
|
||||
/// 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.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
public class Filter
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// The title for the filter.
|
||||
/// </summary>
|
||||
[JsonProperty("title")]
|
||||
public string? Title { get; set; }
|
||||
|
||||
[JsonProperty("type")]
|
||||
public string? Type { get; set; }
|
||||
|
||||
[JsonProperty("art")]
|
||||
public string? Art { get; set; }
|
||||
|
||||
[JsonProperty("content")]
|
||||
public bool? Content { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// This represents the filter name used for the filter, which can be used to construct complex media queries with.
|
||||
/// </summary>
|
||||
[JsonProperty("filter")]
|
||||
public string? FilterValue { get; set; }
|
||||
|
||||
[JsonProperty("hasPrefs")]
|
||||
public bool? HasPrefs { get; set; }
|
||||
|
||||
[JsonProperty("hasStoreServices")]
|
||||
public bool? HasStoreServices { get; set; }
|
||||
|
||||
[JsonProperty("hubKey")]
|
||||
public string? HubKey { get; set; }
|
||||
|
||||
[JsonProperty("identifier")]
|
||||
public string? Identifier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
[JsonProperty("key")]
|
||||
public string? Key { get; set; }
|
||||
|
||||
[JsonProperty("lastAccessedAt")]
|
||||
public long? LastAccessedAt { get; set; }
|
||||
|
||||
[JsonProperty("Pivot")]
|
||||
public List<FilterPivot>? Pivot { get; set; }
|
||||
|
||||
[JsonProperty("share")]
|
||||
public long? Share { get; set; }
|
||||
|
||||
[JsonProperty("thumb")]
|
||||
public string? Thumb { get; set; }
|
||||
|
||||
[JsonProperty("titleBar")]
|
||||
public string? TitleBar { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// This is either `string`, `integer`, or `boolean`, and describes the type of values used for the filter.
|
||||
/// </summary>
|
||||
[JsonProperty("filterType")]
|
||||
public string? FilterType { get; set; }
|
||||
|
||||
[JsonProperty("additionalProperties")]
|
||||
public Dictionary<string, object>? AdditionalProperties { get; set; }
|
||||
}
|
||||
}
|
||||
36
LukeHagar/PlexAPI/SDK/Models/Components/FilterPivot.cs
Normal file
36
LukeHagar/PlexAPI/SDK/Models/Components/FilterPivot.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
public class FilterPivot
|
||||
{
|
||||
|
||||
[JsonProperty("title")]
|
||||
public string? Title { get; set; }
|
||||
|
||||
[JsonProperty("type")]
|
||||
public string? Type { get; set; }
|
||||
|
||||
[JsonProperty("context")]
|
||||
public string? Context { get; set; }
|
||||
|
||||
[JsonProperty("id")]
|
||||
public string? Id { get; set; }
|
||||
|
||||
[JsonProperty("key")]
|
||||
public string? Key { get; set; }
|
||||
|
||||
[JsonProperty("symbol")]
|
||||
public string? Symbol { get; set; }
|
||||
}
|
||||
}
|
||||
60
LukeHagar/PlexAPI/SDK/Models/Components/Format.cs
Normal file
60
LukeHagar/PlexAPI/SDK/Models/Components/Format.cs
Normal file
@@ -0,0 +1,60 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// The image type
|
||||
/// </summary>
|
||||
public enum Format
|
||||
{
|
||||
[JsonProperty("jpg")]
|
||||
Jpg,
|
||||
[JsonProperty("png")]
|
||||
Png,
|
||||
}
|
||||
|
||||
public static class FormatExtension
|
||||
{
|
||||
public static string Value(this Format value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static Format ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(Format).GetFields())
|
||||
{
|
||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
||||
if (attributes.Length == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var attribute = attributes[0] as JsonPropertyAttribute;
|
||||
if (attribute != null && attribute.PropertyName == value)
|
||||
{
|
||||
var enumVal = field.GetValue(null);
|
||||
|
||||
if (enumVal is Format)
|
||||
{
|
||||
return (Format)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum Format");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
25
LukeHagar/PlexAPI/SDK/Models/Components/GetResponses200.cs
Normal file
25
LukeHagar/PlexAPI/SDK/Models/Components/GetResponses200.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
/// <summary>
|
||||
/// OK
|
||||
/// </summary>
|
||||
public class GetResponses200
|
||||
{
|
||||
|
||||
[JsonProperty("MediaContainer")]
|
||||
public GetResponses200MediaContainer? MediaContainer { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
public class GetResponses200Hub
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Whether this hub is visible on the home screen<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
/// - all: Visible to all users<br/>
|
||||
/// - none: Visible to no users<br/>
|
||||
/// - admin: Visible to only admin users<br/>
|
||||
/// - shared: Visible to shared users<br/>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("homeVisibility")]
|
||||
public Models.Components.HomeVisibility? HomeVisibility { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The identifier for this hub
|
||||
/// </summary>
|
||||
[JsonProperty("identifier")]
|
||||
public string? Identifier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether this hub is visible to admin user home
|
||||
/// </summary>
|
||||
[JsonProperty("promotedToOwnHome")]
|
||||
public bool? PromotedToOwnHome { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether this hub is promoted to all for recommendations
|
||||
/// </summary>
|
||||
[JsonProperty("promotedToRecommended")]
|
||||
public bool? PromotedToRecommended { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether this hub is visible to shared user's home
|
||||
/// </summary>
|
||||
[JsonProperty("promotedToSharedHome")]
|
||||
public bool? PromotedToSharedHome { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The visibility of this hub in recommendations:<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
/// - all: Visible to all users<br/>
|
||||
/// - none: Visible to no users<br/>
|
||||
/// - admin: Visible to only admin users<br/>
|
||||
/// - shared: Visible to shared users<br/>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("recommendationsVisibility")]
|
||||
public Models.Components.RecommendationsVisibility? RecommendationsVisibility { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The title of this hub
|
||||
/// </summary>
|
||||
[JsonProperty("title")]
|
||||
public string? Title { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
/// <summary>
|
||||
/// `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.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
/// 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)<br/>
|
||||
/// 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.<br/>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
public class GetResponses200MediaContainer
|
||||
{
|
||||
|
||||
[JsonProperty("identifier")]
|
||||
public string? Identifier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("offset")]
|
||||
public long? Offset { get; set; }
|
||||
|
||||
[JsonProperty("size")]
|
||||
public long? Size { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("totalSize")]
|
||||
public long? TotalSize { get; set; }
|
||||
|
||||
[JsonProperty("Hub")]
|
||||
public List<GetResponses200Hub>? Hub { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
/// <summary>
|
||||
/// OK
|
||||
/// </summary>
|
||||
public class HistoryAllGetResponses200
|
||||
{
|
||||
|
||||
[JsonProperty("MediaContainer")]
|
||||
public HistoryAllGetResponses200MediaContainer? MediaContainer { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
/// <summary>
|
||||
/// `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.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
/// 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)<br/>
|
||||
/// 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.<br/>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
public class HistoryAllGetResponses200MediaContainer
|
||||
{
|
||||
|
||||
[JsonProperty("identifier")]
|
||||
public string? Identifier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("offset")]
|
||||
public long? Offset { get; set; }
|
||||
|
||||
[JsonProperty("size")]
|
||||
public long? Size { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("totalSize")]
|
||||
public long? TotalSize { get; set; }
|
||||
|
||||
[JsonProperty("Metadata")]
|
||||
public List<HistoryAllGetResponses200Metadata>? Metadata { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
public class HistoryAllGetResponses200Metadata
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// The account id of this playback
|
||||
/// </summary>
|
||||
[JsonProperty("accountID")]
|
||||
public long? AccountID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The device id which played the item
|
||||
/// </summary>
|
||||
[JsonProperty("deviceID")]
|
||||
public long? DeviceID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The key for this individual history item
|
||||
/// </summary>
|
||||
[JsonProperty("historyKey")]
|
||||
public string? HistoryKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The metadata key for the item played
|
||||
/// </summary>
|
||||
[JsonProperty("key")]
|
||||
public string? Key { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The library section id containing the item played
|
||||
/// </summary>
|
||||
[JsonProperty("librarySectionID")]
|
||||
public string? LibrarySectionID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The originally available at of the item played
|
||||
/// </summary>
|
||||
[JsonProperty("originallyAvailableAt")]
|
||||
public string? OriginallyAvailableAt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The rating key for the item played
|
||||
/// </summary>
|
||||
[JsonProperty("ratingKey")]
|
||||
public string? RatingKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The thumb of the item played
|
||||
/// </summary>
|
||||
[JsonProperty("thumb")]
|
||||
public string? Thumb { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The title of the item played
|
||||
/// </summary>
|
||||
[JsonProperty("title")]
|
||||
public string? Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The metadata type of the item played
|
||||
/// </summary>
|
||||
[JsonProperty("type")]
|
||||
public string? Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The time when the item was played
|
||||
/// </summary>
|
||||
[JsonProperty("viewedAt")]
|
||||
public long? ViewedAt { get; set; }
|
||||
}
|
||||
}
|
||||
72
LukeHagar/PlexAPI/SDK/Models/Components/HomeVisibility.cs
Normal file
72
LukeHagar/PlexAPI/SDK/Models/Components/HomeVisibility.cs
Normal file
@@ -0,0 +1,72 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Whether this hub is visible on the home screen<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
/// - all: Visible to all users<br/>
|
||||
/// - none: Visible to no users<br/>
|
||||
/// - admin: Visible to only admin users<br/>
|
||||
/// - shared: Visible to shared users<br/>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
public enum HomeVisibility
|
||||
{
|
||||
[JsonProperty("all")]
|
||||
All,
|
||||
[JsonProperty("none")]
|
||||
None,
|
||||
[JsonProperty("admin")]
|
||||
Admin,
|
||||
[JsonProperty("shared")]
|
||||
Shared,
|
||||
}
|
||||
|
||||
public static class HomeVisibilityExtension
|
||||
{
|
||||
public static string Value(this HomeVisibility value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static HomeVisibility ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(HomeVisibility).GetFields())
|
||||
{
|
||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
||||
if (attributes.Length == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var attribute = attributes[0] as JsonPropertyAttribute;
|
||||
if (attribute != null && attribute.PropertyName == value)
|
||||
{
|
||||
var enumVal = field.GetValue(null);
|
||||
|
||||
if (enumVal is HomeVisibility)
|
||||
{
|
||||
return (HomeVisibility)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum HomeVisibility");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
103
LukeHagar/PlexAPI/SDK/Models/Components/Hub.cs
Normal file
103
LukeHagar/PlexAPI/SDK/Models/Components/Hub.cs
Normal file
@@ -0,0 +1,103 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public class Hub
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// A title for this grouping of content
|
||||
/// </summary>
|
||||
[JsonProperty("title")]
|
||||
public string? Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The type of the items contained in this hub, or possibly `mixed` if there are multiple types
|
||||
/// </summary>
|
||||
[JsonProperty("type")]
|
||||
public string? Type { get; set; }
|
||||
|
||||
[JsonProperty("context")]
|
||||
public string? Context { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A unique identifier for the hub
|
||||
/// </summary>
|
||||
[JsonProperty("hubIdentifier")]
|
||||
public string? HubIdentifier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("hubKey")]
|
||||
public string? HubKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The key at which all of the content for this hub can be retrieved
|
||||
/// </summary>
|
||||
[JsonProperty("key")]
|
||||
public string? Key { get; set; }
|
||||
|
||||
[JsonProperty("Metadata")]
|
||||
public List<Models.Components.Metadata>? Metadata { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// "A boolean indicating that the hub contains more than what's included in the current response."<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("more")]
|
||||
public bool? More { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicating if the hub should be promoted to the user's homescreen
|
||||
/// </summary>
|
||||
[JsonProperty("promoted")]
|
||||
public bool? Promoted { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicating that the contents of the hub may change on each request
|
||||
/// </summary>
|
||||
[JsonProperty("random")]
|
||||
public bool? Random { get; set; }
|
||||
|
||||
[JsonProperty("size")]
|
||||
public long? Size { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A suggestion on how this hub's contents might be displayed by a client. Some examples include `hero`, `list`, `spotlight`, and `upsell`
|
||||
/// </summary>
|
||||
[JsonProperty("style")]
|
||||
public string? Style { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The subtype of the items contained in this hub, or possibly `mixed` if there are multiple types
|
||||
/// </summary>
|
||||
[JsonProperty("subtype")]
|
||||
public string? Subtype { get; set; }
|
||||
|
||||
[JsonProperty("totalSize")]
|
||||
public long? TotalSize { get; set; }
|
||||
|
||||
[JsonProperty("additionalProperties")]
|
||||
public Dictionary<string, object>? AdditionalProperties { get; set; }
|
||||
}
|
||||
}
|
||||
44
LukeHagar/PlexAPI/SDK/Models/Components/Image.cs
Normal file
44
LukeHagar/PlexAPI/SDK/Models/Components/Image.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
/// <summary>
|
||||
/// Images such as movie posters and background artwork are represented by Image elements.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
public class Image
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Describes both the purpose and intended presentation of the image.
|
||||
/// </summary>
|
||||
[JsonProperty("type")]
|
||||
public ImageType? Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Title to use for accessibility.
|
||||
/// </summary>
|
||||
[JsonProperty("alt")]
|
||||
public string? Alt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The relative path or absolute url for the image.
|
||||
/// </summary>
|
||||
[JsonProperty("url")]
|
||||
public string? Url { get; set; }
|
||||
}
|
||||
}
|
||||
66
LukeHagar/PlexAPI/SDK/Models/Components/ImageType.cs
Normal file
66
LukeHagar/PlexAPI/SDK/Models/Components/ImageType.cs
Normal file
@@ -0,0 +1,66 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Describes both the purpose and intended presentation of the image.
|
||||
/// </summary>
|
||||
public enum ImageType
|
||||
{
|
||||
[JsonProperty("background")]
|
||||
Background,
|
||||
[JsonProperty("banner")]
|
||||
Banner,
|
||||
[JsonProperty("clearLogo")]
|
||||
ClearLogo,
|
||||
[JsonProperty("coverPoster")]
|
||||
CoverPoster,
|
||||
[JsonProperty("snapshot")]
|
||||
Snapshot,
|
||||
}
|
||||
|
||||
public static class ImageTypeExtension
|
||||
{
|
||||
public static string Value(this ImageType value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static ImageType ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(ImageType).GetFields())
|
||||
{
|
||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
||||
if (attributes.Length == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var attribute = attributes[0] as JsonPropertyAttribute;
|
||||
if (attribute != null && attribute.PropertyName == value)
|
||||
{
|
||||
var enumVal = field.GetValue(null);
|
||||
|
||||
if (enumVal is ImageType)
|
||||
{
|
||||
return (ImageType)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum ImageType");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
409
LukeHagar/PlexAPI/SDK/Models/Components/Items.cs
Normal file
409
LukeHagar/PlexAPI/SDK/Models/Components/Items.cs
Normal file
@@ -0,0 +1,409 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
/// <summary>
|
||||
/// 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.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
/// <br/>
|
||||
/// 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.<br/>
|
||||
/// <br/>
|
||||
/// 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.<br/>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
public class Items
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// The title of the item (e.g. “300” or “The Simpsons”)
|
||||
/// </summary>
|
||||
[JsonProperty("title")]
|
||||
public object? Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The type of the video item, such as `movie`, `episode`, or `clip`.
|
||||
/// </summary>
|
||||
[JsonProperty("type")]
|
||||
public object? Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, contains the disc number for a track on multi-disc albums.
|
||||
/// </summary>
|
||||
[JsonProperty("absoluteIndex")]
|
||||
public long? AbsoluteIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// In units of seconds since the epoch, returns the time at which the item was added to the library.
|
||||
/// </summary>
|
||||
[JsonProperty("addedAt")]
|
||||
public long? AddedAt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the URL for the background artwork for the item.
|
||||
/// </summary>
|
||||
[JsonProperty("art")]
|
||||
public object? Art { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Some rating systems separate reviewer ratings from audience ratings
|
||||
/// </summary>
|
||||
[JsonProperty("audienceRating")]
|
||||
public double? AudienceRating { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled).
|
||||
/// </summary>
|
||||
[JsonProperty("audienceRatingImage")]
|
||||
public object? AudienceRatingImage { get; set; }
|
||||
|
||||
[JsonProperty("Autotag")]
|
||||
public List<Tag>? Autotag { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the URL for a banner graphic for the item.
|
||||
/// </summary>
|
||||
[JsonProperty("banner")]
|
||||
public object? Banner { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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).
|
||||
/// </summary>
|
||||
[JsonProperty("chapterSource")]
|
||||
public object? ChapterSource { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the URL for a composite image for descendent items (e.g. photo albums or playlists).
|
||||
/// </summary>
|
||||
[JsonProperty("composite")]
|
||||
public object? Composite { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// If known, the content rating (e.g. MPAA) for an item.
|
||||
/// </summary>
|
||||
[JsonProperty("contentRating")]
|
||||
public object? ContentRating { get; set; }
|
||||
|
||||
[JsonProperty("Country")]
|
||||
public List<Tag>? Country { get; set; }
|
||||
|
||||
[JsonProperty("Director")]
|
||||
public List<Tag>? Director { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the duration for the item, in units of milliseconds.
|
||||
/// </summary>
|
||||
[JsonProperty("duration")]
|
||||
public long? Duration { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Typically only seen in metadata at a library's top level
|
||||
/// </summary>
|
||||
[JsonProperty("Filter")]
|
||||
public List<Filter>? Filter { get; set; }
|
||||
|
||||
[JsonProperty("Genre")]
|
||||
public List<Tag>? Genre { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `art` of the grandparent
|
||||
/// </summary>
|
||||
[JsonProperty("grandparentArt")]
|
||||
public string? GrandparentArt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `hero` of the grandparent
|
||||
/// </summary>
|
||||
[JsonProperty("grandparentHero")]
|
||||
public string? GrandparentHero { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `key` of the grandparent
|
||||
/// </summary>
|
||||
[JsonProperty("grandparentKey")]
|
||||
public string? GrandparentKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `ratingKey` of the grandparent
|
||||
/// </summary>
|
||||
[JsonProperty("grandparentRatingKey")]
|
||||
public string? GrandparentRatingKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `theme` of the grandparent
|
||||
/// </summary>
|
||||
[JsonProperty("grandparentTheme")]
|
||||
public string? GrandparentTheme { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `thumb` of the grandparent
|
||||
/// </summary>
|
||||
[JsonProperty("grandparentThumb")]
|
||||
public string? GrandparentThumb { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `title` of the grandparent
|
||||
/// </summary>
|
||||
[JsonProperty("grandparentTitle")]
|
||||
public string? GrandparentTitle { get; set; }
|
||||
|
||||
[JsonProperty("Guid")]
|
||||
public List<Tag>? Guid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the URL for a hero image for the item.
|
||||
/// </summary>
|
||||
[JsonProperty("hero")]
|
||||
public object? Hero { get; set; }
|
||||
|
||||
[JsonProperty("Image")]
|
||||
public List<Image>? Image { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks.
|
||||
/// </summary>
|
||||
[JsonProperty("index")]
|
||||
public long? Index { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
[JsonProperty("key")]
|
||||
public object? Key { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time.
|
||||
/// </summary>
|
||||
[JsonProperty("lastViewedAt")]
|
||||
public long? LastViewedAt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// For shows and seasons, contains the number of total episodes.
|
||||
/// </summary>
|
||||
[JsonProperty("leafCount")]
|
||||
public long? LeafCount { get; set; }
|
||||
|
||||
[JsonProperty("Media")]
|
||||
public List<Media>? Media { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
[JsonProperty("originallyAvailableAt")]
|
||||
public object? OriginallyAvailableAt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, used to indicate an item's original title, e.g. a movie's foreign title.
|
||||
/// </summary>
|
||||
[JsonProperty("originalTitle")]
|
||||
public object? OriginalTitle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `hero` of the parent
|
||||
/// </summary>
|
||||
[JsonProperty("parentHero")]
|
||||
public string? ParentHero { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `index` of the parent
|
||||
/// </summary>
|
||||
[JsonProperty("parentIndex")]
|
||||
public long? ParentIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `key` of the parent
|
||||
/// </summary>
|
||||
[JsonProperty("parentKey")]
|
||||
public string? ParentKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `ratingKey` of the parent
|
||||
/// </summary>
|
||||
[JsonProperty("parentRatingKey")]
|
||||
public string? ParentRatingKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `thumb` of the parent
|
||||
/// </summary>
|
||||
[JsonProperty("parentThumb")]
|
||||
public string? ParentThumb { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `title` of the parent
|
||||
/// </summary>
|
||||
[JsonProperty("parentTitle")]
|
||||
public string? ParentTitle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
[JsonProperty("primaryExtraKey")]
|
||||
public object? PrimaryExtraKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Prompt to give the user for this directory (such as `Search Movies`)
|
||||
/// </summary>
|
||||
[JsonProperty("prompt")]
|
||||
public string? Prompt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from.
|
||||
/// </summary>
|
||||
[JsonProperty("rating")]
|
||||
public double? Rating { get; set; }
|
||||
|
||||
[JsonProperty("Rating")]
|
||||
public List<Tag>? RatingArray { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Number of ratings under this metadata
|
||||
/// </summary>
|
||||
[JsonProperty("ratingCount")]
|
||||
public long? RatingCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
[JsonProperty("ratingImage")]
|
||||
public object? RatingImage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
[JsonProperty("ratingKey")]
|
||||
public object? RatingKey { get; set; }
|
||||
|
||||
[JsonProperty("Role")]
|
||||
public List<Tag>? Role { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates this is a search directory
|
||||
/// </summary>
|
||||
[JsonProperty("search")]
|
||||
public bool? Search { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Used by old clients to provide nested menus allowing for primative (but structured) navigation.
|
||||
/// </summary>
|
||||
[JsonProperty("secondary")]
|
||||
public bool? Secondary { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
[JsonProperty("skipChildren")]
|
||||
public bool? SkipChildren { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show).
|
||||
/// </summary>
|
||||
[JsonProperty("skipParent")]
|
||||
public bool? SkipParent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Typically only seen in metadata at a library's top level
|
||||
/// </summary>
|
||||
[JsonProperty("Sort")]
|
||||
public List<Sort>? Sort { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums).
|
||||
/// </summary>
|
||||
[JsonProperty("studio")]
|
||||
public object? Studio { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The subtype of the video item, such as `photo` when the video item is in a photo library
|
||||
/// </summary>
|
||||
[JsonProperty("subtype")]
|
||||
public object? Subtype { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the extended textual information about the item (e.g. movie plot, artist biography, album review).
|
||||
/// </summary>
|
||||
[JsonProperty("summary")]
|
||||
public object? Summary { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, a pithy one-liner about the item (usually only seen for movies).
|
||||
/// </summary>
|
||||
[JsonProperty("tagline")]
|
||||
public object? Tagline { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the URL for theme music for the item (usually only for TV shows).
|
||||
/// </summary>
|
||||
[JsonProperty("theme")]
|
||||
public object? Theme { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
[JsonProperty("thumb")]
|
||||
public object? Thumb { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”).
|
||||
/// </summary>
|
||||
[JsonProperty("titleSort")]
|
||||
public object? TitleSort { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated).
|
||||
/// </summary>
|
||||
[JsonProperty("updatedAt")]
|
||||
public long? UpdatedAt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When the user has rated an item, this contains the user rating
|
||||
/// </summary>
|
||||
[JsonProperty("userRating")]
|
||||
public double? UserRating { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When a users has completed watched or listened to an item, this attribute contains the number of consumptions.
|
||||
/// </summary>
|
||||
[JsonProperty("viewCount")]
|
||||
public long? ViewCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// For shows and seasons, contains the number of viewed episodes.
|
||||
/// </summary>
|
||||
[JsonProperty("viewedLeafCount")]
|
||||
public long? ViewedLeafCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds.
|
||||
/// </summary>
|
||||
[JsonProperty("viewOffset")]
|
||||
public long? ViewOffset { get; set; }
|
||||
|
||||
[JsonProperty("Writer")]
|
||||
public List<Tag>? Writer { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the year associated with the item's release (e.g. release year for a movie).
|
||||
/// </summary>
|
||||
[JsonProperty("year")]
|
||||
public long? Year { get; set; }
|
||||
|
||||
[JsonProperty("MetadataItem")]
|
||||
public List<Items>? MetadataItem { get; set; }
|
||||
|
||||
[JsonProperty("additionalProperties")]
|
||||
public Dictionary<string, object>? AdditionalProperties { get; set; }
|
||||
}
|
||||
}
|
||||
86
LukeHagar/PlexAPI/SDK/Models/Components/LibrarySection.cs
Normal file
86
LukeHagar/PlexAPI/SDK/Models/Components/LibrarySection.cs
Normal file
@@ -0,0 +1,86 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public class LibrarySection
|
||||
{
|
||||
|
||||
[JsonProperty("title")]
|
||||
public string? Title { get; set; }
|
||||
|
||||
[JsonProperty("type")]
|
||||
public string? Type { get; set; }
|
||||
|
||||
[JsonProperty("agent")]
|
||||
public string? Agent { get; set; }
|
||||
|
||||
[JsonProperty("allowSync")]
|
||||
public bool? AllowSync { get; set; }
|
||||
|
||||
[JsonProperty("art")]
|
||||
public string? Art { get; set; }
|
||||
|
||||
[JsonProperty("composite")]
|
||||
public string? Composite { get; set; }
|
||||
|
||||
[JsonProperty("content")]
|
||||
public bool? Content { get; set; }
|
||||
|
||||
[JsonProperty("contentChangedAt")]
|
||||
public long? ContentChangedAt { get; set; }
|
||||
|
||||
[JsonProperty("createdAt")]
|
||||
public long? CreatedAt { get; set; }
|
||||
|
||||
[JsonProperty("directory")]
|
||||
public bool? Directory { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates whether this section has filtering capabilities
|
||||
/// </summary>
|
||||
[JsonProperty("filters")]
|
||||
public bool? Filters { get; set; }
|
||||
|
||||
[JsonProperty("hidden")]
|
||||
public bool? Hidden { get; set; }
|
||||
|
||||
[JsonProperty("key")]
|
||||
public string? Key { get; set; }
|
||||
|
||||
[JsonProperty("language")]
|
||||
public string? Language { get; set; }
|
||||
|
||||
[JsonProperty("Location")]
|
||||
public List<LibrarySectionLocation>? Location { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates whether this library section is currently scanning
|
||||
/// </summary>
|
||||
[JsonProperty("refreshing")]
|
||||
public bool? Refreshing { get; set; }
|
||||
|
||||
[JsonProperty("scannedAt")]
|
||||
public long? ScannedAt { get; set; }
|
||||
|
||||
[JsonProperty("scanner")]
|
||||
public string? Scanner { get; set; }
|
||||
|
||||
[JsonProperty("thumb")]
|
||||
public string? Thumb { get; set; }
|
||||
|
||||
[JsonProperty("updatedAt")]
|
||||
public long? UpdatedAt { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a top-level location on disk where media in this library section is stored
|
||||
/// </summary>
|
||||
public class LibrarySectionLocation
|
||||
{
|
||||
|
||||
[JsonProperty("id")]
|
||||
public long? Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The path of where this directory exists on disk
|
||||
/// </summary>
|
||||
[JsonProperty("path")]
|
||||
public object? Path { get; set; }
|
||||
}
|
||||
}
|
||||
52
LukeHagar/PlexAPI/SDK/Models/Components/Lineup.cs
Normal file
52
LukeHagar/PlexAPI/SDK/Models/Components/Lineup.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
public class Lineup
|
||||
{
|
||||
|
||||
[JsonProperty("title")]
|
||||
public string? Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The type of this object (`lineup` in this case)
|
||||
/// </summary>
|
||||
[JsonProperty("type")]
|
||||
public string? Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// - `-1`: N/A<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
/// - `0`: Over the air<br/>
|
||||
/// - `1`: Cable<br/>
|
||||
/// - `2`: Satellite<br/>
|
||||
/// - `3`: IPTV<br/>
|
||||
/// - `4`: Virtual<br/>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("lineupType")]
|
||||
public Models.Components.LineupType? LineupType { get; set; }
|
||||
|
||||
[JsonProperty("location")]
|
||||
public string? Location { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The uuid of this lineup
|
||||
/// </summary>
|
||||
[JsonProperty("uuid")]
|
||||
public string? Uuid { get; set; }
|
||||
}
|
||||
}
|
||||
36
LukeHagar/PlexAPI/SDK/Models/Components/LineupType.cs
Normal file
36
LukeHagar/PlexAPI/SDK/Models/Components/LineupType.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
|
||||
/// <summary>
|
||||
/// - `-1`: N/A<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
/// - `0`: Over the air<br/>
|
||||
/// - `1`: Cable<br/>
|
||||
/// - `2`: Satellite<br/>
|
||||
/// - `3`: IPTV<br/>
|
||||
/// - `4`: Virtual<br/>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
public enum LineupType
|
||||
{
|
||||
Minus1 = -1,
|
||||
Zero = 0,
|
||||
One = 1,
|
||||
Two = 2,
|
||||
Three = 3,
|
||||
Four = 4,
|
||||
}
|
||||
|
||||
}
|
||||
59
LukeHagar/PlexAPI/SDK/Models/Components/Location.cs
Normal file
59
LukeHagar/PlexAPI/SDK/Models/Components/Location.cs
Normal file
@@ -0,0 +1,59 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
|
||||
public enum Location
|
||||
{
|
||||
[JsonProperty("lan")]
|
||||
Lan,
|
||||
[JsonProperty("wan")]
|
||||
Wan,
|
||||
[JsonProperty("cellular")]
|
||||
Cellular,
|
||||
}
|
||||
|
||||
public static class LocationExtension
|
||||
{
|
||||
public static string Value(this Location value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static Location ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(Location).GetFields())
|
||||
{
|
||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
||||
if (attributes.Length == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var attribute = attributes[0] as JsonPropertyAttribute;
|
||||
if (attribute != null && attribute.PropertyName == value)
|
||||
{
|
||||
var enumVal = field.GetValue(null);
|
||||
|
||||
if (enumVal is Location)
|
||||
{
|
||||
return (Location)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum Location");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
84
LukeHagar/PlexAPI/SDK/Models/Components/Media.cs
Normal file
84
LukeHagar/PlexAPI/SDK/Models/Components/Media.cs
Normal file
@@ -0,0 +1,84 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
/// <summary>
|
||||
/// `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.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
public class Media
|
||||
{
|
||||
|
||||
[JsonProperty("aspectRatio")]
|
||||
public double? AspectRatio { get; set; }
|
||||
|
||||
[JsonProperty("audioChannels")]
|
||||
public long? AudioChannels { get; set; }
|
||||
|
||||
[JsonProperty("audioCodec")]
|
||||
public object? AudioCodec { get; set; }
|
||||
|
||||
[JsonProperty("audioProfile")]
|
||||
public object? AudioProfile { get; set; }
|
||||
|
||||
[JsonProperty("bitrate")]
|
||||
public long? Bitrate { get; set; }
|
||||
|
||||
[JsonProperty("container")]
|
||||
public object? Container { get; set; }
|
||||
|
||||
[JsonProperty("duration")]
|
||||
public long? Duration { get; set; }
|
||||
|
||||
[JsonProperty("has64bitOffsets")]
|
||||
public bool? Has64bitOffsets { get; set; }
|
||||
|
||||
[JsonProperty("hasVoiceActivity")]
|
||||
public bool? HasVoiceActivity { get; set; }
|
||||
|
||||
[JsonProperty("height")]
|
||||
public long? Height { get; set; }
|
||||
|
||||
[JsonProperty("id")]
|
||||
public long? Id { get; set; }
|
||||
|
||||
[JsonProperty("optimizedForStreaming")]
|
||||
public bool? OptimizedForStreaming { get; set; }
|
||||
|
||||
[JsonProperty("Part")]
|
||||
public List<Part>? Part { get; set; }
|
||||
|
||||
[JsonProperty("videoCodec")]
|
||||
public object? VideoCodec { get; set; }
|
||||
|
||||
[JsonProperty("videoFrameRate")]
|
||||
public object? VideoFrameRate { get; set; }
|
||||
|
||||
[JsonProperty("videoProfile")]
|
||||
public object? VideoProfile { get; set; }
|
||||
|
||||
[JsonProperty("videoResolution")]
|
||||
public object? VideoResolution { get; set; }
|
||||
|
||||
[JsonProperty("width")]
|
||||
public long? Width { get; set; }
|
||||
|
||||
[JsonProperty("additionalProperties")]
|
||||
public Dictionary<string, object>? AdditionalProperties { get; set; }
|
||||
}
|
||||
}
|
||||
53
LukeHagar/PlexAPI/SDK/Models/Components/MediaContainer.cs
Normal file
53
LukeHagar/PlexAPI/SDK/Models/Components/MediaContainer.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
/// <summary>
|
||||
/// `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.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
/// 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)<br/>
|
||||
/// 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.<br/>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
public class MediaContainer
|
||||
{
|
||||
|
||||
[JsonProperty("identifier")]
|
||||
public string? Identifier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("offset")]
|
||||
public long? Offset { get; set; }
|
||||
|
||||
[JsonProperty("size")]
|
||||
public long? Size { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("totalSize")]
|
||||
public long? TotalSize { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
public class MediaContainerWithArtwork
|
||||
{
|
||||
|
||||
[JsonProperty("MediaContainer")]
|
||||
public MediaContainerWithArtworkMediaContainer? MediaContainer { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
/// <summary>
|
||||
/// `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.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
/// 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)<br/>
|
||||
/// 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.<br/>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
public class MediaContainerWithArtworkMediaContainer
|
||||
{
|
||||
|
||||
[JsonProperty("identifier")]
|
||||
public string? Identifier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("offset")]
|
||||
public long? Offset { get; set; }
|
||||
|
||||
[JsonProperty("size")]
|
||||
public long? Size { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("totalSize")]
|
||||
public long? TotalSize { get; set; }
|
||||
|
||||
[JsonProperty("Metadata")]
|
||||
public List<MediaContainerWithArtworkMetadata>? Metadata { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public class MediaContainerWithArtworkMetadata
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// The title of the item
|
||||
/// </summary>
|
||||
[JsonProperty("title")]
|
||||
public string? Title { get; set; }
|
||||
|
||||
[JsonProperty("type")]
|
||||
public MediaContainerWithArtworkType? Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The path to the artwork
|
||||
/// </summary>
|
||||
[JsonProperty("key")]
|
||||
public string? Key { get; set; }
|
||||
|
||||
[JsonProperty("additionalProperties")]
|
||||
public Dictionary<string, object>? AdditionalProperties { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
|
||||
public enum MediaContainerWithArtworkType
|
||||
{
|
||||
[JsonProperty("image")]
|
||||
Image,
|
||||
}
|
||||
|
||||
public static class MediaContainerWithArtworkTypeExtension
|
||||
{
|
||||
public static string Value(this MediaContainerWithArtworkType value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static MediaContainerWithArtworkType ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(MediaContainerWithArtworkType).GetFields())
|
||||
{
|
||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
||||
if (attributes.Length == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var attribute = attributes[0] as JsonPropertyAttribute;
|
||||
if (attribute != null && attribute.PropertyName == value)
|
||||
{
|
||||
var enumVal = field.GetValue(null);
|
||||
|
||||
if (enumVal is MediaContainerWithArtworkType)
|
||||
{
|
||||
return (MediaContainerWithArtworkType)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum MediaContainerWithArtworkType");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
/// <summary>
|
||||
/// `MediaContainer` is commonly found as the root of a response and is a pretty generic container. Common attributes include `identifier` and things related to paging (`offset`, `size`, `totalSize`).<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
/// <br/>
|
||||
/// It is also common for a `MediaContainer` to contain attributes "hoisted" from its children. If every element in the container would have had the same attribute, then that attribute can be present on the container instead of being repeated on every element. For example, an album's list of tracks might include `parentTitle` on the container since all of the tracks have the same album title. A container may have a `source` attribute when all of the items came from the same source. Generally speaking, when looking for an attribute on an item, if the attribute wasn't found then the container should be checked for that attribute as well.<br/>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
public class MediaContainerWithDecision
|
||||
{
|
||||
|
||||
[JsonProperty("MediaContainer")]
|
||||
public MediaContainerWithDecisionMediaContainer? MediaContainer { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
|
||||
public enum MediaContainerWithDecisionDecision
|
||||
{
|
||||
[JsonProperty("copy")]
|
||||
Copy,
|
||||
[JsonProperty("transcode")]
|
||||
Transcode,
|
||||
[JsonProperty("burn")]
|
||||
Burn,
|
||||
[JsonProperty("unavailable")]
|
||||
Unavailable,
|
||||
[JsonProperty("ignore")]
|
||||
Ignore,
|
||||
[JsonProperty("none")]
|
||||
None,
|
||||
}
|
||||
|
||||
public static class MediaContainerWithDecisionDecisionExtension
|
||||
{
|
||||
public static string Value(this MediaContainerWithDecisionDecision value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static MediaContainerWithDecisionDecision ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(MediaContainerWithDecisionDecision).GetFields())
|
||||
{
|
||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
||||
if (attributes.Length == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var attribute = attributes[0] as JsonPropertyAttribute;
|
||||
if (attribute != null && attribute.PropertyName == value)
|
||||
{
|
||||
var enumVal = field.GetValue(null);
|
||||
|
||||
if (enumVal is MediaContainerWithDecisionDecision)
|
||||
{
|
||||
return (MediaContainerWithDecisionDecision)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum MediaContainerWithDecisionDecision");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
|
||||
public enum MediaContainerWithDecisionLocation
|
||||
{
|
||||
[JsonProperty("direct")]
|
||||
Direct,
|
||||
[JsonProperty("sidecar-subs")]
|
||||
SidecarSubs,
|
||||
[JsonProperty("segments-video")]
|
||||
SegmentsVideo,
|
||||
[JsonProperty("segments-audio")]
|
||||
SegmentsAudio,
|
||||
[JsonProperty("segments-av")]
|
||||
SegmentsAv,
|
||||
[JsonProperty("segments-subs")]
|
||||
SegmentsSubs,
|
||||
[JsonProperty("embedded")]
|
||||
Embedded,
|
||||
[JsonProperty("sidecar")]
|
||||
Sidecar,
|
||||
}
|
||||
|
||||
public static class MediaContainerWithDecisionLocationExtension
|
||||
{
|
||||
public static string Value(this MediaContainerWithDecisionLocation value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static MediaContainerWithDecisionLocation ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(MediaContainerWithDecisionLocation).GetFields())
|
||||
{
|
||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
||||
if (attributes.Length == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var attribute = attributes[0] as JsonPropertyAttribute;
|
||||
if (attribute != null && attribute.PropertyName == value)
|
||||
{
|
||||
var enumVal = field.GetValue(null);
|
||||
|
||||
if (enumVal is MediaContainerWithDecisionLocation)
|
||||
{
|
||||
return (MediaContainerWithDecisionLocation)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum MediaContainerWithDecisionLocation");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
/// <summary>
|
||||
/// `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.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
public class MediaContainerWithDecisionMedia
|
||||
{
|
||||
|
||||
[JsonProperty("aspectRatio")]
|
||||
public double? AspectRatio { get; set; }
|
||||
|
||||
[JsonProperty("audioChannels")]
|
||||
public long? AudioChannels { get; set; }
|
||||
|
||||
[JsonProperty("audioCodec")]
|
||||
public object? AudioCodec { get; set; }
|
||||
|
||||
[JsonProperty("audioProfile")]
|
||||
public object? AudioProfile { get; set; }
|
||||
|
||||
[JsonProperty("bitrate")]
|
||||
public long? Bitrate { get; set; }
|
||||
|
||||
[JsonProperty("container")]
|
||||
public object? Container { get; set; }
|
||||
|
||||
[JsonProperty("duration")]
|
||||
public long? Duration { get; set; }
|
||||
|
||||
[JsonProperty("has64bitOffsets")]
|
||||
public bool? Has64bitOffsets { get; set; }
|
||||
|
||||
[JsonProperty("hasVoiceActivity")]
|
||||
public bool? HasVoiceActivity { get; set; }
|
||||
|
||||
[JsonProperty("height")]
|
||||
public long? Height { get; set; }
|
||||
|
||||
[JsonProperty("id")]
|
||||
public long? Id { get; set; }
|
||||
|
||||
[JsonProperty("optimizedForStreaming")]
|
||||
public bool? OptimizedForStreaming { get; set; }
|
||||
|
||||
[JsonProperty("Part")]
|
||||
public List<MediaContainerWithDecisionPart>? Part { get; set; }
|
||||
|
||||
[JsonProperty("videoCodec")]
|
||||
public object? VideoCodec { get; set; }
|
||||
|
||||
[JsonProperty("videoFrameRate")]
|
||||
public object? VideoFrameRate { get; set; }
|
||||
|
||||
[JsonProperty("videoProfile")]
|
||||
public object? VideoProfile { get; set; }
|
||||
|
||||
[JsonProperty("videoResolution")]
|
||||
public object? VideoResolution { get; set; }
|
||||
|
||||
[JsonProperty("width")]
|
||||
public long? Width { get; set; }
|
||||
|
||||
[JsonProperty("abr")]
|
||||
public bool? Abr { get; set; }
|
||||
|
||||
[JsonProperty("resourceSession")]
|
||||
public string? ResourceSession { get; set; }
|
||||
|
||||
[JsonProperty("selected")]
|
||||
public bool? Selected { get; set; }
|
||||
|
||||
[JsonProperty("additionalProperties")]
|
||||
public Dictionary<string, object>? AdditionalProperties { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
/// <summary>
|
||||
/// `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.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
/// 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)<br/>
|
||||
/// 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.<br/>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
public class MediaContainerWithDecisionMediaContainer
|
||||
{
|
||||
|
||||
[JsonProperty("identifier")]
|
||||
public string? Identifier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("offset")]
|
||||
public long? Offset { get; set; }
|
||||
|
||||
[JsonProperty("size")]
|
||||
public long? Size { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("totalSize")]
|
||||
public long? TotalSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The maximum available bitrate when the decision was rendered.
|
||||
/// </summary>
|
||||
[JsonProperty("availableBandwidth")]
|
||||
public long? AvailableBandwidth { get; set; }
|
||||
|
||||
[JsonProperty("directPlayDecisionCode")]
|
||||
public long? DirectPlayDecisionCode { get; set; }
|
||||
|
||||
[JsonProperty("directPlayDecisionText")]
|
||||
public string? DirectPlayDecisionText { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The overall decision. 1xxx are playback can succeed, 2xxx are a general error (such as insufficient bandwidth), 3xxx are errors in direct play, and 4xxx are errors in transcodes. Same codes are used in all.
|
||||
/// </summary>
|
||||
[JsonProperty("generalDecisionCode")]
|
||||
public long? GeneralDecisionCode { get; set; }
|
||||
|
||||
[JsonProperty("generalDecisionText")]
|
||||
public string? GeneralDecisionText { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The code indicating the status of evaluation of playback when client indicates `hasMDE=1`
|
||||
/// </summary>
|
||||
[JsonProperty("mdeDecisionCode")]
|
||||
public long? MdeDecisionCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Descriptive text for the above code
|
||||
/// </summary>
|
||||
[JsonProperty("mdeDecisionText")]
|
||||
public string? MdeDecisionText { get; set; }
|
||||
|
||||
[JsonProperty("Metadata")]
|
||||
public List<MediaContainerWithDecisionMetadata>? Metadata { get; set; }
|
||||
|
||||
[JsonProperty("transcodeDecisionCode")]
|
||||
public long? TranscodeDecisionCode { get; set; }
|
||||
|
||||
[JsonProperty("transcodeDecisionText")]
|
||||
public string? TranscodeDecisionText { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,406 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
/// <summary>
|
||||
/// 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.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
/// <br/>
|
||||
/// 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.<br/>
|
||||
/// <br/>
|
||||
/// 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.<br/>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
public class MediaContainerWithDecisionMetadata
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// The title of the item (e.g. “300” or “The Simpsons”)
|
||||
/// </summary>
|
||||
[JsonProperty("title")]
|
||||
public object? Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The type of the video item, such as `movie`, `episode`, or `clip`.
|
||||
/// </summary>
|
||||
[JsonProperty("type")]
|
||||
public object? Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, contains the disc number for a track on multi-disc albums.
|
||||
/// </summary>
|
||||
[JsonProperty("absoluteIndex")]
|
||||
public long? AbsoluteIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// In units of seconds since the epoch, returns the time at which the item was added to the library.
|
||||
/// </summary>
|
||||
[JsonProperty("addedAt")]
|
||||
public long? AddedAt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the URL for the background artwork for the item.
|
||||
/// </summary>
|
||||
[JsonProperty("art")]
|
||||
public object? Art { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Some rating systems separate reviewer ratings from audience ratings
|
||||
/// </summary>
|
||||
[JsonProperty("audienceRating")]
|
||||
public double? AudienceRating { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled).
|
||||
/// </summary>
|
||||
[JsonProperty("audienceRatingImage")]
|
||||
public object? AudienceRatingImage { get; set; }
|
||||
|
||||
[JsonProperty("Autotag")]
|
||||
public List<Tag>? Autotag { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the URL for a banner graphic for the item.
|
||||
/// </summary>
|
||||
[JsonProperty("banner")]
|
||||
public object? Banner { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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).
|
||||
/// </summary>
|
||||
[JsonProperty("chapterSource")]
|
||||
public object? ChapterSource { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the URL for a composite image for descendent items (e.g. photo albums or playlists).
|
||||
/// </summary>
|
||||
[JsonProperty("composite")]
|
||||
public object? Composite { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// If known, the content rating (e.g. MPAA) for an item.
|
||||
/// </summary>
|
||||
[JsonProperty("contentRating")]
|
||||
public object? ContentRating { get; set; }
|
||||
|
||||
[JsonProperty("Country")]
|
||||
public List<Tag>? Country { get; set; }
|
||||
|
||||
[JsonProperty("Director")]
|
||||
public List<Tag>? Director { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the duration for the item, in units of milliseconds.
|
||||
/// </summary>
|
||||
[JsonProperty("duration")]
|
||||
public long? Duration { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Typically only seen in metadata at a library's top level
|
||||
/// </summary>
|
||||
[JsonProperty("Filter")]
|
||||
public List<Filter>? Filter { get; set; }
|
||||
|
||||
[JsonProperty("Genre")]
|
||||
public List<Tag>? Genre { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `art` of the grandparent
|
||||
/// </summary>
|
||||
[JsonProperty("grandparentArt")]
|
||||
public string? GrandparentArt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `hero` of the grandparent
|
||||
/// </summary>
|
||||
[JsonProperty("grandparentHero")]
|
||||
public string? GrandparentHero { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `key` of the grandparent
|
||||
/// </summary>
|
||||
[JsonProperty("grandparentKey")]
|
||||
public string? GrandparentKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `ratingKey` of the grandparent
|
||||
/// </summary>
|
||||
[JsonProperty("grandparentRatingKey")]
|
||||
public string? GrandparentRatingKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `theme` of the grandparent
|
||||
/// </summary>
|
||||
[JsonProperty("grandparentTheme")]
|
||||
public string? GrandparentTheme { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `thumb` of the grandparent
|
||||
/// </summary>
|
||||
[JsonProperty("grandparentThumb")]
|
||||
public string? GrandparentThumb { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `title` of the grandparent
|
||||
/// </summary>
|
||||
[JsonProperty("grandparentTitle")]
|
||||
public string? GrandparentTitle { get; set; }
|
||||
|
||||
[JsonProperty("Guid")]
|
||||
public List<Tag>? Guid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the URL for a hero image for the item.
|
||||
/// </summary>
|
||||
[JsonProperty("hero")]
|
||||
public object? Hero { get; set; }
|
||||
|
||||
[JsonProperty("Image")]
|
||||
public List<Image>? Image { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks.
|
||||
/// </summary>
|
||||
[JsonProperty("index")]
|
||||
public long? Index { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
[JsonProperty("key")]
|
||||
public object? Key { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time.
|
||||
/// </summary>
|
||||
[JsonProperty("lastViewedAt")]
|
||||
public long? LastViewedAt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// For shows and seasons, contains the number of total episodes.
|
||||
/// </summary>
|
||||
[JsonProperty("leafCount")]
|
||||
public long? LeafCount { get; set; }
|
||||
|
||||
[JsonProperty("Media")]
|
||||
public List<MediaContainerWithDecisionMedia>? Media { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
[JsonProperty("originallyAvailableAt")]
|
||||
public object? OriginallyAvailableAt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, used to indicate an item's original title, e.g. a movie's foreign title.
|
||||
/// </summary>
|
||||
[JsonProperty("originalTitle")]
|
||||
public object? OriginalTitle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `hero` of the parent
|
||||
/// </summary>
|
||||
[JsonProperty("parentHero")]
|
||||
public string? ParentHero { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `index` of the parent
|
||||
/// </summary>
|
||||
[JsonProperty("parentIndex")]
|
||||
public long? ParentIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `key` of the parent
|
||||
/// </summary>
|
||||
[JsonProperty("parentKey")]
|
||||
public string? ParentKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `ratingKey` of the parent
|
||||
/// </summary>
|
||||
[JsonProperty("parentRatingKey")]
|
||||
public string? ParentRatingKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `thumb` of the parent
|
||||
/// </summary>
|
||||
[JsonProperty("parentThumb")]
|
||||
public string? ParentThumb { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `title` of the parent
|
||||
/// </summary>
|
||||
[JsonProperty("parentTitle")]
|
||||
public string? ParentTitle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
[JsonProperty("primaryExtraKey")]
|
||||
public object? PrimaryExtraKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Prompt to give the user for this directory (such as `Search Movies`)
|
||||
/// </summary>
|
||||
[JsonProperty("prompt")]
|
||||
public string? Prompt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from.
|
||||
/// </summary>
|
||||
[JsonProperty("rating")]
|
||||
public double? Rating { get; set; }
|
||||
|
||||
[JsonProperty("Rating")]
|
||||
public List<Tag>? RatingArray { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Number of ratings under this metadata
|
||||
/// </summary>
|
||||
[JsonProperty("ratingCount")]
|
||||
public long? RatingCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
[JsonProperty("ratingImage")]
|
||||
public object? RatingImage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
[JsonProperty("ratingKey")]
|
||||
public object? RatingKey { get; set; }
|
||||
|
||||
[JsonProperty("Role")]
|
||||
public List<Tag>? Role { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates this is a search directory
|
||||
/// </summary>
|
||||
[JsonProperty("search")]
|
||||
public bool? Search { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Used by old clients to provide nested menus allowing for primative (but structured) navigation.
|
||||
/// </summary>
|
||||
[JsonProperty("secondary")]
|
||||
public bool? Secondary { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
[JsonProperty("skipChildren")]
|
||||
public bool? SkipChildren { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show).
|
||||
/// </summary>
|
||||
[JsonProperty("skipParent")]
|
||||
public bool? SkipParent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Typically only seen in metadata at a library's top level
|
||||
/// </summary>
|
||||
[JsonProperty("Sort")]
|
||||
public List<Sort>? Sort { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums).
|
||||
/// </summary>
|
||||
[JsonProperty("studio")]
|
||||
public object? Studio { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The subtype of the video item, such as `photo` when the video item is in a photo library
|
||||
/// </summary>
|
||||
[JsonProperty("subtype")]
|
||||
public object? Subtype { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the extended textual information about the item (e.g. movie plot, artist biography, album review).
|
||||
/// </summary>
|
||||
[JsonProperty("summary")]
|
||||
public object? Summary { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, a pithy one-liner about the item (usually only seen for movies).
|
||||
/// </summary>
|
||||
[JsonProperty("tagline")]
|
||||
public object? Tagline { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the URL for theme music for the item (usually only for TV shows).
|
||||
/// </summary>
|
||||
[JsonProperty("theme")]
|
||||
public object? Theme { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
[JsonProperty("thumb")]
|
||||
public object? Thumb { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”).
|
||||
/// </summary>
|
||||
[JsonProperty("titleSort")]
|
||||
public object? TitleSort { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated).
|
||||
/// </summary>
|
||||
[JsonProperty("updatedAt")]
|
||||
public long? UpdatedAt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When the user has rated an item, this contains the user rating
|
||||
/// </summary>
|
||||
[JsonProperty("userRating")]
|
||||
public double? UserRating { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When a users has completed watched or listened to an item, this attribute contains the number of consumptions.
|
||||
/// </summary>
|
||||
[JsonProperty("viewCount")]
|
||||
public long? ViewCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// For shows and seasons, contains the number of viewed episodes.
|
||||
/// </summary>
|
||||
[JsonProperty("viewedLeafCount")]
|
||||
public long? ViewedLeafCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds.
|
||||
/// </summary>
|
||||
[JsonProperty("viewOffset")]
|
||||
public long? ViewOffset { get; set; }
|
||||
|
||||
[JsonProperty("Writer")]
|
||||
public List<Tag>? Writer { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the year associated with the item's release (e.g. release year for a movie).
|
||||
/// </summary>
|
||||
[JsonProperty("year")]
|
||||
public long? Year { get; set; }
|
||||
|
||||
[JsonProperty("additionalProperties")]
|
||||
public Dictionary<string, object>? AdditionalProperties { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
/// <summary>
|
||||
/// `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.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
public class MediaContainerWithDecisionPart
|
||||
{
|
||||
|
||||
[JsonProperty("audioProfile")]
|
||||
public object? AudioProfile { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The container of the media file, such as `mp4` or `mkv`
|
||||
/// </summary>
|
||||
[JsonProperty("container")]
|
||||
public object? Container { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The duration of the media item, in milliseconds
|
||||
/// </summary>
|
||||
[JsonProperty("duration")]
|
||||
public long? Duration { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The local file path at which the part is stored on the server
|
||||
/// </summary>
|
||||
[JsonProperty("file")]
|
||||
public object? File { get; set; }
|
||||
|
||||
[JsonProperty("has64bitOffsets")]
|
||||
public bool? Has64bitOffsets { get; set; }
|
||||
|
||||
[JsonProperty("id")]
|
||||
public long? Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The key from which the media can be streamed
|
||||
/// </summary>
|
||||
[JsonProperty("key")]
|
||||
public object? Key { get; set; }
|
||||
|
||||
[JsonProperty("optimizedForStreaming")]
|
||||
public bool? OptimizedForStreaming { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The size of the media, in bytes
|
||||
/// </summary>
|
||||
[JsonProperty("size")]
|
||||
public long? Size { get; set; }
|
||||
|
||||
[JsonProperty("Stream")]
|
||||
public List<MediaContainerWithDecisionStream>? Stream { get; set; }
|
||||
|
||||
[JsonProperty("videoProfile")]
|
||||
public object? VideoProfile { get; set; }
|
||||
|
||||
[JsonProperty("decision")]
|
||||
public Decision? Decision { get; set; }
|
||||
|
||||
[JsonProperty("selected")]
|
||||
public bool? Selected { get; set; }
|
||||
|
||||
[JsonProperty("additionalProperties")]
|
||||
public Dictionary<string, object>? AdditionalProperties { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,144 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
/// <summary>
|
||||
/// `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).<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
public class MediaContainerWithDecisionStream
|
||||
{
|
||||
|
||||
[JsonProperty("default")]
|
||||
public bool? Default { get; set; }
|
||||
|
||||
[JsonProperty("audioChannelLayout")]
|
||||
public object? AudioChannelLayout { get; set; }
|
||||
|
||||
[JsonProperty("bitDepth")]
|
||||
public long? BitDepth { get; set; }
|
||||
|
||||
[JsonProperty("bitrate")]
|
||||
public long? Bitrate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// For subtitle streams only. If `true` then the server can attempt to automatically sync the subtitle timestamps with the video.
|
||||
/// </summary>
|
||||
[JsonProperty("canAutoSync")]
|
||||
public bool? CanAutoSync { get; set; }
|
||||
|
||||
[JsonProperty("chromaLocation")]
|
||||
public object? ChromaLocation { get; set; }
|
||||
|
||||
[JsonProperty("chromaSubsampling")]
|
||||
public object? ChromaSubsampling { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The codec of the stream, such as `h264` or `aac`
|
||||
/// </summary>
|
||||
[JsonProperty("codec")]
|
||||
public object? Codec { get; set; }
|
||||
|
||||
[JsonProperty("colorPrimaries")]
|
||||
public object? ColorPrimaries { get; set; }
|
||||
|
||||
[JsonProperty("colorRange")]
|
||||
public object? ColorRange { get; set; }
|
||||
|
||||
[JsonProperty("colorSpace")]
|
||||
public object? ColorSpace { get; set; }
|
||||
|
||||
[JsonProperty("colorTrc")]
|
||||
public object? ColorTrc { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A friendly name for the stream, often comprised of the language and codec information
|
||||
/// </summary>
|
||||
[JsonProperty("displayTitle")]
|
||||
public object? DisplayTitle { get; set; }
|
||||
|
||||
[JsonProperty("frameRate")]
|
||||
public double? FrameRate { get; set; }
|
||||
|
||||
[JsonProperty("hasScalingMatrix")]
|
||||
public object? HasScalingMatrix { get; set; }
|
||||
|
||||
[JsonProperty("height")]
|
||||
public long? Height { get; set; }
|
||||
|
||||
[JsonProperty("id")]
|
||||
public long? Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// If the stream is part of the `Part` and not an external resource, the index of the stream within that part
|
||||
/// </summary>
|
||||
[JsonProperty("index")]
|
||||
public long? Index { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// If the stream is independently streamable, the key from which it can be streamed
|
||||
/// </summary>
|
||||
[JsonProperty("key")]
|
||||
public object? Key { get; set; }
|
||||
|
||||
[JsonProperty("language")]
|
||||
public object? Language { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The three character language code for the stream contents
|
||||
/// </summary>
|
||||
[JsonProperty("languageCode")]
|
||||
public object? LanguageCode { get; set; }
|
||||
|
||||
[JsonProperty("level")]
|
||||
public long? Level { get; set; }
|
||||
|
||||
[JsonProperty("profile")]
|
||||
public object? Profile { get; set; }
|
||||
|
||||
[JsonProperty("refFrames")]
|
||||
public long? RefFrames { get; set; }
|
||||
|
||||
[JsonProperty("samplingRate")]
|
||||
public long? SamplingRate { get; set; }
|
||||
|
||||
[JsonProperty("selected")]
|
||||
public bool? Selected { get; set; }
|
||||
|
||||
[JsonProperty("streamIdentifier")]
|
||||
public long? StreamIdentifier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A number indicating the type of the stream. `1` for video, `2` for audio, `3` for subtitles, `4` for lyrics
|
||||
/// </summary>
|
||||
[JsonProperty("streamType")]
|
||||
public long? StreamType { get; set; }
|
||||
|
||||
[JsonProperty("width")]
|
||||
public long? Width { get; set; }
|
||||
|
||||
[JsonProperty("decision")]
|
||||
public MediaContainerWithDecisionDecision? Decision { get; set; }
|
||||
|
||||
[JsonProperty("location")]
|
||||
public MediaContainerWithDecisionLocation? Location { get; set; }
|
||||
|
||||
[JsonProperty("additionalProperties")]
|
||||
public Dictionary<string, object>? AdditionalProperties { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
public class MediaContainerWithDevice
|
||||
{
|
||||
|
||||
[JsonProperty("MediaContainer")]
|
||||
public MediaContainerWithDeviceMediaContainer? MediaContainer { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public class MediaContainerWithDeviceDevice
|
||||
{
|
||||
|
||||
[JsonProperty("ChannelMapping")]
|
||||
public List<Models.Components.ChannelMapping>? ChannelMapping { get; set; }
|
||||
|
||||
[JsonProperty("key")]
|
||||
public string? Key { get; set; }
|
||||
|
||||
[JsonProperty("lastSeenAt")]
|
||||
public long? LastSeenAt { get; set; }
|
||||
|
||||
[JsonProperty("make")]
|
||||
public string? Make { get; set; }
|
||||
|
||||
[JsonProperty("model")]
|
||||
public string? Model { get; set; }
|
||||
|
||||
[JsonProperty("modelNumber")]
|
||||
public string? ModelNumber { get; set; }
|
||||
|
||||
[JsonProperty("protocol")]
|
||||
public string? Protocol { get; set; }
|
||||
|
||||
[JsonProperty("sources")]
|
||||
public string? Sources { get; set; }
|
||||
|
||||
[JsonProperty("state")]
|
||||
public string? State { get; set; }
|
||||
|
||||
[JsonProperty("status")]
|
||||
public string? Status { get; set; }
|
||||
|
||||
[JsonProperty("tuners")]
|
||||
public string? Tuners { get; set; }
|
||||
|
||||
[JsonProperty("uri")]
|
||||
public string? Uri { get; set; }
|
||||
|
||||
[JsonProperty("uuid")]
|
||||
public string? Uuid { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
/// <summary>
|
||||
/// `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.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
/// 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)<br/>
|
||||
/// 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.<br/>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
public class MediaContainerWithDeviceMediaContainer
|
||||
{
|
||||
|
||||
[JsonProperty("identifier")]
|
||||
public string? Identifier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("offset")]
|
||||
public long? Offset { get; set; }
|
||||
|
||||
[JsonProperty("size")]
|
||||
public long? Size { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("totalSize")]
|
||||
public long? TotalSize { get; set; }
|
||||
|
||||
[JsonProperty("Device")]
|
||||
public List<MediaContainerWithDeviceDevice>? Device { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
public class MediaContainerWithDirectory
|
||||
{
|
||||
|
||||
[JsonProperty("MediaContainer")]
|
||||
public MediaContainerWithDirectoryMediaContainer? MediaContainer { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
/// <summary>
|
||||
/// `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.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
/// 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)<br/>
|
||||
/// 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.<br/>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
public class MediaContainerWithDirectoryMediaContainer
|
||||
{
|
||||
|
||||
[JsonProperty("identifier")]
|
||||
public string? Identifier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("offset")]
|
||||
public long? Offset { get; set; }
|
||||
|
||||
[JsonProperty("size")]
|
||||
public long? Size { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("totalSize")]
|
||||
public long? TotalSize { get; set; }
|
||||
|
||||
[JsonProperty("Directory")]
|
||||
public List<Models.Components.Directory>? Directory { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
/// <summary>
|
||||
/// OK
|
||||
/// </summary>
|
||||
public class MediaContainerWithHubs
|
||||
{
|
||||
|
||||
[JsonProperty("MediaContainer")]
|
||||
public MediaContainerWithHubsMediaContainer? MediaContainer { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
/// <summary>
|
||||
/// `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.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
/// 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)<br/>
|
||||
/// 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.<br/>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
public class MediaContainerWithHubsMediaContainer
|
||||
{
|
||||
|
||||
[JsonProperty("identifier")]
|
||||
public string? Identifier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("offset")]
|
||||
public long? Offset { get; set; }
|
||||
|
||||
[JsonProperty("size")]
|
||||
public long? Size { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("totalSize")]
|
||||
public long? TotalSize { get; set; }
|
||||
|
||||
[JsonProperty("Hub")]
|
||||
public List<Models.Components.Hub>? Hub { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
public class MediaContainerWithLineup
|
||||
{
|
||||
|
||||
[JsonProperty("MediaContainer")]
|
||||
public MediaContainerWithLineupMediaContainer? MediaContainer { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
/// <summary>
|
||||
/// `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.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
/// 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)<br/>
|
||||
/// 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.<br/>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
public class MediaContainerWithLineupMediaContainer
|
||||
{
|
||||
|
||||
[JsonProperty("identifier")]
|
||||
public string? Identifier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("offset")]
|
||||
public long? Offset { get; set; }
|
||||
|
||||
[JsonProperty("size")]
|
||||
public long? Size { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("totalSize")]
|
||||
public long? TotalSize { get; set; }
|
||||
|
||||
[JsonProperty("Lineup")]
|
||||
public List<Models.Components.Lineup>? Lineup { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The UUID of this set lineups
|
||||
/// </summary>
|
||||
[JsonProperty("uuid")]
|
||||
public string? Uuid { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
public class MediaContainerWithMetadata
|
||||
{
|
||||
|
||||
[JsonProperty("MediaContainer")]
|
||||
public MediaContainerWithMetadataMediaContainer? MediaContainer { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
/// <summary>
|
||||
/// `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.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
/// 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)<br/>
|
||||
/// 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.<br/>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
public class MediaContainerWithMetadataMediaContainer
|
||||
{
|
||||
|
||||
[JsonProperty("identifier")]
|
||||
public string? Identifier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("offset")]
|
||||
public long? Offset { get; set; }
|
||||
|
||||
[JsonProperty("size")]
|
||||
public long? Size { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("totalSize")]
|
||||
public long? TotalSize { get; set; }
|
||||
|
||||
[JsonProperty("Metadata")]
|
||||
public List<Models.Components.Metadata>? Metadata { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
public class MediaContainerWithNestedMetadata
|
||||
{
|
||||
|
||||
[JsonProperty("MediaContainer")]
|
||||
public MediaContainerWithNestedMetadataMediaContainer? MediaContainer { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
/// <summary>
|
||||
/// `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.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
/// 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)<br/>
|
||||
/// 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.<br/>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
public class MediaContainerWithNestedMetadataMediaContainer
|
||||
{
|
||||
|
||||
[JsonProperty("identifier")]
|
||||
public string? Identifier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("offset")]
|
||||
public long? Offset { get; set; }
|
||||
|
||||
[JsonProperty("size")]
|
||||
public long? Size { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("totalSize")]
|
||||
public long? TotalSize { get; set; }
|
||||
|
||||
[JsonProperty("MetadataItem")]
|
||||
public List<MetadataItem>? MetadataItem { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
public class MediaContainerWithPlaylistMetadata
|
||||
{
|
||||
|
||||
[JsonProperty("MediaContainer")]
|
||||
public MediaContainerWithPlaylistMetadataMediaContainer? MediaContainer { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
/// <summary>
|
||||
/// `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.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
/// 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)<br/>
|
||||
/// 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.<br/>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
public class MediaContainerWithPlaylistMetadataMediaContainer
|
||||
{
|
||||
|
||||
[JsonProperty("identifier")]
|
||||
public string? Identifier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("offset")]
|
||||
public long? Offset { get; set; }
|
||||
|
||||
[JsonProperty("size")]
|
||||
public long? Size { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("totalSize")]
|
||||
public long? TotalSize { get; set; }
|
||||
|
||||
[JsonProperty("Metadata")]
|
||||
public List<MediaContainerWithPlaylistMetadataMetadata>? Metadata { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,430 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
/// <summary>
|
||||
/// 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.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
/// <br/>
|
||||
/// 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.<br/>
|
||||
/// <br/>
|
||||
/// 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.<br/>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
public class MediaContainerWithPlaylistMetadataMetadata
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// If we return this as true then this playlist cannot be altered or deleted directly by the client.
|
||||
/// </summary>
|
||||
[JsonProperty("readOnly")]
|
||||
public bool? ReadOnly { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the URL for a composite image for descendent items (e.g. photo albums or playlists).
|
||||
/// </summary>
|
||||
[JsonProperty("composite")]
|
||||
public object? Composite { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the duration for the item, in units of milliseconds.
|
||||
/// </summary>
|
||||
[JsonProperty("duration")]
|
||||
public long? Duration { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
[JsonProperty("key")]
|
||||
public object? Key { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// For shows and seasons, contains the number of total episodes.
|
||||
/// </summary>
|
||||
[JsonProperty("leafCount")]
|
||||
public long? LeafCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The type of the playlist.
|
||||
/// </summary>
|
||||
[JsonProperty("playlistType")]
|
||||
public Models.Components.PlaylistType? PlaylistType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether or not the playlist is smart.
|
||||
/// </summary>
|
||||
[JsonProperty("smart")]
|
||||
public bool? Smart { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// If this is a special playlist, this returns its type (e.g. favorites).
|
||||
/// </summary>
|
||||
[JsonProperty("specialPlaylistType")]
|
||||
public string? SpecialPlaylistType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The title of the item (e.g. “300” or “The Simpsons”)
|
||||
/// </summary>
|
||||
[JsonProperty("title")]
|
||||
public object? Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The type of the video item, such as `movie`, `episode`, or `clip`.
|
||||
/// </summary>
|
||||
[JsonProperty("type")]
|
||||
public object? Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, contains the disc number for a track on multi-disc albums.
|
||||
/// </summary>
|
||||
[JsonProperty("absoluteIndex")]
|
||||
public long? AbsoluteIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// In units of seconds since the epoch, returns the time at which the item was added to the library.
|
||||
/// </summary>
|
||||
[JsonProperty("addedAt")]
|
||||
public long? AddedAt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the URL for the background artwork for the item.
|
||||
/// </summary>
|
||||
[JsonProperty("art")]
|
||||
public object? Art { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Some rating systems separate reviewer ratings from audience ratings
|
||||
/// </summary>
|
||||
[JsonProperty("audienceRating")]
|
||||
public double? AudienceRating { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled).
|
||||
/// </summary>
|
||||
[JsonProperty("audienceRatingImage")]
|
||||
public object? AudienceRatingImage { get; set; }
|
||||
|
||||
[JsonProperty("Autotag")]
|
||||
public List<Tag>? Autotag { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the URL for a banner graphic for the item.
|
||||
/// </summary>
|
||||
[JsonProperty("banner")]
|
||||
public object? Banner { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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).
|
||||
/// </summary>
|
||||
[JsonProperty("chapterSource")]
|
||||
public object? ChapterSource { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// If known, the content rating (e.g. MPAA) for an item.
|
||||
/// </summary>
|
||||
[JsonProperty("contentRating")]
|
||||
public object? ContentRating { get; set; }
|
||||
|
||||
[JsonProperty("Country")]
|
||||
public List<Tag>? Country { get; set; }
|
||||
|
||||
[JsonProperty("Director")]
|
||||
public List<Tag>? Director { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Typically only seen in metadata at a library's top level
|
||||
/// </summary>
|
||||
[JsonProperty("Filter")]
|
||||
public List<Filter>? Filter { get; set; }
|
||||
|
||||
[JsonProperty("Genre")]
|
||||
public List<Tag>? Genre { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `art` of the grandparent
|
||||
/// </summary>
|
||||
[JsonProperty("grandparentArt")]
|
||||
public string? GrandparentArt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `hero` of the grandparent
|
||||
/// </summary>
|
||||
[JsonProperty("grandparentHero")]
|
||||
public string? GrandparentHero { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `key` of the grandparent
|
||||
/// </summary>
|
||||
[JsonProperty("grandparentKey")]
|
||||
public string? GrandparentKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `ratingKey` of the grandparent
|
||||
/// </summary>
|
||||
[JsonProperty("grandparentRatingKey")]
|
||||
public string? GrandparentRatingKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `theme` of the grandparent
|
||||
/// </summary>
|
||||
[JsonProperty("grandparentTheme")]
|
||||
public string? GrandparentTheme { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `thumb` of the grandparent
|
||||
/// </summary>
|
||||
[JsonProperty("grandparentThumb")]
|
||||
public string? GrandparentThumb { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `title` of the grandparent
|
||||
/// </summary>
|
||||
[JsonProperty("grandparentTitle")]
|
||||
public string? GrandparentTitle { get; set; }
|
||||
|
||||
[JsonProperty("Guid")]
|
||||
public List<Tag>? Guid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the URL for a hero image for the item.
|
||||
/// </summary>
|
||||
[JsonProperty("hero")]
|
||||
public object? Hero { get; set; }
|
||||
|
||||
[JsonProperty("Image")]
|
||||
public List<Image>? Image { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks.
|
||||
/// </summary>
|
||||
[JsonProperty("index")]
|
||||
public long? Index { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time.
|
||||
/// </summary>
|
||||
[JsonProperty("lastViewedAt")]
|
||||
public long? LastViewedAt { get; set; }
|
||||
|
||||
[JsonProperty("Media")]
|
||||
public List<Media>? Media { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
[JsonProperty("originallyAvailableAt")]
|
||||
public object? OriginallyAvailableAt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, used to indicate an item's original title, e.g. a movie's foreign title.
|
||||
/// </summary>
|
||||
[JsonProperty("originalTitle")]
|
||||
public object? OriginalTitle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `hero` of the parent
|
||||
/// </summary>
|
||||
[JsonProperty("parentHero")]
|
||||
public string? ParentHero { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `index` of the parent
|
||||
/// </summary>
|
||||
[JsonProperty("parentIndex")]
|
||||
public long? ParentIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `key` of the parent
|
||||
/// </summary>
|
||||
[JsonProperty("parentKey")]
|
||||
public string? ParentKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `ratingKey` of the parent
|
||||
/// </summary>
|
||||
[JsonProperty("parentRatingKey")]
|
||||
public string? ParentRatingKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `thumb` of the parent
|
||||
/// </summary>
|
||||
[JsonProperty("parentThumb")]
|
||||
public string? ParentThumb { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `title` of the parent
|
||||
/// </summary>
|
||||
[JsonProperty("parentTitle")]
|
||||
public string? ParentTitle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
[JsonProperty("primaryExtraKey")]
|
||||
public object? PrimaryExtraKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Prompt to give the user for this directory (such as `Search Movies`)
|
||||
/// </summary>
|
||||
[JsonProperty("prompt")]
|
||||
public string? Prompt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from.
|
||||
/// </summary>
|
||||
[JsonProperty("rating")]
|
||||
public double? Rating { get; set; }
|
||||
|
||||
[JsonProperty("Rating")]
|
||||
public List<Tag>? RatingArray { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Number of ratings under this metadata
|
||||
/// </summary>
|
||||
[JsonProperty("ratingCount")]
|
||||
public long? RatingCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
[JsonProperty("ratingImage")]
|
||||
public object? RatingImage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
[JsonProperty("ratingKey")]
|
||||
public object? RatingKey { get; set; }
|
||||
|
||||
[JsonProperty("Role")]
|
||||
public List<Tag>? Role { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates this is a search directory
|
||||
/// </summary>
|
||||
[JsonProperty("search")]
|
||||
public bool? Search { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Used by old clients to provide nested menus allowing for primative (but structured) navigation.
|
||||
/// </summary>
|
||||
[JsonProperty("secondary")]
|
||||
public bool? Secondary { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
[JsonProperty("skipChildren")]
|
||||
public bool? SkipChildren { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show).
|
||||
/// </summary>
|
||||
[JsonProperty("skipParent")]
|
||||
public bool? SkipParent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Typically only seen in metadata at a library's top level
|
||||
/// </summary>
|
||||
[JsonProperty("Sort")]
|
||||
public List<Sort>? Sort { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums).
|
||||
/// </summary>
|
||||
[JsonProperty("studio")]
|
||||
public object? Studio { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The subtype of the video item, such as `photo` when the video item is in a photo library
|
||||
/// </summary>
|
||||
[JsonProperty("subtype")]
|
||||
public object? Subtype { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the extended textual information about the item (e.g. movie plot, artist biography, album review).
|
||||
/// </summary>
|
||||
[JsonProperty("summary")]
|
||||
public object? Summary { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, a pithy one-liner about the item (usually only seen for movies).
|
||||
/// </summary>
|
||||
[JsonProperty("tagline")]
|
||||
public object? Tagline { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the URL for theme music for the item (usually only for TV shows).
|
||||
/// </summary>
|
||||
[JsonProperty("theme")]
|
||||
public object? Theme { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
[JsonProperty("thumb")]
|
||||
public object? Thumb { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”).
|
||||
/// </summary>
|
||||
[JsonProperty("titleSort")]
|
||||
public object? TitleSort { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated).
|
||||
/// </summary>
|
||||
[JsonProperty("updatedAt")]
|
||||
public long? UpdatedAt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When the user has rated an item, this contains the user rating
|
||||
/// </summary>
|
||||
[JsonProperty("userRating")]
|
||||
public double? UserRating { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When a users has completed watched or listened to an item, this attribute contains the number of consumptions.
|
||||
/// </summary>
|
||||
[JsonProperty("viewCount")]
|
||||
public long? ViewCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// For shows and seasons, contains the number of viewed episodes.
|
||||
/// </summary>
|
||||
[JsonProperty("viewedLeafCount")]
|
||||
public long? ViewedLeafCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds.
|
||||
/// </summary>
|
||||
[JsonProperty("viewOffset")]
|
||||
public long? ViewOffset { get; set; }
|
||||
|
||||
[JsonProperty("Writer")]
|
||||
public List<Tag>? Writer { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the year associated with the item's release (e.g. release year for a movie).
|
||||
/// </summary>
|
||||
[JsonProperty("year")]
|
||||
public long? Year { get; set; }
|
||||
|
||||
[JsonProperty("additionalProperties")]
|
||||
public Dictionary<string, object>? AdditionalProperties { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
public class MediaContainerWithSettings
|
||||
{
|
||||
|
||||
[JsonProperty("MediaContainer")]
|
||||
public MediaContainerWithSettingsMediaContainer? MediaContainer { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
/// <summary>
|
||||
/// `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.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
/// 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)<br/>
|
||||
/// 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.<br/>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
public class MediaContainerWithSettingsMediaContainer
|
||||
{
|
||||
|
||||
[JsonProperty("identifier")]
|
||||
public string? Identifier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("offset")]
|
||||
public long? Offset { get; set; }
|
||||
|
||||
[JsonProperty("size")]
|
||||
public long? Size { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("totalSize")]
|
||||
public long? TotalSize { get; set; }
|
||||
|
||||
[JsonProperty("Setting")]
|
||||
public List<Setting>? Setting { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
public class MediaContainerWithSubscription
|
||||
{
|
||||
|
||||
[JsonProperty("MediaContainer")]
|
||||
public MediaContainerWithSubscriptionMediaContainer? MediaContainer { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
/// <summary>
|
||||
/// `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.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
/// 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)<br/>
|
||||
/// 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.<br/>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
public class MediaContainerWithSubscriptionMediaContainer
|
||||
{
|
||||
|
||||
[JsonProperty("identifier")]
|
||||
public string? Identifier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("offset")]
|
||||
public long? Offset { get; set; }
|
||||
|
||||
[JsonProperty("size")]
|
||||
public long? Size { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("totalSize")]
|
||||
public long? TotalSize { get; set; }
|
||||
|
||||
[JsonProperty("MediaSubscription")]
|
||||
public List<Models.Components.MediaSubscription>? MediaSubscription { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
/// <summary>
|
||||
/// A media grab opration represents a scheduled or active recording of media<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
public class MediaGrabOperation
|
||||
{
|
||||
|
||||
[JsonProperty("currentSize")]
|
||||
public long? CurrentSize { get; set; }
|
||||
|
||||
[JsonProperty("grabberIdentifier")]
|
||||
public string? GrabberIdentifier { get; set; }
|
||||
|
||||
[JsonProperty("grabberProtocol")]
|
||||
public string? GrabberProtocol { get; set; }
|
||||
|
||||
[JsonProperty("id")]
|
||||
public string? Id { get; set; }
|
||||
|
||||
[JsonProperty("key")]
|
||||
public string? Key { get; set; }
|
||||
|
||||
[JsonProperty("mediaIndex")]
|
||||
public long? MediaIndex { get; set; }
|
||||
|
||||
[JsonProperty("mediaSubscriptionID")]
|
||||
public long? MediaSubscriptionID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
/// <br/>
|
||||
/// 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.<br/>
|
||||
/// <br/>
|
||||
/// 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.<br/>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("Metadata")]
|
||||
public Models.Components.Metadata? Metadata { get; set; }
|
||||
|
||||
[JsonProperty("percent")]
|
||||
public double? Percent { get; set; }
|
||||
|
||||
[JsonProperty("provider")]
|
||||
public string? Provider { get; set; }
|
||||
|
||||
[JsonProperty("status")]
|
||||
public Models.Components.Status? Status { get; set; }
|
||||
}
|
||||
}
|
||||
17
LukeHagar/PlexAPI/SDK/Models/Components/MediaQuery.cs
Normal file
17
LukeHagar/PlexAPI/SDK/Models/Components/MediaQuery.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
|
||||
public class MediaQuery
|
||||
{
|
||||
}
|
||||
}
|
||||
99
LukeHagar/PlexAPI/SDK/Models/Components/MediaSubscription.cs
Normal file
99
LukeHagar/PlexAPI/SDK/Models/Components/MediaSubscription.cs
Normal file
@@ -0,0 +1,99 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
/// <summary>
|
||||
/// A media subscription contains a representation of metadata desired to be recorded<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
public class MediaSubscription
|
||||
{
|
||||
|
||||
[JsonProperty("title")]
|
||||
public string? Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The metadata type of the root item of the subscription
|
||||
/// </summary>
|
||||
[JsonProperty("type")]
|
||||
public long? Type { get; set; }
|
||||
|
||||
[JsonProperty("airingsType")]
|
||||
public AiringsType? AiringsType { get; set; }
|
||||
|
||||
[JsonProperty("createdAt")]
|
||||
public long? CreatedAt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Media Matching Hints
|
||||
/// </summary>
|
||||
[JsonProperty("Directory")]
|
||||
public Dictionary<string, object>? Directory { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Only included if `includeStorage` is specified
|
||||
/// </summary>
|
||||
[JsonProperty("durationTotal")]
|
||||
public long? DurationTotal { get; set; }
|
||||
|
||||
[JsonProperty("key")]
|
||||
public string? Key { get; set; }
|
||||
|
||||
[JsonProperty("librarySectionTitle")]
|
||||
public string? LibrarySectionTitle { get; set; }
|
||||
|
||||
[JsonProperty("locationPath")]
|
||||
public string? LocationPath { get; set; }
|
||||
|
||||
[JsonProperty("MediaGrabOperation")]
|
||||
public List<MediaGrabOperation>? MediaGrabOperation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Media Matching Hints
|
||||
/// </summary>
|
||||
[JsonProperty("Playlist")]
|
||||
public Dictionary<string, object>? Playlist { get; set; }
|
||||
|
||||
[JsonProperty("Setting")]
|
||||
public List<Setting>? Setting { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Only included if `includeStorage` is specified
|
||||
/// </summary>
|
||||
[JsonProperty("storageTotal")]
|
||||
public long? StorageTotal { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The library section id for where the item is to be recorded
|
||||
/// </summary>
|
||||
[JsonProperty("targetLibrarySectionID")]
|
||||
public long? TargetLibrarySectionID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The library section location id for where the item is to be recorded
|
||||
/// </summary>
|
||||
[JsonProperty("targetSectionLocationID")]
|
||||
public long? TargetSectionLocationID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Media Matching Hints
|
||||
/// </summary>
|
||||
[JsonProperty("Video")]
|
||||
public Dictionary<string, object>? Video { get; set; }
|
||||
}
|
||||
}
|
||||
406
LukeHagar/PlexAPI/SDK/Models/Components/Metadata.cs
Normal file
406
LukeHagar/PlexAPI/SDK/Models/Components/Metadata.cs
Normal file
@@ -0,0 +1,406 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
/// <summary>
|
||||
/// 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.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
/// <br/>
|
||||
/// 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.<br/>
|
||||
/// <br/>
|
||||
/// 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.<br/>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
public class Metadata
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// The title of the item (e.g. “300” or “The Simpsons”)
|
||||
/// </summary>
|
||||
[JsonProperty("title")]
|
||||
public object? Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The type of the video item, such as `movie`, `episode`, or `clip`.
|
||||
/// </summary>
|
||||
[JsonProperty("type")]
|
||||
public object? Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, contains the disc number for a track on multi-disc albums.
|
||||
/// </summary>
|
||||
[JsonProperty("absoluteIndex")]
|
||||
public long? AbsoluteIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// In units of seconds since the epoch, returns the time at which the item was added to the library.
|
||||
/// </summary>
|
||||
[JsonProperty("addedAt")]
|
||||
public long? AddedAt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the URL for the background artwork for the item.
|
||||
/// </summary>
|
||||
[JsonProperty("art")]
|
||||
public object? Art { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Some rating systems separate reviewer ratings from audience ratings
|
||||
/// </summary>
|
||||
[JsonProperty("audienceRating")]
|
||||
public double? AudienceRating { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled).
|
||||
/// </summary>
|
||||
[JsonProperty("audienceRatingImage")]
|
||||
public object? AudienceRatingImage { get; set; }
|
||||
|
||||
[JsonProperty("Autotag")]
|
||||
public List<Tag>? Autotag { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the URL for a banner graphic for the item.
|
||||
/// </summary>
|
||||
[JsonProperty("banner")]
|
||||
public object? Banner { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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).
|
||||
/// </summary>
|
||||
[JsonProperty("chapterSource")]
|
||||
public object? ChapterSource { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the URL for a composite image for descendent items (e.g. photo albums or playlists).
|
||||
/// </summary>
|
||||
[JsonProperty("composite")]
|
||||
public object? Composite { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// If known, the content rating (e.g. MPAA) for an item.
|
||||
/// </summary>
|
||||
[JsonProperty("contentRating")]
|
||||
public object? ContentRating { get; set; }
|
||||
|
||||
[JsonProperty("Country")]
|
||||
public List<Tag>? Country { get; set; }
|
||||
|
||||
[JsonProperty("Director")]
|
||||
public List<Tag>? Director { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the duration for the item, in units of milliseconds.
|
||||
/// </summary>
|
||||
[JsonProperty("duration")]
|
||||
public long? Duration { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Typically only seen in metadata at a library's top level
|
||||
/// </summary>
|
||||
[JsonProperty("Filter")]
|
||||
public List<Filter>? Filter { get; set; }
|
||||
|
||||
[JsonProperty("Genre")]
|
||||
public List<Tag>? Genre { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `art` of the grandparent
|
||||
/// </summary>
|
||||
[JsonProperty("grandparentArt")]
|
||||
public string? GrandparentArt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `hero` of the grandparent
|
||||
/// </summary>
|
||||
[JsonProperty("grandparentHero")]
|
||||
public string? GrandparentHero { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `key` of the grandparent
|
||||
/// </summary>
|
||||
[JsonProperty("grandparentKey")]
|
||||
public string? GrandparentKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `ratingKey` of the grandparent
|
||||
/// </summary>
|
||||
[JsonProperty("grandparentRatingKey")]
|
||||
public string? GrandparentRatingKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `theme` of the grandparent
|
||||
/// </summary>
|
||||
[JsonProperty("grandparentTheme")]
|
||||
public string? GrandparentTheme { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `thumb` of the grandparent
|
||||
/// </summary>
|
||||
[JsonProperty("grandparentThumb")]
|
||||
public string? GrandparentThumb { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `title` of the grandparent
|
||||
/// </summary>
|
||||
[JsonProperty("grandparentTitle")]
|
||||
public string? GrandparentTitle { get; set; }
|
||||
|
||||
[JsonProperty("Guid")]
|
||||
public List<Tag>? Guid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the URL for a hero image for the item.
|
||||
/// </summary>
|
||||
[JsonProperty("hero")]
|
||||
public object? Hero { get; set; }
|
||||
|
||||
[JsonProperty("Image")]
|
||||
public List<Image>? Image { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks.
|
||||
/// </summary>
|
||||
[JsonProperty("index")]
|
||||
public long? Index { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
[JsonProperty("key")]
|
||||
public object? Key { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time.
|
||||
/// </summary>
|
||||
[JsonProperty("lastViewedAt")]
|
||||
public long? LastViewedAt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// For shows and seasons, contains the number of total episodes.
|
||||
/// </summary>
|
||||
[JsonProperty("leafCount")]
|
||||
public long? LeafCount { get; set; }
|
||||
|
||||
[JsonProperty("Media")]
|
||||
public List<Media>? Media { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
[JsonProperty("originallyAvailableAt")]
|
||||
public object? OriginallyAvailableAt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, used to indicate an item's original title, e.g. a movie's foreign title.
|
||||
/// </summary>
|
||||
[JsonProperty("originalTitle")]
|
||||
public object? OriginalTitle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `hero` of the parent
|
||||
/// </summary>
|
||||
[JsonProperty("parentHero")]
|
||||
public string? ParentHero { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `index` of the parent
|
||||
/// </summary>
|
||||
[JsonProperty("parentIndex")]
|
||||
public long? ParentIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `key` of the parent
|
||||
/// </summary>
|
||||
[JsonProperty("parentKey")]
|
||||
public string? ParentKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `ratingKey` of the parent
|
||||
/// </summary>
|
||||
[JsonProperty("parentRatingKey")]
|
||||
public string? ParentRatingKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `thumb` of the parent
|
||||
/// </summary>
|
||||
[JsonProperty("parentThumb")]
|
||||
public string? ParentThumb { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `title` of the parent
|
||||
/// </summary>
|
||||
[JsonProperty("parentTitle")]
|
||||
public string? ParentTitle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
[JsonProperty("primaryExtraKey")]
|
||||
public object? PrimaryExtraKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Prompt to give the user for this directory (such as `Search Movies`)
|
||||
/// </summary>
|
||||
[JsonProperty("prompt")]
|
||||
public string? Prompt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from.
|
||||
/// </summary>
|
||||
[JsonProperty("rating")]
|
||||
public double? Rating { get; set; }
|
||||
|
||||
[JsonProperty("Rating")]
|
||||
public List<Tag>? RatingArray { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Number of ratings under this metadata
|
||||
/// </summary>
|
||||
[JsonProperty("ratingCount")]
|
||||
public long? RatingCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
[JsonProperty("ratingImage")]
|
||||
public object? RatingImage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
[JsonProperty("ratingKey")]
|
||||
public object? RatingKey { get; set; }
|
||||
|
||||
[JsonProperty("Role")]
|
||||
public List<Tag>? Role { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates this is a search directory
|
||||
/// </summary>
|
||||
[JsonProperty("search")]
|
||||
public bool? Search { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Used by old clients to provide nested menus allowing for primative (but structured) navigation.
|
||||
/// </summary>
|
||||
[JsonProperty("secondary")]
|
||||
public bool? Secondary { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
[JsonProperty("skipChildren")]
|
||||
public bool? SkipChildren { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show).
|
||||
/// </summary>
|
||||
[JsonProperty("skipParent")]
|
||||
public bool? SkipParent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Typically only seen in metadata at a library's top level
|
||||
/// </summary>
|
||||
[JsonProperty("Sort")]
|
||||
public List<Sort>? Sort { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums).
|
||||
/// </summary>
|
||||
[JsonProperty("studio")]
|
||||
public object? Studio { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The subtype of the video item, such as `photo` when the video item is in a photo library
|
||||
/// </summary>
|
||||
[JsonProperty("subtype")]
|
||||
public object? Subtype { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the extended textual information about the item (e.g. movie plot, artist biography, album review).
|
||||
/// </summary>
|
||||
[JsonProperty("summary")]
|
||||
public object? Summary { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, a pithy one-liner about the item (usually only seen for movies).
|
||||
/// </summary>
|
||||
[JsonProperty("tagline")]
|
||||
public object? Tagline { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the URL for theme music for the item (usually only for TV shows).
|
||||
/// </summary>
|
||||
[JsonProperty("theme")]
|
||||
public object? Theme { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
[JsonProperty("thumb")]
|
||||
public object? Thumb { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”).
|
||||
/// </summary>
|
||||
[JsonProperty("titleSort")]
|
||||
public object? TitleSort { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated).
|
||||
/// </summary>
|
||||
[JsonProperty("updatedAt")]
|
||||
public long? UpdatedAt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When the user has rated an item, this contains the user rating
|
||||
/// </summary>
|
||||
[JsonProperty("userRating")]
|
||||
public double? UserRating { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When a users has completed watched or listened to an item, this attribute contains the number of consumptions.
|
||||
/// </summary>
|
||||
[JsonProperty("viewCount")]
|
||||
public long? ViewCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// For shows and seasons, contains the number of viewed episodes.
|
||||
/// </summary>
|
||||
[JsonProperty("viewedLeafCount")]
|
||||
public long? ViewedLeafCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds.
|
||||
/// </summary>
|
||||
[JsonProperty("viewOffset")]
|
||||
public long? ViewOffset { get; set; }
|
||||
|
||||
[JsonProperty("Writer")]
|
||||
public List<Tag>? Writer { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the year associated with the item's release (e.g. release year for a movie).
|
||||
/// </summary>
|
||||
[JsonProperty("year")]
|
||||
public long? Year { get; set; }
|
||||
|
||||
[JsonProperty("additionalProperties")]
|
||||
public Dictionary<string, object>? AdditionalProperties { get; set; }
|
||||
}
|
||||
}
|
||||
409
LukeHagar/PlexAPI/SDK/Models/Components/MetadataItem.cs
Normal file
409
LukeHagar/PlexAPI/SDK/Models/Components/MetadataItem.cs
Normal file
@@ -0,0 +1,409 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
/// <summary>
|
||||
/// 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.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
/// <br/>
|
||||
/// 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.<br/>
|
||||
/// <br/>
|
||||
/// 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.<br/>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
public class MetadataItem
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// The title of the item (e.g. “300” or “The Simpsons”)
|
||||
/// </summary>
|
||||
[JsonProperty("title")]
|
||||
public object? Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The type of the video item, such as `movie`, `episode`, or `clip`.
|
||||
/// </summary>
|
||||
[JsonProperty("type")]
|
||||
public object? Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, contains the disc number for a track on multi-disc albums.
|
||||
/// </summary>
|
||||
[JsonProperty("absoluteIndex")]
|
||||
public long? AbsoluteIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// In units of seconds since the epoch, returns the time at which the item was added to the library.
|
||||
/// </summary>
|
||||
[JsonProperty("addedAt")]
|
||||
public long? AddedAt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the URL for the background artwork for the item.
|
||||
/// </summary>
|
||||
[JsonProperty("art")]
|
||||
public object? Art { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Some rating systems separate reviewer ratings from audience ratings
|
||||
/// </summary>
|
||||
[JsonProperty("audienceRating")]
|
||||
public double? AudienceRating { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled).
|
||||
/// </summary>
|
||||
[JsonProperty("audienceRatingImage")]
|
||||
public object? AudienceRatingImage { get; set; }
|
||||
|
||||
[JsonProperty("Autotag")]
|
||||
public List<Tag>? Autotag { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the URL for a banner graphic for the item.
|
||||
/// </summary>
|
||||
[JsonProperty("banner")]
|
||||
public object? Banner { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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).
|
||||
/// </summary>
|
||||
[JsonProperty("chapterSource")]
|
||||
public object? ChapterSource { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the URL for a composite image for descendent items (e.g. photo albums or playlists).
|
||||
/// </summary>
|
||||
[JsonProperty("composite")]
|
||||
public object? Composite { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// If known, the content rating (e.g. MPAA) for an item.
|
||||
/// </summary>
|
||||
[JsonProperty("contentRating")]
|
||||
public object? ContentRating { get; set; }
|
||||
|
||||
[JsonProperty("Country")]
|
||||
public List<Tag>? Country { get; set; }
|
||||
|
||||
[JsonProperty("Director")]
|
||||
public List<Tag>? Director { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the duration for the item, in units of milliseconds.
|
||||
/// </summary>
|
||||
[JsonProperty("duration")]
|
||||
public long? Duration { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Typically only seen in metadata at a library's top level
|
||||
/// </summary>
|
||||
[JsonProperty("Filter")]
|
||||
public List<Filter>? Filter { get; set; }
|
||||
|
||||
[JsonProperty("Genre")]
|
||||
public List<Tag>? Genre { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `art` of the grandparent
|
||||
/// </summary>
|
||||
[JsonProperty("grandparentArt")]
|
||||
public string? GrandparentArt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `hero` of the grandparent
|
||||
/// </summary>
|
||||
[JsonProperty("grandparentHero")]
|
||||
public string? GrandparentHero { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `key` of the grandparent
|
||||
/// </summary>
|
||||
[JsonProperty("grandparentKey")]
|
||||
public string? GrandparentKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `ratingKey` of the grandparent
|
||||
/// </summary>
|
||||
[JsonProperty("grandparentRatingKey")]
|
||||
public string? GrandparentRatingKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `theme` of the grandparent
|
||||
/// </summary>
|
||||
[JsonProperty("grandparentTheme")]
|
||||
public string? GrandparentTheme { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `thumb` of the grandparent
|
||||
/// </summary>
|
||||
[JsonProperty("grandparentThumb")]
|
||||
public string? GrandparentThumb { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `title` of the grandparent
|
||||
/// </summary>
|
||||
[JsonProperty("grandparentTitle")]
|
||||
public string? GrandparentTitle { get; set; }
|
||||
|
||||
[JsonProperty("Guid")]
|
||||
public List<Tag>? Guid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the URL for a hero image for the item.
|
||||
/// </summary>
|
||||
[JsonProperty("hero")]
|
||||
public object? Hero { get; set; }
|
||||
|
||||
[JsonProperty("Image")]
|
||||
public List<Image>? Image { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks.
|
||||
/// </summary>
|
||||
[JsonProperty("index")]
|
||||
public long? Index { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
[JsonProperty("key")]
|
||||
public object? Key { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time.
|
||||
/// </summary>
|
||||
[JsonProperty("lastViewedAt")]
|
||||
public long? LastViewedAt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// For shows and seasons, contains the number of total episodes.
|
||||
/// </summary>
|
||||
[JsonProperty("leafCount")]
|
||||
public long? LeafCount { get; set; }
|
||||
|
||||
[JsonProperty("Media")]
|
||||
public List<Media>? Media { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
[JsonProperty("originallyAvailableAt")]
|
||||
public object? OriginallyAvailableAt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, used to indicate an item's original title, e.g. a movie's foreign title.
|
||||
/// </summary>
|
||||
[JsonProperty("originalTitle")]
|
||||
public object? OriginalTitle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `hero` of the parent
|
||||
/// </summary>
|
||||
[JsonProperty("parentHero")]
|
||||
public string? ParentHero { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `index` of the parent
|
||||
/// </summary>
|
||||
[JsonProperty("parentIndex")]
|
||||
public long? ParentIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `key` of the parent
|
||||
/// </summary>
|
||||
[JsonProperty("parentKey")]
|
||||
public string? ParentKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `ratingKey` of the parent
|
||||
/// </summary>
|
||||
[JsonProperty("parentRatingKey")]
|
||||
public string? ParentRatingKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `thumb` of the parent
|
||||
/// </summary>
|
||||
[JsonProperty("parentThumb")]
|
||||
public string? ParentThumb { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The `title` of the parent
|
||||
/// </summary>
|
||||
[JsonProperty("parentTitle")]
|
||||
public string? ParentTitle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
[JsonProperty("primaryExtraKey")]
|
||||
public object? PrimaryExtraKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Prompt to give the user for this directory (such as `Search Movies`)
|
||||
/// </summary>
|
||||
[JsonProperty("prompt")]
|
||||
public string? Prompt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from.
|
||||
/// </summary>
|
||||
[JsonProperty("rating")]
|
||||
public double? Rating { get; set; }
|
||||
|
||||
[JsonProperty("Rating")]
|
||||
public List<Tag>? RatingArray { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Number of ratings under this metadata
|
||||
/// </summary>
|
||||
[JsonProperty("ratingCount")]
|
||||
public long? RatingCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
[JsonProperty("ratingImage")]
|
||||
public object? RatingImage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
[JsonProperty("ratingKey")]
|
||||
public object? RatingKey { get; set; }
|
||||
|
||||
[JsonProperty("Role")]
|
||||
public List<Tag>? Role { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates this is a search directory
|
||||
/// </summary>
|
||||
[JsonProperty("search")]
|
||||
public bool? Search { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Used by old clients to provide nested menus allowing for primative (but structured) navigation.
|
||||
/// </summary>
|
||||
[JsonProperty("secondary")]
|
||||
public bool? Secondary { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
[JsonProperty("skipChildren")]
|
||||
public bool? SkipChildren { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show).
|
||||
/// </summary>
|
||||
[JsonProperty("skipParent")]
|
||||
public bool? SkipParent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Typically only seen in metadata at a library's top level
|
||||
/// </summary>
|
||||
[JsonProperty("Sort")]
|
||||
public List<Sort>? Sort { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums).
|
||||
/// </summary>
|
||||
[JsonProperty("studio")]
|
||||
public object? Studio { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The subtype of the video item, such as `photo` when the video item is in a photo library
|
||||
/// </summary>
|
||||
[JsonProperty("subtype")]
|
||||
public object? Subtype { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the extended textual information about the item (e.g. movie plot, artist biography, album review).
|
||||
/// </summary>
|
||||
[JsonProperty("summary")]
|
||||
public object? Summary { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, a pithy one-liner about the item (usually only seen for movies).
|
||||
/// </summary>
|
||||
[JsonProperty("tagline")]
|
||||
public object? Tagline { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the URL for theme music for the item (usually only for TV shows).
|
||||
/// </summary>
|
||||
[JsonProperty("theme")]
|
||||
public object? Theme { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
[JsonProperty("thumb")]
|
||||
public object? Thumb { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”).
|
||||
/// </summary>
|
||||
[JsonProperty("titleSort")]
|
||||
public object? TitleSort { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated).
|
||||
/// </summary>
|
||||
[JsonProperty("updatedAt")]
|
||||
public long? UpdatedAt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When the user has rated an item, this contains the user rating
|
||||
/// </summary>
|
||||
[JsonProperty("userRating")]
|
||||
public double? UserRating { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When a users has completed watched or listened to an item, this attribute contains the number of consumptions.
|
||||
/// </summary>
|
||||
[JsonProperty("viewCount")]
|
||||
public long? ViewCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// For shows and seasons, contains the number of viewed episodes.
|
||||
/// </summary>
|
||||
[JsonProperty("viewedLeafCount")]
|
||||
public long? ViewedLeafCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds.
|
||||
/// </summary>
|
||||
[JsonProperty("viewOffset")]
|
||||
public long? ViewOffset { get; set; }
|
||||
|
||||
[JsonProperty("Writer")]
|
||||
public List<Tag>? Writer { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When present, the year associated with the item's release (e.g. release year for a movie).
|
||||
/// </summary>
|
||||
[JsonProperty("year")]
|
||||
public long? Year { get; set; }
|
||||
|
||||
[JsonProperty("MetadataItem")]
|
||||
public List<Items>? MetadataItemValue { get; set; }
|
||||
|
||||
[JsonProperty("additionalProperties")]
|
||||
public Dictionary<string, object>? AdditionalProperties { get; set; }
|
||||
}
|
||||
}
|
||||
78
LukeHagar/PlexAPI/SDK/Models/Components/Part.cs
Normal file
78
LukeHagar/PlexAPI/SDK/Models/Components/Part.cs
Normal file
@@ -0,0 +1,78 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
/// <summary>
|
||||
/// `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.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
public class Part
|
||||
{
|
||||
|
||||
[JsonProperty("audioProfile")]
|
||||
public object? AudioProfile { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The container of the media file, such as `mp4` or `mkv`
|
||||
/// </summary>
|
||||
[JsonProperty("container")]
|
||||
public object? Container { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The duration of the media item, in milliseconds
|
||||
/// </summary>
|
||||
[JsonProperty("duration")]
|
||||
public long? Duration { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The local file path at which the part is stored on the server
|
||||
/// </summary>
|
||||
[JsonProperty("file")]
|
||||
public object? File { get; set; }
|
||||
|
||||
[JsonProperty("has64bitOffsets")]
|
||||
public bool? Has64bitOffsets { get; set; }
|
||||
|
||||
[JsonProperty("id")]
|
||||
public long? Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The key from which the media can be streamed
|
||||
/// </summary>
|
||||
[JsonProperty("key")]
|
||||
public object? Key { get; set; }
|
||||
|
||||
[JsonProperty("optimizedForStreaming")]
|
||||
public bool? OptimizedForStreaming { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The size of the media, in bytes
|
||||
/// </summary>
|
||||
[JsonProperty("size")]
|
||||
public long? Size { get; set; }
|
||||
|
||||
[JsonProperty("Stream")]
|
||||
public List<Stream>? Stream { get; set; }
|
||||
|
||||
[JsonProperty("videoProfile")]
|
||||
public object? VideoProfile { get; set; }
|
||||
|
||||
[JsonProperty("additionalProperties")]
|
||||
public Dictionary<string, object>? AdditionalProperties { get; set; }
|
||||
}
|
||||
}
|
||||
36
LukeHagar/PlexAPI/SDK/Models/Components/Pivot.cs
Normal file
36
LukeHagar/PlexAPI/SDK/Models/Components/Pivot.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
public class Pivot
|
||||
{
|
||||
|
||||
[JsonProperty("title")]
|
||||
public string? Title { get; set; }
|
||||
|
||||
[JsonProperty("type")]
|
||||
public string? Type { get; set; }
|
||||
|
||||
[JsonProperty("context")]
|
||||
public string? Context { get; set; }
|
||||
|
||||
[JsonProperty("id")]
|
||||
public string? Id { get; set; }
|
||||
|
||||
[JsonProperty("key")]
|
||||
public string? Key { get; set; }
|
||||
|
||||
[JsonProperty("symbol")]
|
||||
public string? Symbol { get; set; }
|
||||
}
|
||||
}
|
||||
111
LukeHagar/PlexAPI/SDK/Models/Components/Player.cs
Normal file
111
LukeHagar/PlexAPI/SDK/Models/Components/Player.cs
Normal file
@@ -0,0 +1,111 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
/// <summary>
|
||||
/// Information about the player being used for playback
|
||||
/// </summary>
|
||||
public class Player
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// The title of the client
|
||||
/// </summary>
|
||||
[JsonProperty("title")]
|
||||
public string? Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The remote address
|
||||
/// </summary>
|
||||
[JsonProperty("address")]
|
||||
public string? Address { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicating if the client is playing from the local LAN
|
||||
/// </summary>
|
||||
[JsonProperty("local")]
|
||||
public bool? Local { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The identifier of the client
|
||||
/// </summary>
|
||||
[JsonProperty("machineIdentifier")]
|
||||
public string? MachineIdentifier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The model of the client
|
||||
/// </summary>
|
||||
[JsonProperty("model")]
|
||||
public string? Model { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The platform of the client
|
||||
/// </summary>
|
||||
[JsonProperty("platform")]
|
||||
public string? Platform { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The platformVersion of the client
|
||||
/// </summary>
|
||||
[JsonProperty("platformVersion")]
|
||||
public string? PlatformVersion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The product name of the client
|
||||
/// </summary>
|
||||
[JsonProperty("product")]
|
||||
public string? Product { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicating if the client is playing over a relay connection
|
||||
/// </summary>
|
||||
[JsonProperty("relayed")]
|
||||
public bool? Relayed { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The client's public address
|
||||
/// </summary>
|
||||
[JsonProperty("remotePublicAddress")]
|
||||
public string? RemotePublicAddress { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicating if the client is playing over HTTPS
|
||||
/// </summary>
|
||||
[JsonProperty("secure")]
|
||||
public bool? Secure { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The client's last reported state
|
||||
/// </summary>
|
||||
[JsonProperty("state")]
|
||||
public string? State { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The id of the user
|
||||
/// </summary>
|
||||
[JsonProperty("userID")]
|
||||
public long? UserID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The vendor of the client
|
||||
/// </summary>
|
||||
[JsonProperty("vendor")]
|
||||
public string? Vendor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The version of the client
|
||||
/// </summary>
|
||||
[JsonProperty("version")]
|
||||
public string? Version { get; set; }
|
||||
}
|
||||
}
|
||||
62
LukeHagar/PlexAPI/SDK/Models/Components/PlaylistType.cs
Normal file
62
LukeHagar/PlexAPI/SDK/Models/Components/PlaylistType.cs
Normal file
@@ -0,0 +1,62 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// The type of the playlist.
|
||||
/// </summary>
|
||||
public enum PlaylistType
|
||||
{
|
||||
[JsonProperty("audio")]
|
||||
Audio,
|
||||
[JsonProperty("video")]
|
||||
Video,
|
||||
[JsonProperty("photo")]
|
||||
Photo,
|
||||
}
|
||||
|
||||
public static class PlaylistTypeExtension
|
||||
{
|
||||
public static string Value(this PlaylistType value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static PlaylistType ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(PlaylistType).GetFields())
|
||||
{
|
||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
||||
if (attributes.Length == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var attribute = attributes[0] as JsonPropertyAttribute;
|
||||
if (attribute != null && attribute.PropertyName == value)
|
||||
{
|
||||
var enumVal = field.GetValue(null);
|
||||
|
||||
if (enumVal is PlaylistType)
|
||||
{
|
||||
return (PlaylistType)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum PlaylistType");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
25
LukeHagar/PlexAPI/SDK/Models/Components/PostResponses200.cs
Normal file
25
LukeHagar/PlexAPI/SDK/Models/Components/PostResponses200.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
/// <summary>
|
||||
/// OK
|
||||
/// </summary>
|
||||
public class PostResponses200
|
||||
{
|
||||
|
||||
[JsonProperty("MediaContainer")]
|
||||
public PostResponses200MediaContainer? MediaContainer { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
/// <summary>
|
||||
/// `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.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
/// 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)<br/>
|
||||
/// 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.<br/>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
public class PostResponses200MediaContainer
|
||||
{
|
||||
|
||||
[JsonProperty("identifier")]
|
||||
public string? Identifier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("offset")]
|
||||
public long? Offset { get; set; }
|
||||
|
||||
[JsonProperty("size")]
|
||||
public long? Size { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("totalSize")]
|
||||
public long? TotalSize { get; set; }
|
||||
|
||||
[JsonProperty("color")]
|
||||
public string? Color { get; set; }
|
||||
|
||||
[JsonProperty("endTimeOffset")]
|
||||
public long? EndTimeOffset { get; set; }
|
||||
|
||||
[JsonProperty("id")]
|
||||
public long? Id { get; set; }
|
||||
|
||||
[JsonProperty("startTimeOffset")]
|
||||
public long? StartTimeOffset { get; set; }
|
||||
|
||||
[JsonProperty("title")]
|
||||
public string? Title { get; set; }
|
||||
|
||||
[JsonProperty("type")]
|
||||
public PostResponses200Type? Type { get; set; }
|
||||
|
||||
[JsonProperty("additionalProperties")]
|
||||
public Dictionary<string, object>? AdditionalProperties { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
|
||||
public enum PostResponses200Type
|
||||
{
|
||||
[JsonProperty("intro")]
|
||||
Intro,
|
||||
[JsonProperty("commercial")]
|
||||
Commercial,
|
||||
[JsonProperty("bookmark")]
|
||||
Bookmark,
|
||||
[JsonProperty("resume")]
|
||||
Resume,
|
||||
[JsonProperty("credit")]
|
||||
Credit,
|
||||
}
|
||||
|
||||
public static class PostResponses200TypeExtension
|
||||
{
|
||||
public static string Value(this PostResponses200Type value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static PostResponses200Type ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(PostResponses200Type).GetFields())
|
||||
{
|
||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
||||
if (attributes.Length == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var attribute = attributes[0] as JsonPropertyAttribute;
|
||||
if (attribute != null && attribute.PropertyName == value)
|
||||
{
|
||||
var enumVal = field.GetValue(null);
|
||||
|
||||
if (enumVal is PostResponses200Type)
|
||||
{
|
||||
return (PostResponses200Type)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum PostResponses200Type");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
59
LukeHagar/PlexAPI/SDK/Models/Components/Protocol.cs
Normal file
59
LukeHagar/PlexAPI/SDK/Models/Components/Protocol.cs
Normal file
@@ -0,0 +1,59 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
|
||||
public enum Protocol
|
||||
{
|
||||
[JsonProperty("http")]
|
||||
Http,
|
||||
[JsonProperty("hls")]
|
||||
Hls,
|
||||
[JsonProperty("dash")]
|
||||
Dash,
|
||||
}
|
||||
|
||||
public static class ProtocolExtension
|
||||
{
|
||||
public static string Value(this Protocol value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static Protocol ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(Protocol).GetFields())
|
||||
{
|
||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
||||
if (attributes.Length == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var attribute = attributes[0] as JsonPropertyAttribute;
|
||||
if (attribute != null && attribute.PropertyName == value)
|
||||
{
|
||||
var enumVal = field.GetValue(null);
|
||||
|
||||
if (enumVal is Protocol)
|
||||
{
|
||||
return (Protocol)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum Protocol");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// The visibility of this hub in recommendations:<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
/// - all: Visible to all users<br/>
|
||||
/// - none: Visible to no users<br/>
|
||||
/// - admin: Visible to only admin users<br/>
|
||||
/// - shared: Visible to shared users<br/>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
public enum RecommendationsVisibility
|
||||
{
|
||||
[JsonProperty("all")]
|
||||
All,
|
||||
[JsonProperty("none")]
|
||||
None,
|
||||
[JsonProperty("admin")]
|
||||
Admin,
|
||||
[JsonProperty("shared")]
|
||||
Shared,
|
||||
}
|
||||
|
||||
public static class RecommendationsVisibilityExtension
|
||||
{
|
||||
public static string Value(this RecommendationsVisibility value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static RecommendationsVisibility ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(RecommendationsVisibility).GetFields())
|
||||
{
|
||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
||||
if (attributes.Length == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var attribute = attributes[0] as JsonPropertyAttribute;
|
||||
if (attribute != null && attribute.PropertyName == value)
|
||||
{
|
||||
var enumVal = field.GetValue(null);
|
||||
|
||||
if (enumVal is RecommendationsVisibility)
|
||||
{
|
||||
return (RecommendationsVisibility)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum RecommendationsVisibility");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
/// <summary>
|
||||
/// OK
|
||||
/// </summary>
|
||||
public class RequestHandlerSlashGetResponses200
|
||||
{
|
||||
|
||||
[JsonProperty("MediaContainer")]
|
||||
public RequestHandlerSlashGetResponses200MediaContainer? MediaContainer { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
public class RequestHandlerSlashGetResponses200Directory
|
||||
{
|
||||
|
||||
[JsonProperty("count")]
|
||||
public long? Count { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The key where this directory is found
|
||||
/// </summary>
|
||||
[JsonProperty("key")]
|
||||
public string? Key { get; set; }
|
||||
|
||||
[JsonProperty("title")]
|
||||
public string? Title { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,211 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
/// <summary>
|
||||
/// `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.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
/// 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)<br/>
|
||||
/// 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.<br/>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
public class RequestHandlerSlashGetResponses200MediaContainer
|
||||
{
|
||||
|
||||
[JsonProperty("identifier")]
|
||||
public string? Identifier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("offset")]
|
||||
public long? Offset { get; set; }
|
||||
|
||||
[JsonProperty("size")]
|
||||
public long? Size { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("totalSize")]
|
||||
public long? TotalSize { get; set; }
|
||||
|
||||
[JsonProperty("allowCameraUpload")]
|
||||
public bool? AllowCameraUpload { get; set; }
|
||||
|
||||
[JsonProperty("allowChannelAccess")]
|
||||
public bool? AllowChannelAccess { get; set; }
|
||||
|
||||
[JsonProperty("allowMediaDeletion")]
|
||||
public bool? AllowMediaDeletion { get; set; }
|
||||
|
||||
[JsonProperty("allowSharing")]
|
||||
public bool? AllowSharing { get; set; }
|
||||
|
||||
[JsonProperty("allowSync")]
|
||||
public bool? AllowSync { get; set; }
|
||||
|
||||
[JsonProperty("allowTuners")]
|
||||
public bool? AllowTuners { get; set; }
|
||||
|
||||
[JsonProperty("backgroundProcessing")]
|
||||
public bool? BackgroundProcessing { get; set; }
|
||||
|
||||
[JsonProperty("certificate")]
|
||||
public bool? Certificate { get; set; }
|
||||
|
||||
[JsonProperty("companionProxy")]
|
||||
public bool? CompanionProxy { get; set; }
|
||||
|
||||
[JsonProperty("countryCode")]
|
||||
public string? CountryCode { get; set; }
|
||||
|
||||
[JsonProperty("diagnostics")]
|
||||
public string? Diagnostics { get; set; }
|
||||
|
||||
[JsonProperty("eventStream")]
|
||||
public bool? EventStream { get; set; }
|
||||
|
||||
[JsonProperty("friendlyName")]
|
||||
public string? FriendlyName { get; set; }
|
||||
|
||||
[JsonProperty("hubSearch")]
|
||||
public bool? HubSearch { get; set; }
|
||||
|
||||
[JsonProperty("itemClusters")]
|
||||
public bool? ItemClusters { get; set; }
|
||||
|
||||
[JsonProperty("livetv")]
|
||||
public long? Livetv { get; set; }
|
||||
|
||||
[JsonProperty("machineIdentifier")]
|
||||
public object? MachineIdentifier { get; set; }
|
||||
|
||||
[JsonProperty("mediaProviders")]
|
||||
public bool? MediaProviders { get; set; }
|
||||
|
||||
[JsonProperty("multiuser")]
|
||||
public bool? Multiuser { get; set; }
|
||||
|
||||
[JsonProperty("musicAnalysis")]
|
||||
public long? MusicAnalysis { get; set; }
|
||||
|
||||
[JsonProperty("myPlex")]
|
||||
public bool? MyPlex { get; set; }
|
||||
|
||||
[JsonProperty("myPlexMappingState")]
|
||||
public object? MyPlexMappingState { get; set; }
|
||||
|
||||
[JsonProperty("myPlexSigninState")]
|
||||
public object? MyPlexSigninState { get; set; }
|
||||
|
||||
[JsonProperty("myPlexSubscription")]
|
||||
public bool? MyPlexSubscription { get; set; }
|
||||
|
||||
[JsonProperty("myPlexUsername")]
|
||||
public string? MyPlexUsername { get; set; }
|
||||
|
||||
[JsonProperty("offlineTranscode")]
|
||||
public object? OfflineTranscode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A comma-separated list of features which are enabled for the server owner
|
||||
/// </summary>
|
||||
[JsonProperty("ownerFeatures")]
|
||||
public string? OwnerFeatures { get; set; }
|
||||
|
||||
[JsonProperty("platform")]
|
||||
public string? Platform { get; set; }
|
||||
|
||||
[JsonProperty("platformVersion")]
|
||||
public string? PlatformVersion { get; set; }
|
||||
|
||||
[JsonProperty("pluginHost")]
|
||||
public bool? PluginHost { get; set; }
|
||||
|
||||
[JsonProperty("pushNotifications")]
|
||||
public bool? PushNotifications { get; set; }
|
||||
|
||||
[JsonProperty("readOnlyLibraries")]
|
||||
public bool? ReadOnlyLibraries { get; set; }
|
||||
|
||||
[JsonProperty("streamingBrainABRVersion")]
|
||||
public long? StreamingBrainABRVersion { get; set; }
|
||||
|
||||
[JsonProperty("streamingBrainVersion")]
|
||||
public long? StreamingBrainVersion { get; set; }
|
||||
|
||||
[JsonProperty("sync")]
|
||||
public bool? Sync { get; set; }
|
||||
|
||||
[JsonProperty("transcoderActiveVideoSessions")]
|
||||
public long? TranscoderActiveVideoSessions { get; set; }
|
||||
|
||||
[JsonProperty("transcoderAudio")]
|
||||
public bool? TranscoderAudio { get; set; }
|
||||
|
||||
[JsonProperty("transcoderLyrics")]
|
||||
public bool? TranscoderLyrics { get; set; }
|
||||
|
||||
[JsonProperty("transcoderPhoto")]
|
||||
public bool? TranscoderPhoto { get; set; }
|
||||
|
||||
[JsonProperty("transcoderSubtitles")]
|
||||
public bool? TranscoderSubtitles { get; set; }
|
||||
|
||||
[JsonProperty("transcoderVideo")]
|
||||
public bool? TranscoderVideo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The suggested video quality bitrates to present to the user
|
||||
/// </summary>
|
||||
[JsonProperty("transcoderVideoBitrates")]
|
||||
public object? TranscoderVideoBitrates { get; set; }
|
||||
|
||||
[JsonProperty("transcoderVideoQualities")]
|
||||
public string? TranscoderVideoQualities { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The suggested video resolutions to the above quality bitrates
|
||||
/// </summary>
|
||||
[JsonProperty("transcoderVideoResolutions")]
|
||||
public object? TranscoderVideoResolutions { get; set; }
|
||||
|
||||
[JsonProperty("updatedAt")]
|
||||
public long? UpdatedAt { get; set; }
|
||||
|
||||
[JsonProperty("updater")]
|
||||
public bool? Updater { get; set; }
|
||||
|
||||
[JsonProperty("version")]
|
||||
public string? Version { get; set; }
|
||||
|
||||
[JsonProperty("voiceSearch")]
|
||||
public bool? VoiceSearch { get; set; }
|
||||
|
||||
[JsonProperty("Directory")]
|
||||
public List<RequestHandlerSlashGetResponses200Directory>? Directory { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,6 @@ namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
|
||||
[SpeakeasyMetadata("security:scheme=true,type=apiKey,subType=header,name=X-Plex-Token")]
|
||||
public string? AccessToken { get; set; }
|
||||
public string? Token { get; set; }
|
||||
}
|
||||
}
|
||||
40
LukeHagar/PlexAPI/SDK/Models/Components/Session.cs
Normal file
40
LukeHagar/PlexAPI/SDK/Models/Components/Session.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
/// <summary>
|
||||
/// Information about the playback session
|
||||
/// </summary>
|
||||
public class Session
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// The bandwidth used by this client's playback in kbps
|
||||
/// </summary>
|
||||
[JsonProperty("bandwidth")]
|
||||
public long? Bandwidth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The id of the playback session
|
||||
/// </summary>
|
||||
[JsonProperty("id")]
|
||||
public string? Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The location of the client
|
||||
/// </summary>
|
||||
[JsonProperty("location")]
|
||||
public SessionLocation? Location { get; set; }
|
||||
}
|
||||
}
|
||||
60
LukeHagar/PlexAPI/SDK/Models/Components/SessionLocation.cs
Normal file
60
LukeHagar/PlexAPI/SDK/Models/Components/SessionLocation.cs
Normal file
@@ -0,0 +1,60 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// The location of the client
|
||||
/// </summary>
|
||||
public enum SessionLocation
|
||||
{
|
||||
[JsonProperty("lan")]
|
||||
Lan,
|
||||
[JsonProperty("wan")]
|
||||
Wan,
|
||||
}
|
||||
|
||||
public static class SessionLocationExtension
|
||||
{
|
||||
public static string Value(this SessionLocation value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static SessionLocation ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(SessionLocation).GetFields())
|
||||
{
|
||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
||||
if (attributes.Length == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var attribute = attributes[0] as JsonPropertyAttribute;
|
||||
if (attribute != null && attribute.PropertyName == value)
|
||||
{
|
||||
var enumVal = field.GetValue(null);
|
||||
|
||||
if (enumVal is SessionLocation)
|
||||
{
|
||||
return (SessionLocation)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum SessionLocation");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
82
LukeHagar/PlexAPI/SDK/Models/Components/Setting.cs
Normal file
82
LukeHagar/PlexAPI/SDK/Models/Components/Setting.cs
Normal file
@@ -0,0 +1,82 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
/// <summary>
|
||||
/// A configuration setting or preference
|
||||
/// </summary>
|
||||
public class Setting
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// The type of the value of this setting
|
||||
/// </summary>
|
||||
[JsonProperty("type")]
|
||||
public Models.Components.Type? Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The default value of this setting
|
||||
/// </summary>
|
||||
[JsonProperty("default", NullValueHandling = NullValueHandling.Include)]
|
||||
public Default? Default { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether the setting is considered advanced and normally hidden from the user
|
||||
/// </summary>
|
||||
[JsonProperty("advanced")]
|
||||
public bool? Advanced { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The possible values for this setting if restricted. The list is `|` separated with `value:name` entries.
|
||||
/// </summary>
|
||||
[JsonProperty("enumValues")]
|
||||
public string? EnumValues { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The group name of this setting to aid in display of a hierarchy
|
||||
/// </summary>
|
||||
[JsonProperty("group")]
|
||||
public string? Group { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether the setting is hidden or not
|
||||
/// </summary>
|
||||
[JsonProperty("hidden")]
|
||||
public bool? Hidden { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The query parameter name for this setting
|
||||
/// </summary>
|
||||
[JsonProperty("id")]
|
||||
public string? Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A user-friendly name for the setting
|
||||
/// </summary>
|
||||
[JsonProperty("label")]
|
||||
public string? Label { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A description of the setting
|
||||
/// </summary>
|
||||
[JsonProperty("summary")]
|
||||
public string? Summary { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The current value of this setting
|
||||
/// </summary>
|
||||
[JsonProperty("value", NullValueHandling = NullValueHandling.Include)]
|
||||
public Value? Value { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
/// <summary>
|
||||
/// OK
|
||||
/// </summary>
|
||||
public class SlashGetResponses200
|
||||
{
|
||||
|
||||
[JsonProperty("MediaContainer")]
|
||||
public SlashGetResponses200MediaContainer? MediaContainer { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public class SlashGetResponses200MediaContainer
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// The flavors of directory found here:<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
/// - 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.<br/>
|
||||
/// - Secondary: These are marked with `"secondary": true` and were used by old clients to provide nested menus allowing for primative (but structured) navigation.<br/>
|
||||
/// - 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.
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("content")]
|
||||
public string? Content { get; set; }
|
||||
|
||||
[JsonProperty("allowSync")]
|
||||
public bool? AllowSync { get; set; }
|
||||
|
||||
[JsonProperty("art")]
|
||||
public string? Art { get; set; }
|
||||
|
||||
[JsonProperty("Directory")]
|
||||
public List<Models.Components.Metadata>? Directory { get; set; }
|
||||
|
||||
[JsonProperty("identifier")]
|
||||
public string? Identifier { get; set; }
|
||||
|
||||
[JsonProperty("librarySectionID")]
|
||||
public long? LibrarySectionID { get; set; }
|
||||
|
||||
[JsonProperty("mediaTagPrefix")]
|
||||
public string? MediaTagPrefix { get; set; }
|
||||
|
||||
[JsonProperty("mediaTagVersion")]
|
||||
public long? MediaTagVersion { get; set; }
|
||||
|
||||
[JsonProperty("size")]
|
||||
public long? Size { get; set; }
|
||||
|
||||
[JsonProperty("sortAsc")]
|
||||
public bool? SortAsc { get; set; }
|
||||
|
||||
[JsonProperty("thumb")]
|
||||
public string? Thumb { get; set; }
|
||||
|
||||
[JsonProperty("title1")]
|
||||
public string? Title1 { get; set; }
|
||||
|
||||
[JsonProperty("viewGroup")]
|
||||
public string? ViewGroup { get; set; }
|
||||
|
||||
[JsonProperty("viewMode")]
|
||||
public long? ViewMode { get; set; }
|
||||
}
|
||||
}
|
||||
105
LukeHagar/PlexAPI/SDK/Models/Components/Sort.cs
Normal file
105
LukeHagar/PlexAPI/SDK/Models/Components/Sort.cs
Normal file
@@ -0,0 +1,105 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
/// <summary>
|
||||
/// Each `Sort` object contains a description of the sort field.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
public class Sort
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// The title of the field.
|
||||
/// </summary>
|
||||
[JsonProperty("title")]
|
||||
public string? Title { get; set; }
|
||||
|
||||
[JsonProperty("type")]
|
||||
public string? Type { get; set; }
|
||||
|
||||
[JsonProperty("art")]
|
||||
public string? Art { get; set; }
|
||||
|
||||
[JsonProperty("content")]
|
||||
public bool? Content { get; set; }
|
||||
|
||||
[JsonProperty("filter")]
|
||||
public string? Filter { get; set; }
|
||||
|
||||
[JsonProperty("hasPrefs")]
|
||||
public bool? HasPrefs { get; set; }
|
||||
|
||||
[JsonProperty("hasStoreServices")]
|
||||
public bool? HasStoreServices { get; set; }
|
||||
|
||||
[JsonProperty("hubKey")]
|
||||
public string? HubKey { get; set; }
|
||||
|
||||
[JsonProperty("identifier")]
|
||||
public string? Identifier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The key to use in the sort field to make items sort by this item
|
||||
/// </summary>
|
||||
[JsonProperty("key")]
|
||||
public string? Key { get; set; }
|
||||
|
||||
[JsonProperty("lastAccessedAt")]
|
||||
public long? LastAccessedAt { get; set; }
|
||||
|
||||
[JsonProperty("Pivot")]
|
||||
public List<SortPivot>? Pivot { get; set; }
|
||||
|
||||
[JsonProperty("share")]
|
||||
public long? Share { get; set; }
|
||||
|
||||
[JsonProperty("thumb")]
|
||||
public string? Thumb { get; set; }
|
||||
|
||||
[JsonProperty("titleBar")]
|
||||
public string? TitleBar { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// If present, this sort is the default and in this direction
|
||||
/// </summary>
|
||||
[JsonProperty("default")]
|
||||
public SortDefault? Default { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// This default diction of this sort
|
||||
/// </summary>
|
||||
[JsonProperty("defaultDirection")]
|
||||
public DefaultDirection? DefaultDirection { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The key for sorting this field in reverse order
|
||||
/// </summary>
|
||||
[JsonProperty("descKey")]
|
||||
public string? DescKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The key to use to get items sorted by this field and indexed by the first character
|
||||
/// </summary>
|
||||
[JsonProperty("firstCharacterKey")]
|
||||
public string? FirstCharacterKey { get; set; }
|
||||
|
||||
[JsonProperty("additionalProperties")]
|
||||
public Dictionary<string, object>? AdditionalProperties { get; set; }
|
||||
}
|
||||
}
|
||||
60
LukeHagar/PlexAPI/SDK/Models/Components/SortDefault.cs
Normal file
60
LukeHagar/PlexAPI/SDK/Models/Components/SortDefault.cs
Normal file
@@ -0,0 +1,60 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// If present, this sort is the default and in this direction
|
||||
/// </summary>
|
||||
public enum SortDefault
|
||||
{
|
||||
[JsonProperty("asc")]
|
||||
Asc,
|
||||
[JsonProperty("desc")]
|
||||
Desc,
|
||||
}
|
||||
|
||||
public static class SortDefaultExtension
|
||||
{
|
||||
public static string Value(this SortDefault value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static SortDefault ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(SortDefault).GetFields())
|
||||
{
|
||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
||||
if (attributes.Length == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var attribute = attributes[0] as JsonPropertyAttribute;
|
||||
if (attribute != null && attribute.PropertyName == value)
|
||||
{
|
||||
var enumVal = field.GetValue(null);
|
||||
|
||||
if (enumVal is SortDefault)
|
||||
{
|
||||
return (SortDefault)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum SortDefault");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
36
LukeHagar/PlexAPI/SDK/Models/Components/SortPivot.cs
Normal file
36
LukeHagar/PlexAPI/SDK/Models/Components/SortPivot.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
public class SortPivot
|
||||
{
|
||||
|
||||
[JsonProperty("title")]
|
||||
public string? Title { get; set; }
|
||||
|
||||
[JsonProperty("type")]
|
||||
public string? Type { get; set; }
|
||||
|
||||
[JsonProperty("context")]
|
||||
public string? Context { get; set; }
|
||||
|
||||
[JsonProperty("id")]
|
||||
public string? Id { get; set; }
|
||||
|
||||
[JsonProperty("key")]
|
||||
public string? Key { get; set; }
|
||||
|
||||
[JsonProperty("symbol")]
|
||||
public string? Symbol { get; set; }
|
||||
}
|
||||
}
|
||||
69
LukeHagar/PlexAPI/SDK/Models/Components/Status.cs
Normal file
69
LukeHagar/PlexAPI/SDK/Models/Components/Status.cs
Normal file
@@ -0,0 +1,69 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
|
||||
public enum Status
|
||||
{
|
||||
[JsonProperty("inactive")]
|
||||
Inactive,
|
||||
[JsonProperty("scheduled")]
|
||||
Scheduled,
|
||||
[JsonProperty("inprogress")]
|
||||
Inprogress,
|
||||
[JsonProperty("complete")]
|
||||
Complete,
|
||||
[JsonProperty("cancelled")]
|
||||
Cancelled,
|
||||
[JsonProperty("error")]
|
||||
Error,
|
||||
[JsonProperty("postprocessing")]
|
||||
Postprocessing,
|
||||
[JsonProperty("paused")]
|
||||
Paused,
|
||||
}
|
||||
|
||||
public static class StatusExtension
|
||||
{
|
||||
public static string Value(this Status value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static Status ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(Status).GetFields())
|
||||
{
|
||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
||||
if (attributes.Length == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var attribute = attributes[0] as JsonPropertyAttribute;
|
||||
if (attribute != null && attribute.PropertyName == value)
|
||||
{
|
||||
var enumVal = field.GetValue(null);
|
||||
|
||||
if (enumVal is Status)
|
||||
{
|
||||
return (Status)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum Status");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
137
LukeHagar/PlexAPI/SDK/Models/Components/Stream.cs
Normal file
137
LukeHagar/PlexAPI/SDK/Models/Components/Stream.cs
Normal file
@@ -0,0 +1,137 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
/// <summary>
|
||||
/// `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).<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
public class Stream
|
||||
{
|
||||
|
||||
[JsonProperty("default")]
|
||||
public bool? Default { get; set; }
|
||||
|
||||
[JsonProperty("audioChannelLayout")]
|
||||
public object? AudioChannelLayout { get; set; }
|
||||
|
||||
[JsonProperty("bitDepth")]
|
||||
public long? BitDepth { get; set; }
|
||||
|
||||
[JsonProperty("bitrate")]
|
||||
public long? Bitrate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// For subtitle streams only. If `true` then the server can attempt to automatically sync the subtitle timestamps with the video.
|
||||
/// </summary>
|
||||
[JsonProperty("canAutoSync")]
|
||||
public bool? CanAutoSync { get; set; }
|
||||
|
||||
[JsonProperty("chromaLocation")]
|
||||
public object? ChromaLocation { get; set; }
|
||||
|
||||
[JsonProperty("chromaSubsampling")]
|
||||
public object? ChromaSubsampling { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The codec of the stream, such as `h264` or `aac`
|
||||
/// </summary>
|
||||
[JsonProperty("codec")]
|
||||
public object? Codec { get; set; }
|
||||
|
||||
[JsonProperty("colorPrimaries")]
|
||||
public object? ColorPrimaries { get; set; }
|
||||
|
||||
[JsonProperty("colorRange")]
|
||||
public object? ColorRange { get; set; }
|
||||
|
||||
[JsonProperty("colorSpace")]
|
||||
public object? ColorSpace { get; set; }
|
||||
|
||||
[JsonProperty("colorTrc")]
|
||||
public object? ColorTrc { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A friendly name for the stream, often comprised of the language and codec information
|
||||
/// </summary>
|
||||
[JsonProperty("displayTitle")]
|
||||
public object? DisplayTitle { get; set; }
|
||||
|
||||
[JsonProperty("frameRate")]
|
||||
public double? FrameRate { get; set; }
|
||||
|
||||
[JsonProperty("hasScalingMatrix")]
|
||||
public object? HasScalingMatrix { get; set; }
|
||||
|
||||
[JsonProperty("height")]
|
||||
public long? Height { get; set; }
|
||||
|
||||
[JsonProperty("id")]
|
||||
public long? Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// If the stream is part of the `Part` and not an external resource, the index of the stream within that part
|
||||
/// </summary>
|
||||
[JsonProperty("index")]
|
||||
public long? Index { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// If the stream is independently streamable, the key from which it can be streamed
|
||||
/// </summary>
|
||||
[JsonProperty("key")]
|
||||
public object? Key { get; set; }
|
||||
|
||||
[JsonProperty("language")]
|
||||
public object? Language { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The three character language code for the stream contents
|
||||
/// </summary>
|
||||
[JsonProperty("languageCode")]
|
||||
public object? LanguageCode { get; set; }
|
||||
|
||||
[JsonProperty("level")]
|
||||
public long? Level { get; set; }
|
||||
|
||||
[JsonProperty("profile")]
|
||||
public object? Profile { get; set; }
|
||||
|
||||
[JsonProperty("refFrames")]
|
||||
public long? RefFrames { get; set; }
|
||||
|
||||
[JsonProperty("samplingRate")]
|
||||
public long? SamplingRate { get; set; }
|
||||
|
||||
[JsonProperty("selected")]
|
||||
public bool? Selected { get; set; }
|
||||
|
||||
[JsonProperty("streamIdentifier")]
|
||||
public long? StreamIdentifier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A number indicating the type of the stream. `1` for video, `2` for audio, `3` for subtitles, `4` for lyrics
|
||||
/// </summary>
|
||||
[JsonProperty("streamType")]
|
||||
public long? StreamType { get; set; }
|
||||
|
||||
[JsonProperty("width")]
|
||||
public long? Width { get; set; }
|
||||
|
||||
[JsonProperty("additionalProperties")]
|
||||
public Dictionary<string, object>? AdditionalProperties { get; set; }
|
||||
}
|
||||
}
|
||||
67
LukeHagar/PlexAPI/SDK/Models/Components/Subtitles.cs
Normal file
67
LukeHagar/PlexAPI/SDK/Models/Components/Subtitles.cs
Normal file
@@ -0,0 +1,67 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
|
||||
public enum Subtitles
|
||||
{
|
||||
[JsonProperty("auto")]
|
||||
Auto,
|
||||
[JsonProperty("burn")]
|
||||
Burn,
|
||||
[JsonProperty("none")]
|
||||
None,
|
||||
[JsonProperty("sidecar")]
|
||||
Sidecar,
|
||||
[JsonProperty("embedded")]
|
||||
Embedded,
|
||||
[JsonProperty("segmented")]
|
||||
Segmented,
|
||||
[JsonProperty("unknown")]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
public static class SubtitlesExtension
|
||||
{
|
||||
public static string Value(this Subtitles value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static Subtitles ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(Subtitles).GetFields())
|
||||
{
|
||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
||||
if (attributes.Length == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var attribute = attributes[0] as JsonPropertyAttribute;
|
||||
if (attribute != null && attribute.PropertyName == value)
|
||||
{
|
||||
var enumVal = field.GetValue(null);
|
||||
|
||||
if (enumVal is Subtitles)
|
||||
{
|
||||
return (Subtitles)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum Subtitles");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user