Add MusicCast discovery service

This commit is contained in:
2025-05-25 19:30:00 +02:00
parent 9904616751
commit 8bf0c981f9
11 changed files with 242 additions and 2479 deletions

View File

@@ -15,13 +15,7 @@ namespace MusicCast.Net.Api.Client.Models
/// <summary>Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.</summary>
public IDictionary<string, object> AdditionalData { get; set; }
/// <summary>The response_code property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? ResponseCode { get; set; }
#nullable restore
#else
public string ResponseCode { get; set; }
#endif
public int? ResponseCode { get; set; }
/// <summary>
/// Instantiates a new <see cref="global::MusicCast.Net.Api.Client.Models.BaseResponse"/> and sets the default values.
/// </summary>
@@ -47,7 +41,7 @@ namespace MusicCast.Net.Api.Client.Models
{
return new Dictionary<string, Action<IParseNode>>
{
{ "response_code", n => { ResponseCode = n.GetStringValue(); } },
{ "response_code", n => { ResponseCode = n.GetIntValue(); } },
};
}
/// <summary>
@@ -57,7 +51,7 @@ namespace MusicCast.Net.Api.Client.Models
public virtual void Serialize(ISerializationWriter writer)
{
_ = writer ?? throw new ArgumentNullException(nameof(writer));
writer.WriteStringValue("response_code", ResponseCode);
writer.WriteIntValue("response_code", ResponseCode);
writer.WriteAdditionalData(AdditionalData);
}
}