ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.401.2

This commit is contained in:
speakeasybot
2024-09-21 00:21:00 +00:00
parent 3b6806d2db
commit 4b10ba72ca
123 changed files with 1656 additions and 2081 deletions

View File

@@ -10,51 +10,14 @@
namespace LukeHagar.PlexAPI.SDK.Models.Requests
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using System;
/// <summary>
/// The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)
/// </summary>
public enum AutoSelectSubtitle
{
[JsonProperty("0")]
Zero,
[JsonProperty("1")]
One,
}
public static class AutoSelectSubtitleExtension
{
public static string Value(this AutoSelectSubtitle value)
{
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
}
public static AutoSelectSubtitle ToEnum(this string value)
{
foreach(var field in typeof(AutoSelectSubtitle).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 AutoSelectSubtitle)
{
return (AutoSelectSubtitle)enumVal;
}
}
}
throw new Exception($"Unknown value {value} for enum AutoSelectSubtitle");
}
Disable = 0,
Enable = 1,
}
}

View File

@@ -9,30 +9,52 @@
#nullable enable
namespace LukeHagar.PlexAPI.SDK.Models.Requests
{
using LukeHagar.PlexAPI.SDK.Models.Requests;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
public class Connections
{
/// <summary>
/// The protocol used for the connection (http, https, etc)
/// </summary>
[JsonProperty("protocol")]
public string Protocol { get; set; } = default!;
public Protocol Protocol { get; set; } = default!;
/// <summary>
/// The (ip) address or domain name used for the connection
/// </summary>
[JsonProperty("address")]
public string Address { get; set; } = default!;
/// <summary>
/// The port used for the connection
/// </summary>
[JsonProperty("port")]
public double Port { get; set; } = default!;
public int Port { get; set; } = default!;
/// <summary>
/// The full URI of the connection
/// </summary>
[JsonProperty("uri")]
public string Uri { get; set; } = default!;
/// <summary>
/// If the connection is local address
/// </summary>
[JsonProperty("local")]
public bool Local { get; set; } = default!;
/// <summary>
/// If the connection is relayed through plex.direct
/// </summary>
[JsonProperty("relay")]
public bool Relay { get; set; } = default!;
/// <summary>
/// If the connection is using IPv6
/// </summary>
[JsonProperty("IPv6")]
public bool IPv6 { get; set; } = default!;
}

View File

@@ -10,51 +10,14 @@
namespace LukeHagar.PlexAPI.SDK.Models.Requests
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using System;
/// <summary>
/// The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles)
/// The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only show non-SDH subtitles)
/// </summary>
public enum DefaultSubtitleAccessibility
{
[JsonProperty("0")]
Zero,
[JsonProperty("1")]
One,
}
public static class DefaultSubtitleAccessibilityExtension
{
public static string Value(this DefaultSubtitleAccessibility value)
{
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
}
public static DefaultSubtitleAccessibility ToEnum(this string value)
{
foreach(var field in typeof(DefaultSubtitleAccessibility).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 DefaultSubtitleAccessibility)
{
return (DefaultSubtitleAccessibility)enumVal;
}
}
}
throw new Exception($"Unknown value {value} for enum DefaultSubtitleAccessibility");
}
Disable = 0,
Enable = 1,
}
}

View File

@@ -10,51 +10,14 @@
namespace LukeHagar.PlexAPI.SDK.Models.Requests
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using System;
/// <summary>
/// The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles)
/// </summary>
public enum DefaultSubtitleForced
{
[JsonProperty("0")]
Zero,
[JsonProperty("1")]
One,
}
public static class DefaultSubtitleForcedExtension
{
public static string Value(this DefaultSubtitleForced value)
{
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
}
public static DefaultSubtitleForced ToEnum(this string value)
{
foreach(var field in typeof(DefaultSubtitleForced).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 DefaultSubtitleForced)
{
return (DefaultSubtitleForced)enumVal;
}
}
}
throw new Exception($"Unknown value {value} for enum DefaultSubtitleForced");
}
Disable = 0,
Enable = 1,
}
}

