ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.378.1

This commit is contained in:
speakeasybot
2024-08-25 00:10:39 +00:00
parent 322299ad95
commit cc8bc7366d
94 changed files with 978 additions and 335 deletions

View File

@@ -12,7 +12,7 @@ namespace PlexAPI.Models.Errors
using Newtonsoft.Json;
using PlexAPI.Utils;
public class PostUsersSigninDataErrors
public class PostSignInErrors
{
[JsonProperty("code")]

View File

@@ -19,11 +19,11 @@ namespace PlexAPI.Models.Errors
/// <summary>
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
/// </summary>
public class PostUsersSigninDataResponseBody : Exception
public class PostSignInResponseBody : Exception
{
[JsonProperty("errors")]
public List<PostUsersSigninDataErrors>? Errors { get; set; }
public List<PostSignInErrors>? Errors { get; set; }
/// <summary>
/// Raw HTTP response; suitable for custom response parsing

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 PlexAPI.Models.Requests
{
using Newtonsoft.Json;
using PlexAPI.Utils;
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");
}
}
}

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 PlexAPI.Models.Requests
{
using Newtonsoft.Json;
using PlexAPI.Utils;
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)
/// </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");
}
}
}

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 PlexAPI.Models.Requests
{
using Newtonsoft.Json;
using PlexAPI.Utils;
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");
}
}
}

View File

@@ -13,7 +13,6 @@ namespace PlexAPI.Models.Requests
using PlexAPI.Models.Requests;
using PlexAPI.Utils;
using System.Collections.Generic;
using System;
public class GetUserDetailsSubscription
{
@@ -34,7 +33,7 @@ namespace PlexAPI.Models.Requests
/// Date the account subscribed to Plex Pass
/// </summary>
[JsonProperty("subscribedAt")]
public DateTime? SubscribedAt { get; set; }
public string? SubscribedAt { get; set; } = null;
/// <summary>
/// String representation of subscriptionActive

View File

@@ -173,7 +173,7 @@ namespace PlexAPI.Models.Requests
public string? Pin { get; set; }
[JsonProperty("profile")]
public List<UserProfile> Profile { get; set; } = default!;
public UserProfile Profile { get; set; } = default!;
/// <summary>
/// If the account has a Plex Home PIN enabled

View File

@@ -18,8 +18,8 @@ namespace PlexAPI.Models.Requests
/// </summary>
public enum MailingListStatus
{
[JsonProperty("subscribed")]
Subscribed,
[JsonProperty("active")]
Active,
[JsonProperty("unsubscribed")]
Unsubscribed,
}

View 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 PlexAPI.Models.Requests
{
using PlexAPI.Utils;
public enum MediaReviewsVisibility
{
Zero = 0,
One = 1,
}
}

View File

@@ -12,7 +12,6 @@ namespace PlexAPI.Models.Requests
using Newtonsoft.Json;
using PlexAPI.Models.Requests;
using PlexAPI.Utils;
using System.Collections.Generic;
public class PastSubscription
{
@@ -63,9 +62,9 @@ namespace PlexAPI.Models.Requests
public string? Transfer { get; set; }
[JsonProperty("state")]
public PostUsersSigninDataState State { get; set; } = default!;
public PostSignInState State { get; set; } = default!;
[JsonProperty("billing")]
public List<Billing> Billing { get; set; } = default!;
public Billing Billing { get; set; } = default!;
}
}

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

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 PlexAPI.Models.Requests
{
using Newtonsoft.Json;
using PlexAPI.Utils;
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)
/// </summary>
public enum PostSignInDefaultSubtitleAccessibility
{
[JsonProperty("0")]
Zero,
[JsonProperty("1")]
One,
}
public static class PostSignInDefaultSubtitleAccessibilityExtension
{
public static string Value(this PostSignInDefaultSubtitleAccessibility value)
{
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
}
public static PostSignInDefaultSubtitleAccessibility ToEnum(this string value)
{
foreach(var field in typeof(PostSignInDefaultSubtitleAccessibility).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 PostSignInDefaultSubtitleAccessibility)
{
return (PostSignInDefaultSubtitleAccessibility)enumVal;
}
}
}
throw new Exception($"Unknown value {value} for enum PostSignInDefaultSubtitleAccessibility");
}
}
}

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 PlexAPI.Models.Requests
{
using Newtonsoft.Json;
using PlexAPI.Utils;
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 PostSignInDefaultSubtitleForced
{
[JsonProperty("0")]
Zero,
[JsonProperty("1")]
One,
}
public static class PostSignInDefaultSubtitleForcedExtension
{
public static string Value(this PostSignInDefaultSubtitleForced value)
{
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
}
public static PostSignInDefaultSubtitleForced ToEnum(this string value)
{
foreach(var field in typeof(PostSignInDefaultSubtitleForced).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 PostSignInDefaultSubtitleForced)
{
return (PostSignInDefaultSubtitleForced)enumVal;
}
}
}
throw new Exception($"Unknown value {value} for enum PostSignInDefaultSubtitleForced");
}
}
}

