// #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 NewsDto : 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 affected_id property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public UntypedNode? AffectedId { get; set; } #nullable restore #else public UntypedNode AffectedId { get; set; } #endif /// The controller property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Controller { get; set; } #nullable restore #else public string Controller { get; set; } #endif /// The id property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public UntypedNode? Id { get; set; } #nullable restore #else public UntypedNode Id { get; set; } #endif /// The item_name property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? ItemName { get; set; } #nullable restore #else public string ItemName { get; set; } #endif /// The text property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Text { get; set; } #nullable restore #else public string Text { get; set; } #endif /// The timestamp property public DateTimeOffset? Timestamp { get; set; } /// The type property public int? Type { get; set; } /// /// Instantiates a new and sets the default values. /// public NewsDto() { 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.NewsDto CreateFromDiscriminatorValue(IParseNode parseNode) { if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Marechai.App.Models.NewsDto(); } /// /// The deserialization information for the current model /// /// A IDictionary<string, Action<IParseNode>> public virtual IDictionary> GetFieldDeserializers() { return new Dictionary> { { "affected_id", n => { AffectedId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, { "controller", n => { Controller = n.GetStringValue(); } }, { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, { "item_name", n => { ItemName = n.GetStringValue(); } }, { "text", n => { Text = n.GetStringValue(); } }, { "timestamp", n => { Timestamp = n.GetDateTimeOffsetValue(); } }, { "type", n => { Type = n.GetIntValue(); } }, }; } /// /// 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.WriteObjectValue("affected_id", AffectedId); writer.WriteStringValue("controller", Controller); writer.WriteObjectValue("id", Id); writer.WriteStringValue("item_name", ItemName); writer.WriteStringValue("text", Text); writer.WriteDateTimeOffsetValue("timestamp", Timestamp); writer.WriteIntValue("type", Type); writer.WriteAdditionalData(AdditionalData); } } } #pragma warning restore CS0618