View File

@@ -18,75 +18,75 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
{
[JsonProperty("allowSync")]
public bool? AllowSync { get; set; }
public bool AllowSync { get; set; } = default!;
[JsonProperty("art")]
public string? Art { get; set; }
public string Art { get; set; } = default!;
[JsonProperty("composite")]
public string? Composite { get; set; }
public string Composite { get; set; } = default!;
[JsonProperty("filters")]
public bool? Filters { get; set; }
public bool Filters { get; set; } = default!;
[JsonProperty("refreshing")]
public bool? Refreshing { get; set; }
public bool Refreshing { get; set; } = default!;
[JsonProperty("thumb")]
public string? Thumb { get; set; }
public string Thumb { get; set; } = default!;
[JsonProperty("key")]
public string? Key { get; set; }
public string Key { get; set; } = default!;
[JsonProperty("type")]
public string? Type { get; set; }
public string Type { get; set; } = default!;
[JsonProperty("title")]
public string? Title { get; set; }
public string Title { get; set; } = default!;
[JsonProperty("agent")]
public string? Agent { get; set; }
public string Agent { get; set; } = default!;
[JsonProperty("scanner")]
public string? Scanner { get; set; }
public string Scanner { get; set; } = default!;
[JsonProperty("language")]
public string? Language { get; set; }
public string Language { get; set; } = default!;
[JsonProperty("uuid")]
public string? Uuid { get; set; }
public string Uuid { get; set; } = default!;
/// <summary>
/// Unix epoch datetime
/// Unix epoch datetime in seconds
/// </summary>
[JsonProperty("updatedAt")]
public long? UpdatedAt { get; set; }
public long UpdatedAt { get; set; } = default!;
/// <summary>
/// Unix epoch datetime
/// Unix epoch datetime in seconds
/// </summary>
[JsonProperty("createdAt")]
public long? CreatedAt { get; set; }
public long CreatedAt { get; set; } = default!;
/// <summary>
/// Unix epoch datetime
/// Unix epoch datetime in seconds
/// </summary>
[JsonProperty("scannedAt")]
public long? ScannedAt { get; set; }
public long ScannedAt { get; set; } = default!;
[JsonProperty("content")]
public bool? Content { get; set; }
public bool Content { get; set; } = default!;
[JsonProperty("directory")]
public bool? Directory { get; set; }
public bool Directory { get; set; } = default!;
[JsonProperty("contentChangedAt")]
public int? ContentChangedAt { get; set; }
public int ContentChangedAt { get; set; } = default!;
[JsonProperty("hidden")]
public int? Hidden { get; set; }
public int Hidden { get; set; } = default!;
[JsonProperty("Location")]
public List<Location>? Location { get; set; }
public List<Location> Location { get; set; } = default!;
}
}

View File

@@ -27,6 +27,6 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
public string Title1 { get; set; } = default!;
[JsonProperty("Directory")]
public List<GetAllLibrariesDirectory>? Directory { get; set; }
public List<GetAllLibrariesDirectory> Directory { get; set; } = default!;
}
}

View File

@@ -20,6 +20,6 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
{
[JsonProperty("MediaContainer")]
public GetAllLibrariesMediaContainer? MediaContainer { get; set; }
public GetAllLibrariesMediaContainer MediaContainer { get; set; } = default!;
}
}

View 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.Requests
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
public class GetLibraryItemsField
{
[JsonProperty("key")]
public string Key { get; set; } = default!;
[JsonProperty("title")]
public string Title { get; set; } = default!;
[JsonProperty("type")]
public string Type { get; set; } = default!;
[JsonProperty("subType")]
public string? SubType { get; set; }
}
}

View File

@@ -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.Requests
{
using LukeHagar.PlexAPI.SDK.Models.Requests;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using System.Collections.Generic;
public class GetLibraryItemsFieldType
{
[JsonProperty("type")]
public string Type { get; set; } = default!;
[JsonProperty("Operator")]
public List<GetLibraryItemsOperator> Operator { get; set; } = default!;
}
}

