// #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 ScreenDto : 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 diagonal property public double? Diagonal { get; set; } /// The effective_colors property public long? EffectiveColors { get; set; } /// The height property public double? Height { get; set; } /// The id property public int? Id { get; set; } /// The native_resolution property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public global::Marechai.App.Models.ScreenDto.ScreenDto_native_resolution? NativeResolution { get; set; } #nullable restore #else public global::Marechai.App.Models.ScreenDto.ScreenDto_native_resolution NativeResolution { get; set; } #endif /// The native_resolution_id property public int? NativeResolutionId { get; set; } /// The size property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Size { get; set; } #nullable restore #else public string Size { get; set; } #endif /// The type property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Type { get; set; } #nullable restore #else public string Type { get; set; } #endif /// The width property public double? Width { get; set; } /// /// Instantiates a new and sets the default values. /// public ScreenDto() { 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.ScreenDto CreateFromDiscriminatorValue(IParseNode parseNode) { if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Marechai.App.Models.ScreenDto(); } /// /// The deserialization information for the current model /// /// A IDictionary<string, Action<IParseNode>> public virtual IDictionary> GetFieldDeserializers() { return new Dictionary> { { "diagonal", n => { Diagonal = n.GetDoubleValue(); } }, { "effective_colors", n => { EffectiveColors = n.GetLongValue(); } }, { "height", n => { Height = n.GetDoubleValue(); } }, { "id", n => { Id = n.GetIntValue(); } }, { "native_resolution", n => { NativeResolution = n.GetObjectValue(global::Marechai.App.Models.ScreenDto.ScreenDto_native_resolution.CreateFromDiscriminatorValue); } }, { "native_resolution_id", n => { NativeResolutionId = n.GetIntValue(); } }, { "size", n => { Size = n.GetStringValue(); } }, { "type", n => { Type = n.GetStringValue(); } }, { "width", n => { Width = n.GetDoubleValue(); } }, }; } /// /// 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.WriteDoubleValue("diagonal", Diagonal); writer.WriteLongValue("effective_colors", EffectiveColors); writer.WriteDoubleValue("height", Height); writer.WriteIntValue("id", Id); writer.WriteObjectValue("native_resolution", NativeResolution); writer.WriteIntValue("native_resolution_id", NativeResolutionId); writer.WriteStringValue("size", Size); writer.WriteStringValue("type", Type); writer.WriteDoubleValue("width", Width); writer.WriteAdditionalData(AdditionalData); } /// /// Composed type wrapper for classes , /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class ScreenDto_native_resolution : IComposedTypeWrapper, IParsable { /// Composed type representation for type #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public global::Marechai.App.Models.ResolutionDto? ResolutionDto { get; set; } #nullable restore #else public global::Marechai.App.Models.ResolutionDto ResolutionDto { get; set; } #endif /// Composed type representation for type #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public global::Marechai.App.Models.ScreenDto_native_resolutionMember1? ScreenDtoNativeResolutionMember1 { get; set; } #nullable restore #else public global::Marechai.App.Models.ScreenDto_native_resolutionMember1 ScreenDtoNativeResolutionMember1 { get; set; } #endif /// /// 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.ScreenDto.ScreenDto_native_resolution CreateFromDiscriminatorValue(IParseNode parseNode) { if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); var result = new global::Marechai.App.Models.ScreenDto.ScreenDto_native_resolution(); if("ResolutionDto".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) { result.ResolutionDto = new global::Marechai.App.Models.ResolutionDto(); } else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) { result.ScreenDtoNativeResolutionMember1 = new global::Marechai.App.Models.ScreenDto_native_resolutionMember1(); } return result; } /// /// The deserialization information for the current model /// /// A IDictionary<string, Action<IParseNode>> public virtual IDictionary> GetFieldDeserializers() { if(ResolutionDto != null) { return ResolutionDto.GetFieldDeserializers(); } else if(ScreenDtoNativeResolutionMember1 != null) { return ScreenDtoNativeResolutionMember1.GetFieldDeserializers(); } return new Dictionary>(); } /// /// 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)); if(ResolutionDto != null) { writer.WriteObjectValue(null, ResolutionDto); } else if(ScreenDtoNativeResolutionMember1 != null) { writer.WriteObjectValue(null, ScreenDtoNativeResolutionMember1); } } } } } #pragma warning restore CS0618