View File

@@ -13,7 +13,7 @@ namespace PlexAPI.Models.Requests
using PlexAPI.Utils;
using System;
public enum PostUsersSigninDataFeatures
public enum PostSignInFeatures
{
[JsonProperty("Android - Dolby Vision")]
AndroidDolbyVision,
@@ -135,16 +135,16 @@ namespace PlexAPI.Models.Requests
WebServerDashboard,
}
public static class PostUsersSigninDataFeaturesExtension
public static class PostSignInFeaturesExtension
{
public static string Value(this PostUsersSigninDataFeatures value)
public static string Value(this PostSignInFeatures value)
{
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
}
public static PostUsersSigninDataFeatures ToEnum(this string value)
public static PostSignInFeatures ToEnum(this string value)
{
foreach(var field in typeof(PostUsersSigninDataFeatures).GetFields())
foreach(var field in typeof(PostSignInFeatures).GetFields())
{
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
if (attributes.Length == 0)
@@ -157,14 +157,14 @@ namespace PlexAPI.Models.Requests
{
var enumVal = field.GetValue(null);
if (enumVal is PostUsersSigninDataFeatures)
if (enumVal is PostSignInFeatures)
{
return (PostUsersSigninDataFeatures)enumVal;
return (PostSignInFeatures)enumVal;
}
}
}
throw new Exception($"Unknown value {value} for enum PostUsersSigninDataFeatures");
throw new Exception($"Unknown value {value} for enum PostSignInFeatures");
}
}

View File

@@ -16,24 +16,24 @@ namespace PlexAPI.Models.Requests
/// <summary>
/// Your current mailing list status
/// </summary>
public enum PostUsersSigninDataMailingListStatus
public enum PostSignInMailingListStatus
{
[JsonProperty("subscribed")]
Subscribed,
[JsonProperty("active")]
Active,
[JsonProperty("unsubscribed")]
Unsubscribed,
}
public static class PostUsersSigninDataMailingListStatusExtension
public static class PostSignInMailingListStatusExtension
{
public static string Value(this PostUsersSigninDataMailingListStatus value)
public static string Value(this PostSignInMailingListStatus value)
{
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
}
public static PostUsersSigninDataMailingListStatus ToEnum(this string value)
public static PostSignInMailingListStatus ToEnum(this string value)
{
foreach(var field in typeof(PostUsersSigninDataMailingListStatus).GetFields())
foreach(var field in typeof(PostSignInMailingListStatus).GetFields())
{
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
if (attributes.Length == 0)
@@ -46,14 +46,14 @@ namespace PlexAPI.Models.Requests
{
var enumVal = field.GetValue(null);
if (enumVal is PostUsersSigninDataMailingListStatus)
if (enumVal is PostSignInMailingListStatus)
{
return (PostUsersSigninDataMailingListStatus)enumVal;
return (PostSignInMailingListStatus)enumVal;
}
}
}
throw new Exception($"Unknown value {value} for enum PostUsersSigninDataMailingListStatus");
throw new Exception($"Unknown value {value} for enum PostSignInMailingListStatus");
}
}

View 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 PlexAPI.Models.Requests
{
using PlexAPI.Utils;
public enum PostSignInMediaReviewsVisibility
{
Zero = 0,
One = 1,
}
}

View File

@@ -12,7 +12,7 @@ namespace PlexAPI.Models.Requests
using PlexAPI.Models.Requests;
using PlexAPI.Utils;
public class PostUsersSigninDataRequest
public class PostSignInRequest
{
/// <summary>
@@ -31,6 +31,6 @@ namespace PlexAPI.Models.Requests
/// Login credentials
/// </summary>
[SpeakeasyMetadata("request:mediaType=application/x-www-form-urlencoded")]
public PostUsersSigninDataRequestBody? RequestBody { get; set; }
public PostSignInRequestBody? RequestBody { get; set; }
}
}