View File

@@ -0,0 +1,33 @@
//------------------------------------------------------------------------------
// <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.Requests
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
public class GetLibraryItemsFilter
{
[JsonProperty("filter")]
public string Filter { get; set; } = default!;
[JsonProperty("filterType")]
public string FilterType { get; set; } = default!;
[JsonProperty("key")]
public string Key { get; set; } = default!;
[JsonProperty("title")]
public string Title { get; set; } = default!;
[JsonProperty("type")]
public string Type { get; set; } = default!;
}
}

View File

@@ -19,43 +19,43 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
{
[JsonProperty("size")]
public int? Size { get; set; }
public int Size { get; set; } = default!;
[JsonProperty("allowSync")]
public bool? AllowSync { get; set; }
public bool AllowSync { get; set; } = default!;
[JsonProperty("art")]
public string? Art { get; set; }
public string Art { get; set; } = default!;
[JsonProperty("identifier")]
public string? Identifier { get; set; }
public string Identifier { get; set; } = default!;
[JsonProperty("librarySectionID")]
public LibrarySectionID? LibrarySectionID { get; set; }
public LibrarySectionID LibrarySectionID { get; set; } = default!;
[JsonProperty("librarySectionTitle")]
public string? LibrarySectionTitle { get; set; }
public string LibrarySectionTitle { get; set; } = default!;
[JsonProperty("librarySectionUUID")]
public string? LibrarySectionUUID { get; set; }
public string LibrarySectionUUID { get; set; } = default!;
[JsonProperty("mediaTagPrefix")]
public string? MediaTagPrefix { get; set; }
public string MediaTagPrefix { get; set; } = default!;
[JsonProperty("mediaTagVersion")]
public int? MediaTagVersion { get; set; }
public int MediaTagVersion { get; set; } = default!;
[JsonProperty("thumb")]
public string? Thumb { get; set; }
public string Thumb { get; set; } = default!;
[JsonProperty("title1")]
public string? Title1 { get; set; }
public string Title1 { get; set; } = default!;
[JsonProperty("title2")]
public string? Title2 { get; set; }
public string Title2 { get; set; } = default!;
[JsonProperty("viewGroup")]
public string? ViewGroup { get; set; }
public string ViewGroup { get; set; } = default!;
[JsonProperty("viewMode")]
public int? ViewMode { get; set; }
@@ -65,5 +65,15 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
[JsonProperty("Metadata")]
public List<GetLibraryItemsMetadata>? Metadata { get; set; }
/// <summary>
/// The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.<br/>
///
/// <remarks>
///
/// </remarks>
/// </summary>
[JsonProperty("Meta")]
public Meta? Meta { get; set; }
}
}

View File

@@ -19,22 +19,22 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
{
[JsonProperty("ratingKey")]
public string? RatingKey { get; set; }
public string RatingKey { get; set; } = default!;
[JsonProperty("key")]
public string? Key { get; set; }
public string Key { get; set; } = default!;
[JsonProperty("guid")]
public string? Guid { get; set; }
public string Guid { get; set; } = default!;
[JsonProperty("studio")]
public string? Studio { get; set; }
[JsonProperty("type")]
public string? Type { get; set; }
public string Type { get; set; } = default!;
[JsonProperty("title")]
public string? Title { get; set; }
public string Title { get; set; } = default!;
[JsonProperty("contentRating")]
public string? ContentRating { get; set; }
@@ -49,7 +49,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
public double? AudienceRating { get; set; }
[JsonProperty("year")]
public int? Year { get; set; }
public int Year { get; set; } = default!;
[JsonProperty("tagline")]
public string? Tagline { get; set; }
@@ -61,7 +61,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
public string? Art { get; set; }
[JsonProperty("duration")]
public int? Duration { get; set; }
public int Duration { get; set; } = default!;
[JsonProperty("originallyAvailableAt")]
public LocalDate? OriginallyAvailableAt { get; set; }
@@ -106,7 +106,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
public string? GrandparentTheme { get; set; }
[JsonProperty("Media")]
public List<GetLibraryItemsMedia>? Media { get; set; }
public List<GetLibraryItemsMedia> Media { get; set; } = default!;
[JsonProperty("Genre")]
public List<GetLibraryItemsGenre>? Genre { get; set; }
@@ -123,6 +123,16 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
[JsonProperty("Role")]
public List<GetLibraryItemsRole>? Role { get; set; }
/// <summary>
/// The Guid object is only included in the response if the `includeGuids` parameter is set to `1`.<br/>
///
/// <remarks>
///
/// </remarks>
/// </summary>
[JsonProperty("Guid")]
public List<MediaGuid>? MediaGuid { get; set; }
[JsonProperty("titleSort")]
public string? TitleSort { get; set; }

View File

@@ -0,0 +1,24 @@
//------------------------------------------------------------------------------
// <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.Requests
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
public class GetLibraryItemsOperator
{
[JsonProperty("key")]
public string Key { get; set; } = default!;
[JsonProperty("title")]
public string Title { get; set; } = default!;
}
}

