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 RecordUpdate : 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 content property
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? Content { get; set; }
#nullable restore
#else
public string Content { get; set; }
#endif
/// When is true, the record is not visible for lookup.
public bool? Disabled { get; set; }
/// The prio property
public int? Prio { get; set; }
/// Time to live for the record, recommended 3600.
public int? Ttl { get; set; }
///
/// Instantiates a new RecordUpdate and sets the default values.
///
public RecordUpdate() {
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 RecordUpdate CreateFromDiscriminatorValue(IParseNode parseNode) {
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
return new RecordUpdate();
}
///
/// The deserialization information for the current model
///
public IDictionary> GetFieldDeserializers() {
return new Dictionary> {
{"content", n => { Content = n.GetStringValue(); } },
{"disabled", n => { Disabled = n.GetBoolValue(); } },
{"prio", n => { Prio = n.GetIntValue(); } },
{"ttl", n => { Ttl = n.GetIntValue(); } },
};
}
///
/// 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("content", Content);
writer.WriteBoolValue("disabled", Disabled);
writer.WriteIntValue("prio", Prio);
writer.WriteIntValue("ttl", Ttl);
writer.WriteAdditionalData(AdditionalData);
}
}
}