using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Abstractions.Serialization; using System; using System.Collections.Generic; using System.IO; using System.Linq; namespace DDNSUpdater.APIs.Ionos.ApiClient.Models { public class WithZone : ApiException, IAdditionalDataHolder, IParsable { /// 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 errorRecord property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public Record? ErrorRecord { get; set; } #nullable restore #else public Record ErrorRecord { get; set; } #endif /// The inputRecord property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public Record? InputRecord { get; set; } #nullable restore #else public Record InputRecord { get; set; } #endif /// The invalid property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? Invalid { get; set; } #nullable restore #else public List Invalid { get; set; } #endif /// The invalidFields property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? InvalidFields { get; set; } #nullable restore #else public List InvalidFields { get; set; } #endif /// The requiredFields property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? RequiredFields { get; set; } #nullable restore #else public List RequiredFields { get; set; } #endif /// /// Instantiates a new WithZone and sets the default values. /// public WithZone() { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// /// The parse node to use to read the discriminator value and create the object public static WithZone CreateFromDiscriminatorValue(IParseNode parseNode) { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new WithZone(); } /// /// The deserialization information for the current model /// public IDictionary> GetFieldDeserializers() { return new Dictionary> { {"errorRecord", n => { ErrorRecord = n.GetObjectValue(Record.CreateFromDiscriminatorValue); } }, {"inputRecord", n => { InputRecord = n.GetObjectValue(Record.CreateFromDiscriminatorValue); } }, {"invalid", n => { Invalid = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, {"invalidFields", n => { InvalidFields = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, {"requiredFields", n => { RequiredFields = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model public void Serialize(ISerializationWriter writer) { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("errorRecord", ErrorRecord); writer.WriteObjectValue("inputRecord", InputRecord); writer.WriteCollectionOfPrimitiveValues("invalid", Invalid); writer.WriteCollectionOfPrimitiveValues("invalidFields", InvalidFields); writer.WriteCollectionOfPrimitiveValues("requiredFields", RequiredFields); writer.WriteAdditionalData(AdditionalData); } } }