Changed folder structure, added explicit nullable for extensions.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AMWD.Net.Api.Cloudflare.Zones.Internals.Filters
|
||||
{
|
||||
internal class CreateZoneHoldFilter : IQueryParameterFilter
|
||||
{
|
||||
public bool IncludeSubdomains { get; set; }
|
||||
|
||||
public IDictionary<string, string> GetQueryParameters()
|
||||
{
|
||||
var dict = new Dictionary<string, string>();
|
||||
|
||||
if (IncludeSubdomains)
|
||||
dict.Add("include_subdomains", "true");
|
||||
|
||||
return dict;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AMWD.Net.Api.Cloudflare.Zones.Internals.Filters
|
||||
{
|
||||
internal class DeleteZoneHoldFilter : IQueryParameterFilter
|
||||
{
|
||||
public DateTime? HoldAfter { get; set; }
|
||||
|
||||
public IDictionary<string, string> GetQueryParameters()
|
||||
{
|
||||
var dict = new Dictionary<string, string>();
|
||||
|
||||
if (HoldAfter.HasValue)
|
||||
dict.Add("hold_after", HoldAfter.Value.ToUniversalTime().ToString("yyyy-MM-dd'T'HH:mm:ss'Z'"));
|
||||
|
||||
return dict;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
namespace AMWD.Net.Api.Cloudflare.Zones.Internals.Requests
|
||||
{
|
||||
internal class InternalCreateZoneRequest
|
||||
{
|
||||
public InternalCreateZoneRequest(AccountBase account, string name)
|
||||
{
|
||||
Account = account;
|
||||
Name = name;
|
||||
}
|
||||
|
||||
[JsonProperty("account")]
|
||||
public AccountBase Account { get; set; }
|
||||
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[JsonProperty("type")]
|
||||
public ZoneType? Type { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AMWD.Net.Api.Cloudflare.Zones.Internals.Requests
|
||||
{
|
||||
internal class InternalEditZoneRequest
|
||||
{
|
||||
[JsonProperty("type")]
|
||||
public ZoneType? Type { get; set; }
|
||||
|
||||
[JsonProperty("vanity_name_servers")]
|
||||
public IList<string>? VanityNameServers { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AMWD.Net.Api.Cloudflare.Zones.Internals.Requests
|
||||
{
|
||||
internal class InternalPurgeCacheRequest
|
||||
{
|
||||
[JsonProperty("purge_everything")]
|
||||
public bool? PurgeEverything { get; set; }
|
||||
|
||||
[JsonProperty("tags")]
|
||||
public IList<string>? Tags { get; set; }
|
||||
|
||||
[JsonProperty("hosts")]
|
||||
public IList<string>? Hostnames { get; set; }
|
||||
|
||||
[JsonProperty("prefixes")]
|
||||
public IList<string>? Prefixes { get; set; }
|
||||
|
||||
[JsonProperty("files")]
|
||||
public IList<string>? Urls { get; set; }
|
||||
|
||||
[JsonProperty("files")]
|
||||
public IList<PurgeUrlWithHeaders>? UrlsWithHeaders { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
namespace AMWD.Net.Api.Cloudflare.Zones.Internals.Requests
|
||||
{
|
||||
internal class InternalUpdateDnsSettingsRequest
|
||||
{
|
||||
[JsonProperty("flatten_all_cnames")]
|
||||
public bool? FlattenAllCnames { get; set; }
|
||||
|
||||
[JsonProperty("foundation_dns")]
|
||||
public bool? FoundationDns { get; set; }
|
||||
|
||||
[JsonProperty("multi_provider")]
|
||||
public bool? MultiProvider { get; set; }
|
||||
|
||||
[JsonProperty("nameservers")]
|
||||
public Nameserver? Nameservers { get; set; }
|
||||
|
||||
[JsonProperty("ns_ttl")]
|
||||
public int? NameserverTtl { get; set; }
|
||||
|
||||
[JsonProperty("secondary_overrides")]
|
||||
public bool? SecondaryOverrides { get; set; }
|
||||
|
||||
[JsonProperty("soa")]
|
||||
public StartOfAuthority? Soa { get; set; }
|
||||
|
||||
[JsonProperty("zone_mode")]
|
||||
public ZoneMode? Mode { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AMWD.Net.Api.Cloudflare.Zones.Internals.Requests
|
||||
{
|
||||
internal class PurgeUrlWithHeaders
|
||||
{
|
||||
[JsonProperty("headers")]
|
||||
public Dictionary<string, string> Headers { get; set; } = [];
|
||||
|
||||
[JsonProperty("url")]
|
||||
public string? Url { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user