View File

@@ -55,7 +55,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
/// </remarks>
/// </summary>
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeGuids")]
public IncludeGuids? IncludeGuids { get; set; }
public IncludeGuids? IncludeGuids { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.IncludeGuids.Disable;
/// <summary>
/// Adds the Meta object to the response<br/>
@@ -65,7 +65,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
/// </remarks>
/// </summary>
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeMeta")]
public IncludeMeta? IncludeMeta { get; set; }
public IncludeMeta? IncludeMeta { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.IncludeMeta.Disable;
/// <summary>
/// The index of the first item to return. If not specified, the first item will be returned.<br/>

View 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.Requests
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
public class GetLibraryItemsSort
{
[JsonProperty("default")]
public string? Default { get; set; }
[JsonProperty("defaultDirection")]
public string DefaultDirection { get; set; } = default!;
[JsonProperty("descKey")]
public string? DescKey { get; set; }
[JsonProperty("firstCharacterKey")]
public string? FirstCharacterKey { get; set; }
[JsonProperty("key")]
public string Key { get; set; } = default!;
[JsonProperty("title")]
public string Title { get; set; } = default!;
}
}

View File

@@ -0,0 +1,41 @@
//------------------------------------------------------------------------------
// <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.Requests
{
using LukeHagar.PlexAPI.SDK.Models.Requests;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using System.Collections.Generic;
public class GetLibraryItemsType
{
[JsonProperty("key")]
public string Key { get; set; } = default!;
[JsonProperty("type")]
public string Type { get; set; } = default!;
[JsonProperty("title")]
public string Title { get; set; } = default!;
[JsonProperty("active")]
public bool Active { get; set; } = default!;
[JsonProperty("Filter")]
public List<GetLibraryItemsFilter>? Filter { get; set; }
[JsonProperty("Sort")]
public List<GetLibraryItemsSort>? Sort { get; set; }
[JsonProperty("Field")]
public List<GetLibraryItemsField>? Field { get; set; }
}
}

View File

@@ -26,18 +26,6 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=strong")]
public bool? Strong { get; set; } = false;
/// <summary>
/// The unique identifier for the client application<br/>
///
/// <remarks>
/// This is used to track the client application and its usage<br/>
/// (UUID, serial number, or other number unique per device)<br/>
///
/// </remarks>
/// </summary>
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Client-Identifier")]
public string? ClientID { get; set; }
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Product")]
public string? ClientName { get; set; }

View File

@@ -25,10 +25,10 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
/// </summary>
public enum GetPlaylistContentsQueryParamType
{
One = 1,
Two = 2,
Three = 3,
Four = 4,
Movie = 1,
Show = 2,
Season = 3,
Episode = 4,
}
}

View File

