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 CustomerZone : 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 zone id. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Id { get; set; } #nullable restore #else public string Id { get; set; } #endif /// The zone name #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Name { get; set; } #nullable restore #else public string Name { get; set; } #endif /// The records property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? Records { get; set; } #nullable restore #else public List Records { get; set; } #endif /// Represents the possible zone types. public ZoneTypes? Type { get; set; } /// /// Instantiates a new CustomerZone and sets the default values. /// public CustomerZone() { 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 CustomerZone CreateFromDiscriminatorValue(IParseNode parseNode) { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new CustomerZone(); } /// /// The deserialization information for the current model /// public IDictionary> GetFieldDeserializers() { return new Dictionary> { {"id", n => { Id = n.GetStringValue(); } }, {"name", n => { Name = n.GetStringValue(); } }, {"records", n => { Records = n.GetCollectionOfObjectValues(RecordResponse.CreateFromDiscriminatorValue)?.ToList(); } }, {"type", n => { Type = n.GetEnumValue(); } }, }; } /// /// 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.WriteStringValue("id", Id); writer.WriteStringValue("name", Name); writer.WriteCollectionOfObjectValues("records", Records); writer.WriteEnumValue("type", Type); writer.WriteAdditionalData(AdditionalData); } } }