View File

@@ -14,7 +14,7 @@ namespace PlexAPI.Models.Requests
/// <summary>
/// Login credentials
/// </summary>
public class PostUsersSigninDataRequestBody
public class PostSignInRequestBody
{
[SpeakeasyMetadata("form:name=login")]

View File

@@ -14,7 +14,7 @@ namespace PlexAPI.Models.Requests
using System.Net.Http;
using System;
public class PostUsersSigninDataResponse
public class PostSignInResponse
{
/// <summary>
@@ -35,6 +35,6 @@ namespace PlexAPI.Models.Requests
/// <summary>
/// Returns the user account data with a valid auth token
/// </summary>
public PostUsersSigninDataUserPlexAccount? UserPlexAccount { get; set; }
public PostSignInUserPlexAccount? UserPlexAccount { get; set; }
}
}

View File

@@ -13,7 +13,7 @@ namespace PlexAPI.Models.Requests
using PlexAPI.Models.Requests;
using PlexAPI.Utils;
public class PostUsersSigninDataServices
public class PostSignInServices
{
[JsonProperty("identifier")]
@@ -29,6 +29,6 @@ namespace PlexAPI.Models.Requests
public string? Secret { get; set; }
[JsonProperty("status")]
public PostUsersSigninDataStatus Status { get; set; } = default!;
public PostSignInStatus Status { get; set; } = default!;
}
}

View File

@@ -13,22 +13,22 @@ namespace PlexAPI.Models.Requests
using PlexAPI.Utils;
using System;
public enum PostUsersSigninDataState
public enum PostSignInState
{
[JsonProperty("ended")]
Ended,
}
public static class PostUsersSigninDataStateExtension
public static class PostSignInStateExtension
{
public static string Value(this PostUsersSigninDataState value)
public static string Value(this PostSignInState value)
{
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
}
public static PostUsersSigninDataState ToEnum(this string value)
public static PostSignInState ToEnum(this string value)
{
foreach(var field in typeof(PostUsersSigninDataState).GetFields())
foreach(var field in typeof(PostSignInState).GetFields())
{
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
if (attributes.Length == 0)
@@ -41,14 +41,14 @@ namespace PlexAPI.Models.Requests
{
var enumVal = field.GetValue(null);
if (enumVal is PostUsersSigninDataState)
if (enumVal is PostSignInState)
{
return (PostUsersSigninDataState)enumVal;
return (PostSignInState)enumVal;
}
}
}
throw new Exception($"Unknown value {value} for enum PostUsersSigninDataState");
throw new Exception($"Unknown value {value} for enum PostSignInState");
}
}

View File

@@ -13,7 +13,7 @@ namespace PlexAPI.Models.Requests
using PlexAPI.Utils;
using System;
public enum PostUsersSigninDataStatus
public enum PostSignInStatus
{
[JsonProperty("online")]
Online,
@@ -21,16 +21,16 @@ namespace PlexAPI.Models.Requests
Offline,
}
public static class PostUsersSigninDataStatusExtension
public static class PostSignInStatusExtension
{
public static string Value(this PostUsersSigninDataStatus value)
public static string Value(this PostSignInStatus value)
{
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
}
public static PostUsersSigninDataStatus ToEnum(this string value)
public static PostSignInStatus ToEnum(this string value)
{
foreach(var field in typeof(PostUsersSigninDataStatus).GetFields())
foreach(var field in typeof(PostSignInStatus).GetFields())
{
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
if (attributes.Length == 0)
@@ -43,14 +43,14 @@ namespace PlexAPI.Models.Requests
{
var enumVal = field.GetValue(null);
if (enumVal is PostUsersSigninDataStatus)
if (enumVal is PostSignInStatus)
{
return (PostUsersSigninDataStatus)enumVal;
return (PostSignInStatus)enumVal;
}
}
}
throw new Exception($"Unknown value {value} for enum PostUsersSigninDataStatus");
throw new Exception($"Unknown value {value} for enum PostSignInStatus");
}
}

View File