@@ -15,23 +15,11 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
public class GetServerResourcesRequest
{
/// <summary>
/// The unique identifier for the client application<br/>
///
/// <remarks>
/// This is used to track the client application and its usage<br/>
/// (UUID, serial number, or other number unique per device)<br/>
///
/// </remarks>
/// </summary>
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Client-Identifier")]
public string? ClientID { get; set; }
/// <summary>
/// Include Https entries in the results
/// </summary>
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeHttps")]
public IncludeHttps? IncludeHttps { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.IncludeHttps.Zero;
public IncludeHttps? IncludeHttps { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.IncludeHttps.Disable;
/// <summary>
/// Include Relay addresses in the results <br/>
@@ -42,12 +30,12 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
/// </remarks>
/// </summary>
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeRelay")]
public IncludeRelay? IncludeRelay { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.IncludeRelay.Zero;
public IncludeRelay? IncludeRelay { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.IncludeRelay.Disable;
/// <summary>
/// Include IPv6 entries in the results
/// </summary>
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeIPv6")]
public IncludeIPv6? IncludeIPv6 { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.IncludeIPv6.Zero;
public IncludeIPv6? IncludeIPv6 { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.IncludeIPv6.Disable;
}
}

View File

@@ -19,17 +19,5 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
/// </summary>
[SpeakeasyMetadata("pathParam:style=simple,explode=false,name=pinID")]
public long PinID { get; set; } = default!;
/// <summary>
/// The unique identifier for the client application<br/>
///
/// <remarks>
/// This is used to track the client application and its usage<br/>
/// (UUID, serial number, or other number unique per device)<br/>
///
/// </remarks>
/// </summary>
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Client-Identifier")]
public string? ClientID { get; set; }
}
}

View File

@@ -136,7 +136,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
public int Id { get; set; } = default!;
/// <summary>
/// Unix epoch datetime
/// Unix epoch datetime in seconds
/// </summary>
[JsonProperty("joinedAt")]
public long JoinedAt { get; set; } = default!;
@@ -182,7 +182,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
public bool? Protected { get; set; } = false;
/// <summary>
/// Unix epoch datetime
/// Unix epoch datetime in seconds
/// </summary>
[JsonProperty("rememberExpiresAt")]
public long RememberExpiresAt { get; set; } = default!;

View File

@@ -25,10 +25,10 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
/// </summary>
public enum GetTopWatchedContentQueryParamType
{
One = 1,
Two = 2,
Three = 3,
Four = 4,
Movie = 1,
Show = 2,
Season = 3,
Episode = 4,
}
}

View File

@@ -20,8 +20,8 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
/// </summary>
public enum IncludeGuids
{
Zero = 0,
One = 1,
Disable = 0,
Enable = 1,
}
}

View File

@@ -16,8 +16,8 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
/// </summary>
public enum IncludeHttps
{
Zero = 0,
One = 1,
Disable = 0,
Enable = 1,
}
}

View File

@@ -16,8 +16,8 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
/// </summary>
public enum IncludeIPv6
{
Zero = 0,
One = 1,
Disable = 0,
Enable = 1,
}
}

View File

@@ -20,8 +20,8 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
/// </summary>
public enum IncludeMeta
{
Zero = 0,
One = 1,
Disable = 0,
Enable = 1,
}
}

View File

@@ -21,8 +21,8 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
/// </summary>
public enum IncludeRelay
{
Zero = 0,
One = 1,
Disable = 0,
Enable = 1,
}
}

View File

@@ -16,9 +16,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
{
[JsonProperty("id")]
public int? Id { get; set; }
public int Id { get; set; } = default!;
[JsonProperty("path")]
public string? Path { get; set; }
public string Path { get; set; } = default!;
}
}

View File

@@ -0,0 +1,29 @@
//------------------------------------------------------------------------------
// <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.Requests
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
public class MediaGuid
{
/// <summary>
/// Can be one of the following formats:<br/>
///
/// <remarks>
/// imdb://tt13015952, tmdb://2434012, tvdb://7945991<br/>
///
/// </remarks>
/// </summary>
[JsonProperty("id")]
public string Id { get; set; } = default!;
}
}

View File

