Files
MusicCast.Net/MusicCast.Net.Api.Client/Models/GetPlayInfoResponse.cs
2025-05-24 20:47:01 +02:00

200 lines
8.6 KiB
C#

// <auto-generated/>
#pragma warning disable CS0618
using Microsoft.Kiota.Abstractions.Extensions;
using Microsoft.Kiota.Abstractions.Serialization;
using System.Collections.Generic;
using System.IO;
using System;
namespace MusicCast.Net.Api.Client.Models
{
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
#pragma warning disable CS1591
public partial class GetPlayInfoResponse : IAdditionalDataHolder, IParsable
#pragma warning restore CS1591
{
/// <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 album property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? Album { get; set; }
#nullable restore
#else
public string Album { get; set; }
#endif
/// <summary>The albumart_id property</summary>
public int? AlbumartId { get; set; }
/// <summary>The albumart_url property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? AlbumartUrl { get; set; }
#nullable restore
#else
public string AlbumartUrl { get; set; }
#endif
/// <summary>The artist property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? Artist { get; set; }
#nullable restore
#else
public string Artist { get; set; }
#endif
/// <summary>The attribute property</summary>
public int? Attribute { get; set; }
/// <summary>The auto_stopped property</summary>
public bool? AutoStopped { get; set; }
/// <summary>The input property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? Input { get; set; }
#nullable restore
#else
public string Input { get; set; }
#endif
/// <summary>The playback property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? Playback { get; set; }
#nullable restore
#else
public string Playback { get; set; }
#endif
/// <summary>The play_queue_type property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? PlayQueueType { get; set; }
#nullable restore
#else
public string PlayQueueType { get; set; }
#endif
/// <summary>The play_time property</summary>
public int? PlayTime { get; set; }
/// <summary>The repeat property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? Repeat { get; set; }
#nullable restore
#else
public string Repeat { get; set; }
#endif
/// <summary>The repeat_available property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public List<string>? RepeatAvailable { get; set; }
#nullable restore
#else
public List<string> RepeatAvailable { get; set; }
#endif
/// <summary>The response_code property</summary>
public int? ResponseCode { get; set; }
/// <summary>The shuffle property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? Shuffle { get; set; }
#nullable restore
#else
public string Shuffle { get; set; }
#endif
/// <summary>The shuffle_available property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public List<string>? ShuffleAvailable { get; set; }
#nullable restore
#else
public List<string> ShuffleAvailable { get; set; }
#endif
/// <summary>The total_time property</summary>
public int? TotalTime { get; set; }
/// <summary>The track property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? Track { get; set; }
#nullable restore
#else
public string Track { get; set; }
#endif
/// <summary>The usb_devicetype property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? UsbDevicetype { get; set; }
#nullable restore
#else
public string UsbDevicetype { get; set; }
#endif
/// <summary>
/// Instantiates a new <see cref="global::MusicCast.Net.Api.Client.Models.GetPlayInfoResponse"/> and sets the default values.
/// </summary>
public GetPlayInfoResponse()
{
AdditionalData = new Dictionary<string, object>();
}
/// <summary>
/// Creates a new instance of the appropriate class based on discriminator value
/// </summary>
/// <returns>A <see cref="global::MusicCast.Net.Api.Client.Models.GetPlayInfoResponse"/></returns>
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
public static global::MusicCast.Net.Api.Client.Models.GetPlayInfoResponse CreateFromDiscriminatorValue(IParseNode parseNode)
{
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
return new global::MusicCast.Net.Api.Client.Models.GetPlayInfoResponse();
}
/// <summary>
/// The deserialization information for the current model
/// </summary>
/// <returns>A IDictionary&lt;string, Action&lt;IParseNode&gt;&gt;</returns>
public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
{
return new Dictionary<string, Action<IParseNode>>
{
{ "album", n => { Album = n.GetStringValue(); } },
{ "albumart_id", n => { AlbumartId = n.GetIntValue(); } },
{ "albumart_url", n => { AlbumartUrl = n.GetStringValue(); } },
{ "artist", n => { Artist = n.GetStringValue(); } },
{ "attribute", n => { Attribute = n.GetIntValue(); } },
{ "auto_stopped", n => { AutoStopped = n.GetBoolValue(); } },
{ "input", n => { Input = n.GetStringValue(); } },
{ "play_queue_type", n => { PlayQueueType = n.GetStringValue(); } },
{ "play_time", n => { PlayTime = n.GetIntValue(); } },
{ "playback", n => { Playback = n.GetStringValue(); } },
{ "repeat", n => { Repeat = n.GetStringValue(); } },
{ "repeat_available", n => { RepeatAvailable = n.GetCollectionOfPrimitiveValues<string>()?.AsList(); } },
{ "response_code", n => { ResponseCode = n.GetIntValue(); } },
{ "shuffle", n => { Shuffle = n.GetStringValue(); } },
{ "shuffle_available", n => { ShuffleAvailable = n.GetCollectionOfPrimitiveValues<string>()?.AsList(); } },
{ "total_time", n => { TotalTime = n.GetIntValue(); } },
{ "track", n => { Track = n.GetStringValue(); } },
{ "usb_devicetype", n => { UsbDevicetype = n.GetStringValue(); } },
};
}
/// <summary>
/// Serializes information the current object
/// </summary>
/// <param name="writer">Serialization writer to use to serialize this model</param>
public virtual void Serialize(ISerializationWriter writer)
{
_ = writer ?? throw new ArgumentNullException(nameof(writer));
writer.WriteStringValue("album", Album);
writer.WriteIntValue("albumart_id", AlbumartId);
writer.WriteStringValue("albumart_url", AlbumartUrl);
writer.WriteStringValue("artist", Artist);
writer.WriteIntValue("attribute", Attribute);
writer.WriteBoolValue("auto_stopped", AutoStopped);
writer.WriteStringValue("input", Input);
writer.WriteStringValue("playback", Playback);
writer.WriteStringValue("play_queue_type", PlayQueueType);
writer.WriteIntValue("play_time", PlayTime);
writer.WriteStringValue("repeat", Repeat);
writer.WriteCollectionOfPrimitiveValues<string>("repeat_available", RepeatAvailable);
writer.WriteIntValue("response_code", ResponseCode);
writer.WriteStringValue("shuffle", Shuffle);
writer.WriteCollectionOfPrimitiveValues<string>("shuffle_available", ShuffleAvailable);
writer.WriteIntValue("total_time", TotalTime);
writer.WriteStringValue("track", Track);
writer.WriteStringValue("usb_devicetype", UsbDevicetype);
writer.WriteAdditionalData(AdditionalData);
}
}
}
#pragma warning restore CS0618