@@ -13,19 +13,18 @@ namespace PlexAPI.Models.Requests
using PlexAPI.Models.Requests;
using PlexAPI.Utils;
using System.Collections.Generic;
using System;
/// <summary>
/// If the accounts Plex Pass subscription is active
/// </summary>
public class PostUsersSigninDataSubscription
public class PostSignInSubscription
{
/// <summary>
/// List of features allowed on your Plex Pass subscription
/// </summary>
[JsonProperty("features")]
public List<PostUsersSigninDataFeatures>? Features { get; set; }
public List<PostSignInFeatures>? Features { get; set; }
/// <summary>
/// If the account&apos;s Plex Pass subscription is active
@@ -37,13 +36,13 @@ namespace PlexAPI.Models.Requests
/// Date the account subscribed to Plex Pass
/// </summary>
[JsonProperty("subscribedAt")]
public DateTime? SubscribedAt { get; set; }
public string? SubscribedAt { get; set; } = null;
/// <summary>
/// String representation of subscriptionActive
/// </summary>
[JsonProperty("status")]
public PostUsersSigninDataUserStatus? Status { get; set; }
public PostSignInUserStatus? Status { get; set; }
/// <summary>
/// Payment service used for your Plex Pass subscription

View File

@@ -13,7 +13,7 @@ namespace PlexAPI.Models.Requests
using PlexAPI.Utils;
using System;
public enum PostUsersSigninDataUserFeatures
public enum PostSignInUserFeatures
{
[JsonProperty("Android - Dolby Vision")]
AndroidDolbyVision,
@@ -135,16 +135,16 @@ namespace PlexAPI.Models.Requests
WebServerDashboard,
}
public static class PostUsersSigninDataUserFeaturesExtension
public static class PostSignInUserFeaturesExtension
{
public static string Value(this PostUsersSigninDataUserFeatures value)
public static string Value(this PostSignInUserFeatures value)
{
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
}
public static PostUsersSigninDataUserFeatures ToEnum(this string value)
public static PostSignInUserFeatures ToEnum(this string value)
{
foreach(var field in typeof(PostUsersSigninDataUserFeatures).GetFields())
foreach(var field in typeof(PostSignInUserFeatures).GetFields())
{
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
if (attributes.Length == 0)
@@ -157,14 +157,14 @@ namespace PlexAPI.Models.Requests
{
var enumVal = field.GetValue(null);
if (enumVal is PostUsersSigninDataUserFeatures)
if (enumVal is PostSignInUserFeatures)
{
return (PostUsersSigninDataUserFeatures)enumVal;
return (PostSignInUserFeatures)enumVal;
}
}
}
throw new Exception($"Unknown value {value} for enum PostUsersSigninDataUserFeatures");
throw new Exception($"Unknown value {value} for enum PostSignInUserFeatures");
}
}

View File

@@ -18,7 +18,7 @@ namespace PlexAPI.Models.Requests
/// <summary>
/// Returns the user account data with a valid auth token
/// </summary>
public class PostUsersSigninDataUserPlexAccount
public class PostSignInUserPlexAccount
{
/// <summary>
@@ -157,7 +157,7 @@ namespace PlexAPI.Models.Requests
/// Your current mailing list status
/// </summary>
[JsonProperty("mailingListStatus")]
public PostUsersSigninDataMailingListStatus MailingListStatus { get; set; } = default!;
public PostSignInMailingListStatus MailingListStatus { get; set; } = default!;
/// <summary>
/// The maximum number of accounts allowed in the Plex Home
@@ -173,7 +173,7 @@ namespace PlexAPI.Models.Requests
public string? Pin { get; set; }
[JsonProperty("profile")]
public List<PostUsersSigninDataUserProfile> Profile { get; set; } = default!;
public PostSignInUserProfile Profile { get; set; } = default!;
/// <summary>
/// If the account has a Plex Home PIN enabled
@@ -206,13 +206,13 @@ namespace PlexAPI.Models.Requests
public string ScrobbleTypes { get; set; } = default!;
[JsonProperty("services")]
public List<PostUsersSigninDataServices> Services { get; set; } = default!;
public List<PostSignInServices> Services { get; set; } = default!;
/// <summary>
/// If the accounts Plex Pass subscription is active
/// </summary>
[JsonProperty("subscription")]
public PostUsersSigninDataSubscription Subscription { get; set; } = default!;
public PostSignInSubscription Subscription { get; set; } = default!;
/// <summary>
/// Description of the Plex Pass subscription
@@ -221,7 +221,7 @@ namespace PlexAPI.Models.Requests
public string? SubscriptionDescription { get; set; }
[JsonProperty("subscriptions")]
public List<PostUsersSigninDataUserSubscription> Subscriptions { get; set; } = default!;
public List<PostSignInUserSubscription> Subscriptions { get; set; } = default!;
/// <summary>
/// URL of the account thumbnail

View File

@@ -10,9 +10,10 @@
namespace PlexAPI.Models.Requests
{
using Newtonsoft.Json;
using PlexAPI.Models.Requests;
using PlexAPI.Utils;
public class PostUsersSigninDataUserProfile
public class PostSignInUserProfile
{
/// <summary>
@@ -24,37 +25,37 @@ namespace PlexAPI.Models.Requests
/// <summary>
/// The preferred audio language for the account
/// </summary>
[JsonProperty("defaultAudioLanguage")]
[JsonProperty("defaultAudioLanguage", NullValueHandling = NullValueHandling.Include)]
public string? DefaultAudioLanguage { get; set; }
/// <summary>
/// The preferred subtitle language for the account
/// </summary>
[JsonProperty("defaultSubtitleLanguage")]
[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 long? AutoSelectSubtitle { get; set; }
public PostSignInAutoSelectSubtitle? AutoSelectSubtitle { get; set; }
/// <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 long? DefaultSubtitleAccessibility { get; set; }
public PostSignInDefaultSubtitleAccessibility? DefaultSubtitleAccessibility { get; set; }
/// <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 long? DefaultSubtitleForced { get; set; }
public PostSignInDefaultSubtitleForced? DefaultSubtitleForced { get; set; }
[JsonProperty("watchedIndicator")]
public long? WatchedIndicator { get; set; }
public PostSignInWatchedIndicator? WatchedIndicator { get; set; }
[JsonProperty("mediaReviewsVisibility")]
public long? MediaReviewsVisibility { get; set; }
public PostSignInMediaReviewsVisibility? MediaReviewsVisibility { get; set; }
}
}

View File

@@ -16,7 +16,7 @@ namespace PlexAPI.Models.Requests
/// <summary>
/// String representation of subscriptionActive
/// </summary>
public enum PostUsersSigninDataUserStatus
public enum PostSignInUserResponseStatus
{
[JsonProperty("Inactive")]
Inactive,
@@ -24,16 +24,16 @@ namespace PlexAPI.Models.Requests
Active,
}
public static class PostUsersSigninDataUserStatusExtension
public static class PostSignInUserResponseStatusExtension
{
public static string Value(this PostUsersSigninDataUserStatus value)
public static string Value(this PostSignInUserResponseStatus value)
{
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
}
public static PostUsersSigninDataUserStatus ToEnum(this string value)
public static PostSignInUserResponseStatus ToEnum(this string value)
{
foreach(var field in typeof(PostUsersSigninDataUserStatus).GetFields())
foreach(var field in typeof(PostSignInUserResponseStatus).GetFields())
{
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
if (attributes.Length == 0)
@@ -46,14 +46,14 @@ namespace PlexAPI.Models.Requests
{
var enumVal = field.GetValue(null);
if (enumVal is PostUsersSigninDataUserStatus)
if (enumVal is PostSignInUserResponseStatus)
{
return (PostUsersSigninDataUserStatus)enumVal;
return (PostSignInUserResponseStatus)enumVal;
}
}
}
throw new Exception($"Unknown value {value} for enum PostUsersSigninDataUserStatus");
throw new Exception($"Unknown value {value} for enum PostSignInUserResponseStatus");
}
}

View File

@@ -16,7 +16,7 @@ namespace PlexAPI.Models.Requests
/// <summary>
/// String representation of subscriptionActive
/// </summary>
public enum PostUsersSigninDataUserResponseStatus
public enum PostSignInUserStatus
{
[JsonProperty("Inactive")]
Inactive,
@@ -24,16 +24,16 @@ namespace PlexAPI.Models.Requests
Active,
}
public static class PostUsersSigninDataUserResponseStatusExtension
public static class PostSignInUserStatusExtension
{
public static string Value(this PostUsersSigninDataUserResponseStatus value)
public static string Value(this PostSignInUserStatus value)
{
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
}
public static PostUsersSigninDataUserResponseStatus ToEnum(this string value)
public static PostSignInUserStatus ToEnum(this string value)
{
foreach(var field in typeof(PostUsersSigninDataUserResponseStatus).GetFields())
foreach(var field in typeof(PostSignInUserStatus).GetFields())
{
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
if (attributes.Length == 0)
@@ -46,14 +46,14 @@ namespace PlexAPI.Models.Requests
{
var enumVal = field.GetValue(null);
if (enumVal is PostUsersSigninDataUserResponseStatus)
if (enumVal is PostSignInUserStatus)
{
return (PostUsersSigninDataUserResponseStatus)enumVal;
return (PostSignInUserStatus)enumVal;
}
}
}
throw new Exception($"Unknown value {value} for enum PostUsersSigninDataUserResponseStatus");
throw new Exception($"Unknown value {value} for enum PostSignInUserStatus");
}
}

View File

@@ -13,16 +13,15 @@ namespace PlexAPI.Models.Requests
using PlexAPI.Models.Requests;
using PlexAPI.Utils;
using System.Collections.Generic;
using System;
public class PostUsersSigninDataUserSubscription
public class PostSignInUserSubscription
{
/// <summary>
/// List of features allowed on your Plex Pass subscription
/// </summary>
[JsonProperty("features")]
public List<PostUsersSigninDataUserFeatures>? Features { get; set; }
public List<PostSignInUserFeatures>? Features { get; set; }
/// <summary>
/// If the account&apos;s Plex Pass subscription is active
@@ -34,13 +33,13 @@ namespace PlexAPI.Models.Requests
/// Date the account subscribed to Plex Pass
/// </summary>
[JsonProperty("subscribedAt")]
public DateTime? SubscribedAt { get; set; }
public string? SubscribedAt { get; set; } = null;
/// <summary>
/// String representation of subscriptionActive
/// </summary>
[JsonProperty("status")]
public PostUsersSigninDataUserResponseStatus? Status { get; set; }
public PostSignInUserResponseStatus? Status { get; set; }
/// <summary>
/// Payment service used for your Plex Pass subscription

View 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 PlexAPI.Models.Requests
{
using Newtonsoft.Json;
using PlexAPI.Utils;
using System;
public enum PostSignInWatchedIndicator
{
[JsonProperty("0")]
Zero,
[JsonProperty("1")]
One,
}
public static class PostSignInWatchedIndicatorExtension
{
public static string Value(this PostSignInWatchedIndicator value)
{
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
}
public static PostSignInWatchedIndicator ToEnum(this string value)
{
foreach(var field in typeof(PostSignInWatchedIndicator).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 PostSignInWatchedIndicator)
{
return (PostSignInWatchedIndicator)enumVal;
}
}
}
throw new Exception($"Unknown value {value} for enum PostSignInWatchedIndicator");
}
}
}

View File

@@ -13,7 +13,6 @@ namespace PlexAPI.Models.Requests
using PlexAPI.Models.Requests;
using PlexAPI.Utils;
using System.Collections.Generic;
using System;
/// <summary>
/// If the accounts Plex Pass subscription is active
@@ -37,7 +36,7 @@ namespace PlexAPI.Models.Requests
/// Date the account subscribed to Plex Pass
/// </summary>
[JsonProperty("subscribedAt")]
public DateTime? SubscribedAt { get; set; }
public string? SubscribedAt { get; set; } = null;
/// <summary>
/// String representation of subscriptionActive

View File

@@ -10,6 +10,7 @@
namespace PlexAPI.Models.Requests
{
using Newtonsoft.Json;
using PlexAPI.Models.Requests;
using PlexAPI.Utils;
public class UserProfile
@@ -24,37 +25,37 @@ namespace PlexAPI.Models.Requests
/// <summary>
/// The preferred audio language for the account
/// </summary>
[JsonProperty("defaultAudioLanguage")]
[JsonProperty("defaultAudioLanguage", NullValueHandling = NullValueHandling.Include)]
public string? DefaultAudioLanguage { get; set; }
/// <summary>
/// The preferred subtitle language for the account
/// </summary>
[JsonProperty("defaultSubtitleLanguage")]
[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 long? AutoSelectSubtitle { get; set; }
public AutoSelectSubtitle? AutoSelectSubtitle { get; set; }
/// <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 long? DefaultSubtitleAccessibility { get; set; }
public DefaultSubtitleAccessibility? DefaultSubtitleAccessibility { get; set; }
/// <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 long? DefaultSubtitleForced { get; set; }
public DefaultSubtitleForced? DefaultSubtitleForced { get; set; }
[JsonProperty("watchedIndicator")]
public long? WatchedIndicator { get; set; }
public WatchedIndicator? WatchedIndicator { get; set; }
[JsonProperty("mediaReviewsVisibility")]
public long? MediaReviewsVisibility { get; set; }
public MediaReviewsVisibility? MediaReviewsVisibility { get; set; }
}
}

View 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 PlexAPI.Models.Requests
{
using Newtonsoft.Json;
using PlexAPI.Utils;
using System;
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");
}
}
}