//
#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 GetDeviceInfoResponse : 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 api_version property
public double? ApiVersion { get; set; }
/// The destination property
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? Destination { get; set; }
#nullable restore
#else
public string Destination { get; set; }
#endif
/// The device_id property
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? DeviceId { get; set; }
#nullable restore
#else
public string DeviceId { get; set; }
#endif
/// The model_name property
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? ModelName { get; set; }
#nullable restore
#else
public string ModelName { get; set; }
#endif
/// The netmodule_checksum property
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? NetmoduleChecksum { get; set; }
#nullable restore
#else
public string NetmoduleChecksum { get; set; }
#endif
/// The netmodule_generation property
public int? NetmoduleGeneration { get; set; }
/// The netmodule_version property
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? NetmoduleVersion { get; set; }
#nullable restore
#else
public string NetmoduleVersion { get; set; }
#endif
/// The operation_mode property
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? OperationMode { get; set; }
#nullable restore
#else
public string OperationMode { get; set; }
#endif
/// The response_code property
public int? ResponseCode { get; set; }
/// The system_id property
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? SystemId { get; set; }
#nullable restore
#else
public string SystemId { get; set; }
#endif
/// The system_version property
public int? SystemVersion { get; set; }
/// The update_error_code property
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? UpdateErrorCode { get; set; }
#nullable restore
#else
public string UpdateErrorCode { get; set; }
#endif
///
/// Instantiates a new and sets the default values.
///
public GetDeviceInfoResponse()
{
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.GetDeviceInfoResponse CreateFromDiscriminatorValue(IParseNode parseNode)
{
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
return new global::MusicCast.Net.Api.Client.Models.GetDeviceInfoResponse();
}
///
/// The deserialization information for the current model
///
/// A IDictionary<string, Action<IParseNode>>
public virtual IDictionary> GetFieldDeserializers()
{
return new Dictionary>
{
{ "api_version", n => { ApiVersion = n.GetDoubleValue(); } },
{ "destination", n => { Destination = n.GetStringValue(); } },
{ "device_id", n => { DeviceId = n.GetStringValue(); } },
{ "model_name", n => { ModelName = n.GetStringValue(); } },
{ "netmodule_checksum", n => { NetmoduleChecksum = n.GetStringValue(); } },
{ "netmodule_generation", n => { NetmoduleGeneration = n.GetIntValue(); } },
{ "netmodule_version", n => { NetmoduleVersion = n.GetStringValue(); } },
{ "operation_mode", n => { OperationMode = n.GetStringValue(); } },
{ "response_code", n => { ResponseCode = n.GetIntValue(); } },
{ "system_id", n => { SystemId = n.GetStringValue(); } },
{ "system_version", n => { SystemVersion = n.GetIntValue(); } },
{ "update_error_code", n => { UpdateErrorCode = 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.WriteDoubleValue("api_version", ApiVersion);
writer.WriteStringValue("destination", Destination);
writer.WriteStringValue("device_id", DeviceId);
writer.WriteStringValue("model_name", ModelName);
writer.WriteStringValue("netmodule_checksum", NetmoduleChecksum);
writer.WriteIntValue("netmodule_generation", NetmoduleGeneration);
writer.WriteStringValue("netmodule_version", NetmoduleVersion);
writer.WriteStringValue("operation_mode", OperationMode);
writer.WriteIntValue("response_code", ResponseCode);
writer.WriteStringValue("system_id", SystemId);
writer.WriteIntValue("system_version", SystemVersion);
writer.WriteStringValue("update_error_code", UpdateErrorCode);
writer.WriteAdditionalData(AdditionalData);
}
}
}
#pragma warning restore CS0618