Add "ZoneSettings" extensions
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
namespace AMWD.Net.Api.Cloudflare.Zones
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a request to edit multiple zone settings.
|
||||
/// </summary>
|
||||
public class EditMultipleZoneSettingsRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="EditMultipleZoneSettingsRequest"/> class.
|
||||
/// </summary>
|
||||
/// <param name="zoneId">The zone identifier.</param>
|
||||
public EditMultipleZoneSettingsRequest(string zoneId)
|
||||
{
|
||||
ZoneId = zoneId;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The zone identifier.
|
||||
/// </summary>
|
||||
public string ZoneId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The zone settings.
|
||||
/// </summary>
|
||||
public IReadOnlyCollection<ZoneSettingBase>? Settings { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
namespace AMWD.Net.Api.Cloudflare.Zones
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a request to edit a zone setting.
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
public class EditZoneSettingRequest<T>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="EditZoneSettingRequest{T}"/> class.
|
||||
/// </summary>
|
||||
/// <param name="zoneId">The zone identifier.</param>
|
||||
/// <param name="setting">The zone setting.</param>
|
||||
public EditZoneSettingRequest(string zoneId, T setting)
|
||||
{
|
||||
ZoneId = zoneId;
|
||||
Setting = setting;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The zone identifier.
|
||||
/// </summary>
|
||||
public string ZoneId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The zone setting.
|
||||
/// </summary>
|
||||
public T Setting { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates whether the setting should be enabled or disabled.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// If this property is not <see langword="null"/>,
|
||||
/// the value of the <see cref="Setting"/> will not be modified.
|
||||
/// </remarks>
|
||||
public bool? Enabled { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user