//
#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
{
/// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
public IDictionary AdditionalData { get; set; }
/// The album property
#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
/// The albumart_id property
public int? AlbumartId { get; set; }
/// The albumart_url property
#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
/// The artist property
#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
/// The attribute property
public int? Attribute { get; set; }
/// The auto_stopped property
public bool? AutoStopped { get; set; }
/// The input property
#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
/// The playback property
#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
/// The play_queue_type property
#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
/// The play_time property
public int? PlayTime { get; set; }
/// The repeat property
#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
/// The repeat_available property
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public List? RepeatAvailable { get; set; }
#nullable restore
#else
public List RepeatAvailable { get; set; }
#endif
/// The response_code property
public int? ResponseCode { get; set; }
/// The shuffle property
#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
/// The shuffle_available property
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public List? ShuffleAvailable { get; set; }
#nullable restore
#else
public List ShuffleAvailable { get; set; }
#endif
/// The total_time property
public int? TotalTime { get; set; }
/// The track property
#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
/// The usb_devicetype property
#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
///
/// Instantiates a new and sets the default values.
///
public GetPlayInfoResponse()
{
AdditionalData = new Dictionary();
}
///
/// Creates a new instance of the appropriate class based on discriminator value
///
/// A
/// The parse node to use to read the discriminator value and create the object
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();
}
///
/// The deserialization information for the current model
///
/// A IDictionary<string, Action<IParseNode>>
public virtual IDictionary> GetFieldDeserializers()
{
return new Dictionary>
{
{ "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()?.AsList(); } },
{ "response_code", n => { ResponseCode = n.GetIntValue(); } },
{ "shuffle", n => { Shuffle = n.GetStringValue(); } },
{ "shuffle_available", n => { ShuffleAvailable = n.GetCollectionOfPrimitiveValues()?.AsList(); } },
{ "total_time", n => { TotalTime = n.GetIntValue(); } },
{ "track", n => { Track = n.GetStringValue(); } },
{ "usb_devicetype", n => { UsbDevicetype = n.GetStringValue(); } },
};
}
///
/// Serializes information the current object
///
/// Serialization writer to use to serialize this model
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("repeat_available", RepeatAvailable);
writer.WriteIntValue("response_code", ResponseCode);
writer.WriteStringValue("shuffle", Shuffle);
writer.WriteCollectionOfPrimitiveValues("shuffle_available", ShuffleAvailable);
writer.WriteIntValue("total_time", TotalTime);
writer.WriteStringValue("track", Track);
writer.WriteStringValue("usb_devicetype", UsbDevicetype);
writer.WriteAdditionalData(AdditionalData);
}
}
}
#pragma warning restore CS0618