@@ -11,10 +11,13 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
{
using LukeHagar.PlexAPI.SDK.Utils;
/// <summary>
/// Whether or not the account has media reviews visibility enabled
/// </summary>
public enum MediaReviewsVisibility
{
Zero = 0,
One = 1,
Disable = 0,
Enable = 1,
}
}

View File

@@ -0,0 +1,33 @@
//------------------------------------------------------------------------------
// <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.Requests
{
using LukeHagar.PlexAPI.SDK.Models.Requests;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using System.Collections.Generic;
/// <summary>
/// The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.<br/>
///
/// <remarks>
///
/// </remarks>
/// </summary>
public class Meta
{
[JsonProperty("Type")]
public List<GetLibraryItemsType>? Type { get; set; }
[JsonProperty("FieldType")]
public List<GetLibraryItemsFieldType>? FieldType { get; set; }
}
}

View File

@@ -10,51 +10,14 @@
namespace LukeHagar.PlexAPI.SDK.Models.Requests
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using System;
/// <summary>
/// The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)
/// </summary>
public enum PostUsersSignInDataAutoSelectSubtitle
{
[JsonProperty("0")]
Zero,
[JsonProperty("1")]
One,
}
public static class PostUsersSignInDataAutoSelectSubtitleExtension
{
public static string Value(this PostUsersSignInDataAutoSelectSubtitle value)
{
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
}
public static PostUsersSignInDataAutoSelectSubtitle ToEnum(this string value)
{
foreach(var field in typeof(PostUsersSignInDataAutoSelectSubtitle).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 PostUsersSignInDataAutoSelectSubtitle)
{
return (PostUsersSignInDataAutoSelectSubtitle)enumVal;
}
}
}
throw new Exception($"Unknown value {value} for enum PostUsersSignInDataAutoSelectSubtitle");
}
Disable = 0,
Enable = 1,
}
}

View File

@@ -10,51 +10,14 @@
namespace LukeHagar.PlexAPI.SDK.Models.Requests
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using System;
/// <summary>
/// The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles)
/// The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only show non-SDH subtitles)
/// </summary>
public enum PostUsersSignInDataDefaultSubtitleAccessibility
{
[JsonProperty("0")]
Zero,
[JsonProperty("1")]
One,
}
public static class PostUsersSignInDataDefaultSubtitleAccessibilityExtension
{
public static string Value(this PostUsersSignInDataDefaultSubtitleAccessibility value)
{
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
}
public static PostUsersSignInDataDefaultSubtitleAccessibility ToEnum(this string value)
{
foreach(var field in typeof(PostUsersSignInDataDefaultSubtitleAccessibility).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 PostUsersSignInDataDefaultSubtitleAccessibility)
{
return (PostUsersSignInDataDefaultSubtitleAccessibility)enumVal;
}
}
}
throw new Exception($"Unknown value {value} for enum PostUsersSignInDataDefaultSubtitleAccessibility");
}
Disable = 0,
Enable = 1,
}
}

View File

@@ -10,51 +10,14 @@
namespace LukeHagar.PlexAPI.SDK.Models.Requests
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using System;
/// <summary>
/// The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles)
/// </summary>
public enum PostUsersSignInDataDefaultSubtitleForced
{
[JsonProperty("0")]
Zero,
[JsonProperty("1")]
One,
}
public static class PostUsersSignInDataDefaultSubtitleForcedExtension
{
public static string Value(this PostUsersSignInDataDefaultSubtitleForced value)
{
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
}
public static PostUsersSignInDataDefaultSubtitleForced ToEnum(this string value)
{
foreach(var field in typeof(PostUsersSignInDataDefaultSubtitleForced).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 PostUsersSignInDataDefaultSubtitleForced)
{
return (PostUsersSignInDataDefaultSubtitleForced)enumVal;
}
}
}
throw new Exception($"Unknown value {value} for enum PostUsersSignInDataDefaultSubtitleForced");
}
Disable = 0,
Enable = 1,
}
}

View File

