using System.Runtime.Serialization;
using Newtonsoft.Json.Converters;
namespace AMWD.Net.Api.Cloudflare.Zones
{
///
/// A Cloudflare registrar domain.
/// Source
///
public class Domain
{
///
/// Domain identifier.
///
[JsonProperty("id")]
public string? Id { get; set; }
///
/// Shows if a domain is available for transferring into Cloudflare Registrar.
///
[JsonProperty("available")]
public bool? Available { get; set; }
///
/// Indicates if the domain can be registered as a new domain.
///
[JsonProperty("can_register")]
public bool? CanRegister { get; set; }
///
/// Shows time of creation.
///
[JsonProperty("created_at")]
public DateTime? CreatedAt { get; set; }
///
/// Shows name of current registrar.
///
[JsonProperty("current_registrar")]
public string? CurrentRegistrar { get; set; }
///
/// Shows when domain name registration expires.
///
[JsonProperty("expires_at")]
public DateTime? ExpiresAt { get; set; }
///
/// Shows whether a registrar lock is in place for a domain.
///
[JsonProperty("locked")]
public bool? Locked { get; set; }
///
/// Shows contact information for domain registrant.
///
[JsonProperty("registrant_contact")]
public DomainRegistrantContact? RegistrantContact { get; set; }
///
/// A comma-separated list of registry status codes.
///
///
/// A full list of status codes can be found at EPP Status Codes.
///
[JsonProperty("registry_statuses")]
public string? RegistryStatuses { get; set; }
///
/// Whether a particular TLD is currently supported by Cloudflare Registrar.
///
///
/// Refer to TLD Policies for a list of supported TLDs.
///
[JsonProperty("supported_tld")]
public bool? SupportedTld { get; set; }
///
/// Statuses for domain transfers into Cloudflare Registrar.
///
[JsonProperty("transfer_in")]
public DomainTransferIn? TransferIn { get; set; }
///
/// Last updated.
///
[JsonProperty("updated_at")]
public DateTime? UpdatedAt { get; set; }
}
///
/// Shows contact information for domain registrant.
/// Source
///
public class DomainRegistrantContact
{
///
/// Initializes a new instance of the class.
///
/// Address.
/// City.
/// State.
/// User's organization.
public DomainRegistrantContact(string address, string city, string state, string organization)
{
Address = address;
City = city;
State = state;
Organization = organization;
}
///
/// Address.
///
[JsonProperty("address")]
public string Address { get; set; }
///
/// City.
///
[JsonProperty("city")]
public string City { get; set; }
///
/// The country in which the user lives..
///
[JsonProperty("country")]
public string? Country { get; set; }
///
/// User's first name.
///
[JsonProperty("first_name")]
public string? FirstName { get; set; }
///
/// User's last name.
///
[JsonProperty("last_name")]
public string? LastName { get; set; }
///
/// Name of organization.
///
[JsonProperty("organization")]
public string Organization { get; set; }
///
/// User's telephone number.
///
[JsonProperty("phone")]
public string? Phone { get; set; }
///
/// State.
///
[JsonProperty("state")]
public string State { get; set; }
///
/// The zipcode or postal code where the user lives.
///
[JsonProperty("zip")]
public string? ZipCode { get; set; }
///
/// Contact Identifier.
///
[JsonProperty("id")]
public string? Id { get; set; }
///
/// Optional address line for unit, floor, suite, etc.
///
[JsonProperty("address2")]
public string? Address2 { get; set; }
///
/// The contact email address of the user.
///
[JsonProperty("email")]
public string? Email { get; set; }
///
/// Contact fax number.
///
[JsonProperty("fax")]
public string? Fax { get; set; }
}
///
/// Statuses for domain transfers into Cloudflare Registrar.
/// Source
///
public class DomainTransferIn
{
///
/// Form of authorization has been accepted by the registrant.
///
[JsonProperty("accept_foa")]
public DomainTransferInAcceptFoa? AcceptFoa { get; set; }
///
/// Shows transfer status with the registry.
///
[JsonProperty("approve_transfer")]
public DomainTransferInApproveTransfer? ApproveTransfer { get; set; }
///
/// Indicates if cancellation is still possible.
///
[JsonProperty("can_cancel_transfer")]
public bool? CanCancelTransfer { get; set; }
///
/// Privacy guards are disabled at the foreign registrar.
///
[JsonProperty("disable_privacy")]
public DomainTransferInDisablePrivacy? DisablePrivacy { get; set; }
///
/// Auth code has been entered and verified.
///
[JsonProperty("enter_auth_code")]
public DomainTransferInEnterAuthCode? EnterAuthCode { get; set; }
///
/// Domain is unlocked at the foreign registrar.
///
[JsonProperty("unlock_domain")]
public DomainTransferInUnlockDomain? UnlockDomain { get; set; }
}
///
/// Source
///
[JsonConverter(typeof(StringEnumConverter))]
public enum DomainTransferInAcceptFoa
{
///
/// Needed.
///
[EnumMember(Value = "needed")]
Needed = 1,
///
/// Ok.
///
[EnumMember(Value = "ok")]
Ok = 2
}
///
/// Source
///
[JsonConverter(typeof(StringEnumConverter))]
public enum DomainTransferInApproveTransfer
{
///
/// Needed.
///
[EnumMember(Value = "needed")]
Needed = 1,
///
/// Ok.
///
[EnumMember(Value = "ok")]
Ok = 2,
///
/// Pending.
///
[EnumMember(Value = "pending")]
Pending = 3,
///
/// Trying.
///
[EnumMember(Value = "trying")]
Trying = 4,
///
/// Rejected.
///
[EnumMember(Value = "rejected")]
Rejected = 5,
///
/// Unknown.
///
[EnumMember(Value = "unknown")]
Unknown = 6
}
///
/// Source
///
[JsonConverter(typeof(StringEnumConverter))]
public enum DomainTransferInDisablePrivacy
{
///
/// Needed.
///
[EnumMember(Value = "needed")]
Needed = 1,
///
/// Ok.
///
[EnumMember(Value = "ok")]
Ok = 2,
///
/// Unknown.
///
[EnumMember(Value = "unknown")]
Unknown = 3
}
///
/// Source
///
[JsonConverter(typeof(StringEnumConverter))]
public enum DomainTransferInEnterAuthCode
{
///
/// Needed.
///
[EnumMember(Value = "needed")]
Needed = 1,
///
/// Ok.
///
[EnumMember(Value = "ok")]
Ok = 2,
///
/// Pending.
///
[EnumMember(Value = "pending")]
Pending = 3,
///
/// Trying.
///
[EnumMember(Value = "trying")]
Trying = 4,
///
/// Rejected.
///
[EnumMember(Value = "rejected")]
Rejected = 5
}
///
/// Source
///
[JsonConverter(typeof(StringEnumConverter))]
public enum DomainTransferInUnlockDomain
{
///
/// Needed.
///
[EnumMember(Value = "needed")]
Needed = 1,
///
/// Ok.
///
[EnumMember(Value = "ok")]
Ok = 2,
///
/// Pending.
///
[EnumMember(Value = "pending")]
Pending = 3,
///
/// Trying.
///
[EnumMember(Value = "trying")]
Trying = 4,
///
/// Unknown.
///
[EnumMember(Value = "unknown")]
Unknown = 5
}
}