//
#pragma warning disable CS0618
using Microsoft.Kiota.Abstractions.Extensions;
using Microsoft.Kiota.Abstractions.Serialization;
using System.Collections.Generic;
using System.IO;
using System;
namespace Marechai.App.Models
{
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
#pragma warning disable CS1591
public partial class MagazineIssueDto : 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 caption property
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? Caption { get; set; }
#nullable restore
#else
public string Caption { get; set; }
#endif
/// The id property
public long? Id { get; set; }
/// The issue_number property
public int? IssueNumber { get; set; }
/// The magazine_id property
public long? MagazineId { get; set; }
/// The magazine_title property
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? MagazineTitle { get; set; }
#nullable restore
#else
public string MagazineTitle { get; set; }
#endif
/// The native_caption property
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? NativeCaption { get; set; }
#nullable restore
#else
public string NativeCaption { get; set; }
#endif
/// The pages property
public int? Pages { get; set; }
/// The product_code property
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? ProductCode { get; set; }
#nullable restore
#else
public string ProductCode { get; set; }
#endif
/// The published property
public DateTimeOffset? Published { get; set; }
///
/// Instantiates a new and sets the default values.
///
public MagazineIssueDto()
{
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::Marechai.App.Models.MagazineIssueDto CreateFromDiscriminatorValue(IParseNode parseNode)
{
if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode));
return new global::Marechai.App.Models.MagazineIssueDto();
}
///
/// The deserialization information for the current model
///
/// A IDictionary<string, Action<IParseNode>>
public virtual IDictionary> GetFieldDeserializers()
{
return new Dictionary>
{
{ "caption", n => { Caption = n.GetStringValue(); } },
{ "id", n => { Id = n.GetLongValue(); } },
{ "issue_number", n => { IssueNumber = n.GetIntValue(); } },
{ "magazine_id", n => { MagazineId = n.GetLongValue(); } },
{ "magazine_title", n => { MagazineTitle = n.GetStringValue(); } },
{ "native_caption", n => { NativeCaption = n.GetStringValue(); } },
{ "pages", n => { Pages = n.GetIntValue(); } },
{ "product_code", n => { ProductCode = n.GetStringValue(); } },
{ "published", n => { Published = n.GetDateTimeOffsetValue(); } },
};
}
///
/// Serializes information the current object
///
/// Serialization writer to use to serialize this model
public virtual void Serialize(ISerializationWriter writer)
{
if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer));
writer.WriteStringValue("caption", Caption);
writer.WriteLongValue("id", Id);
writer.WriteIntValue("issue_number", IssueNumber);
writer.WriteLongValue("magazine_id", MagazineId);
writer.WriteStringValue("magazine_title", MagazineTitle);
writer.WriteStringValue("native_caption", NativeCaption);
writer.WriteIntValue("pages", Pages);
writer.WriteStringValue("product_code", ProductCode);
writer.WriteDateTimeOffsetValue("published", Published);
writer.WriteAdditionalData(AdditionalData);
}
}
}
#pragma warning restore CS0618