@@ -11,10 +11,13 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
{
using LukeHagar.PlexAPI.SDK.Utils;
/// <summary>
/// Whether or not the account has media reviews visibility enabled
/// </summary>
public enum PostUsersSignInDataMediaReviewsVisibility
{
Zero = 0,
One = 1,
Disable = 0,
Enable = 1,
}
}

View File

@@ -1,36 +0,0 @@
//------------------------------------------------------------------------------
// <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.Requests
{
using LukeHagar.PlexAPI.SDK.Models.Requests;
using LukeHagar.PlexAPI.SDK.Utils;
public class PostUsersSignInDataRequest
{
/// <summary>
/// The unique identifier for the client application<br/>
///
/// <remarks>
/// This is used to track the client application and its usage<br/>
/// (UUID, serial number, or other number unique per device)<br/>
///
/// </remarks>
/// </summary>
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Client-Identifier")]
public string? ClientID { get; set; }
/// <summary>
/// Login credentials
/// </summary>
[SpeakeasyMetadata("request:mediaType=application/x-www-form-urlencoded")]
public PostUsersSignInDataRequestBody? RequestBody { get; set; }
}
}

View File

@@ -136,7 +136,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
public int Id { get; set; } = default!;
/// <summary>
/// Unix epoch datetime
/// Unix epoch datetime in seconds
/// </summary>
[JsonProperty("joinedAt")]
public long JoinedAt { get; set; } = default!;
@@ -182,7 +182,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
public bool? Protected { get; set; } = false;
/// <summary>
/// Unix epoch datetime
/// Unix epoch datetime in seconds
/// </summary>
[JsonProperty("rememberExpiresAt")]
public long RememberExpiresAt { get; set; } = default!;

View File

@@ -34,28 +34,19 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
[JsonProperty("defaultSubtitleLanguage", NullValueHandling = NullValueHandling.Include)]
public string? DefaultSubtitleLanguage { get; set; }
/// <summary>
/// The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)
/// </summary>
[JsonProperty("autoSelectSubtitle")]
public PostUsersSignInDataAutoSelectSubtitle? AutoSelectSubtitle { get; set; }
public PostUsersSignInDataAutoSelectSubtitle? AutoSelectSubtitle { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.PostUsersSignInDataAutoSelectSubtitle.Disable;
/// <summary>
/// The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles)
/// </summary>
[JsonProperty("defaultSubtitleAccessibility")]
public PostUsersSignInDataDefaultSubtitleAccessibility? DefaultSubtitleAccessibility { get; set; }
public PostUsersSignInDataDefaultSubtitleAccessibility? DefaultSubtitleAccessibility { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.PostUsersSignInDataDefaultSubtitleAccessibility.Disable;
/// <summary>
/// The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles)
/// </summary>
[JsonProperty("defaultSubtitleForced")]
public PostUsersSignInDataDefaultSubtitleForced? DefaultSubtitleForced { get; set; }
public PostUsersSignInDataDefaultSubtitleForced? DefaultSubtitleForced { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.PostUsersSignInDataDefaultSubtitleForced.Disable;
[JsonProperty("watchedIndicator")]
public PostUsersSignInDataWatchedIndicator? WatchedIndicator { get; set; }
public PostUsersSignInDataWatchedIndicator? WatchedIndicator { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.PostUsersSignInDataWatchedIndicator.Disable;
[JsonProperty("mediaReviewsVisibility")]
public PostUsersSignInDataMediaReviewsVisibility? MediaReviewsVisibility { get; set; }
public PostUsersSignInDataMediaReviewsVisibility? MediaReviewsVisibility { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.PostUsersSignInDataMediaReviewsVisibility.Disable;
}
}

View File

@@ -10,48 +10,14 @@
namespace LukeHagar.PlexAPI.SDK.Models.Requests
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using System;
/// <summary>
/// Whether or not media watched indicators are enabled (little orange dot on media)
/// </summary>
public enum PostUsersSignInDataWatchedIndicator
{
[JsonProperty("0")]
Zero,
[JsonProperty("1")]
One,
}
public static class PostUsersSignInDataWatchedIndicatorExtension
{
public static string Value(this PostUsersSignInDataWatchedIndicator value)
{
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
}
public static PostUsersSignInDataWatchedIndicator ToEnum(this string value)
{
foreach(var field in typeof(PostUsersSignInDataWatchedIndicator).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 PostUsersSignInDataWatchedIndicator)
{
return (PostUsersSignInDataWatchedIndicator)enumVal;
}
}
}
throw new Exception($"Unknown value {value} for enum PostUsersSignInDataWatchedIndicator");
}
Disable = 0,
Enable = 1,
}
}

