mirror of
https://github.com/eliasstepanik/IonosDDNSUpdater.git
synced 2026-01-11 19:48:26 +00:00
61 lines
2.7 KiB
C#
61 lines
2.7 KiB
C#
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 DynDnsRequest : IAdditionalDataHolder, IParsable {
|
|
/// <summary>Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.</summary>
|
|
public IDictionary<string, object> AdditionalData { get; set; }
|
|
/// <summary>Dynamic Dns description.</summary>
|
|
#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
|
|
/// <summary>The domains property</summary>
|
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
|
#nullable enable
|
|
public List<string>? Domains { get; set; }
|
|
#nullable restore
|
|
#else
|
|
public List<string> Domains { get; set; }
|
|
#endif
|
|
/// <summary>
|
|
/// Instantiates a new DynDnsRequest and sets the default values.
|
|
/// </summary>
|
|
public DynDnsRequest() {
|
|
AdditionalData = new Dictionary<string, object>();
|
|
}
|
|
/// <summary>
|
|
/// Creates a new instance of the appropriate class based on discriminator value
|
|
/// </summary>
|
|
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
|
|
public static DynDnsRequest CreateFromDiscriminatorValue(IParseNode parseNode) {
|
|
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
|
|
return new DynDnsRequest();
|
|
}
|
|
/// <summary>
|
|
/// The deserialization information for the current model
|
|
/// </summary>
|
|
public IDictionary<string, Action<IParseNode>> GetFieldDeserializers() {
|
|
return new Dictionary<string, Action<IParseNode>> {
|
|
{"description", n => { Description = n.GetStringValue(); } },
|
|
{"domains", n => { Domains = n.GetCollectionOfPrimitiveValues<string>()?.ToList(); } },
|
|
};
|
|
}
|
|
/// <summary>
|
|
/// Serializes information the current object
|
|
/// </summary>
|
|
/// <param name="writer">Serialization writer to use to serialize this model</param>
|
|
public void Serialize(ISerializationWriter writer) {
|
|
_ = writer ?? throw new ArgumentNullException(nameof(writer));
|
|
writer.WriteStringValue("description", Description);
|
|
writer.WriteCollectionOfPrimitiveValues<string>("domains", Domains);
|
|
writer.WriteAdditionalData(AdditionalData);
|
|
}
|
|
}
|
|
}
|