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 DynamicDns : 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; }
/// DynDns configuration identifier.
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? BulkId { get; set; }
#nullable restore
#else
public string BulkId { get; set; }
#endif
/// Dynamic Dns description.
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? Description { get; set; }
#nullable restore
#else
public string Description { get; set; }
#endif
/// The domains property
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public List? Domains { get; set; }
#nullable restore
#else
public List Domains { get; set; }
#endif
/// Use the url with GET to update the ips of (sub)domains. Query parameters: ipv4, ipv6.
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? UpdateUrl { get; set; }
#nullable restore
#else
public string UpdateUrl { get; set; }
#endif
///
/// Instantiates a new DynamicDns and sets the default values.
///
public DynamicDns() {
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 DynamicDns CreateFromDiscriminatorValue(IParseNode parseNode) {
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
return new DynamicDns();
}
///
/// The deserialization information for the current model
///
public IDictionary> GetFieldDeserializers() {
return new Dictionary> {
{"bulkId", n => { BulkId = n.GetStringValue(); } },
{"description", n => { Description = n.GetStringValue(); } },
{"domains", n => { Domains = n.GetCollectionOfPrimitiveValues()?.ToList(); } },
{"updateUrl", n => { UpdateUrl = n.GetStringValue(); } },
};
}
///
/// 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("bulkId", BulkId);
writer.WriteStringValue("description", Description);
writer.WriteCollectionOfPrimitiveValues("domains", Domains);
writer.WriteStringValue("updateUrl", UpdateUrl);
writer.WriteAdditionalData(AdditionalData);
}
}
}