View 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.Requests
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using System;
/// <summary>
/// The protocol used for the connection (http, https, etc)
/// </summary>
public enum Protocol
{
[JsonProperty("http")]
Http,
[JsonProperty("https")]
Https,
}
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");
}
}
}

View File

@@ -25,10 +25,10 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
/// </summary>
public enum QueryParamType
{
One = 1,
Two = 2,
Three = 3,
Four = 4,
Movie = 1,
Show = 2,
Season = 3,
Episode = 4,
}
}

View File

@@ -25,10 +25,10 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
/// </summary>
public enum Type
{
One = 1,
Two = 2,
Three = 3,
Four = 4,
Movie = 1,
Show = 2,
Season = 3,
Episode = 4,
}
}

View File

@@ -42,5 +42,11 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
/// </summary>
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=force")]
public QueryParamForce Force { get; set; } = default!;
/// <summary>
/// Possibly the section ID to upload the playlist to, we are not certain.
/// </summary>
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=sectionID")]
public long SectionID { get; set; } = 1;
}
}

View File

@@ -34,28 +34,19 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
[JsonProperty("defaultSubtitleLanguage", NullValueHandling = NullValueHandling.Include)]
public string? DefaultSubtitleLanguage { get; set; }
/// <summary>
/// The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)
/// </summary>
[JsonProperty("autoSelectSubtitle")]
public AutoSelectSubtitle? AutoSelectSubtitle { get; set; }
public AutoSelectSubtitle? AutoSelectSubtitle { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.AutoSelectSubtitle.Disable;
/// <summary>
/// The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles)
/// </summary>
[JsonProperty("defaultSubtitleAccessibility")]
public DefaultSubtitleAccessibility? DefaultSubtitleAccessibility { get; set; }
public DefaultSubtitleAccessibility? DefaultSubtitleAccessibility { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.DefaultSubtitleAccessibility.Disable;
/// <summary>
/// The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles)
/// </summary>
[JsonProperty("defaultSubtitleForced")]
public DefaultSubtitleForced? DefaultSubtitleForced { get; set; }
public DefaultSubtitleForced? DefaultSubtitleForced { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.DefaultSubtitleForced.Disable;
[JsonProperty("watchedIndicator")]
public WatchedIndicator? WatchedIndicator { get; set; }
public WatchedIndicator? WatchedIndicator { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.WatchedIndicator.Disable;
[JsonProperty("mediaReviewsVisibility")]
public MediaReviewsVisibility? MediaReviewsVisibility { get; set; }
public MediaReviewsVisibility? MediaReviewsVisibility { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.MediaReviewsVisibility.Disable;
}
}

View File

@@ -10,48 +10,14 @@
namespace LukeHagar.PlexAPI.SDK.Models.Requests
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using System;
/// <summary>
/// Whether or not media watched indicators are enabled (little orange dot on media)
/// </summary>
public enum WatchedIndicator
{
[JsonProperty("0")]
Zero,
[JsonProperty("1")]
One,
}
public static class WatchedIndicatorExtension
{
public static string Value(this WatchedIndicator value)
{
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
}
public static WatchedIndicator ToEnum(this string value)
{
foreach(var field in typeof(WatchedIndicator).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 WatchedIndicator)
{
return (WatchedIndicator)enumVal;
}
}
}
throw new Exception($"Unknown value {value} for enum WatchedIndicator");
}
Disable = 0,
Enable = 1,
}
}