Azure.Storage.Management regeneration.
This commit is contained in:
Родитель
0c2154b49c
Коммит
9c5c548393
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -13,8 +13,8 @@ namespace Azure.Storage.Management.Models
|
|||
public partial class BlobRestoreRange
|
||||
{
|
||||
/// <summary> Initializes a new instance of BlobRestoreRange. </summary>
|
||||
/// <param name="startRange"> Blob start range. Empty means account start. </param>
|
||||
/// <param name="endRange"> Blob end range. Empty means account end. </param>
|
||||
/// <param name="startRange"> Blob start range. This is inclusive. Empty means account start. </param>
|
||||
/// <param name="endRange"> Blob end range. This is exclusive. Empty means account end. </param>
|
||||
public BlobRestoreRange(string startRange, string endRange)
|
||||
{
|
||||
if (startRange == null)
|
||||
|
@ -30,9 +30,9 @@ namespace Azure.Storage.Management.Models
|
|||
EndRange = endRange;
|
||||
}
|
||||
|
||||
/// <summary> Blob start range. Empty means account start. </summary>
|
||||
/// <summary> Blob start range. This is inclusive. Empty means account start. </summary>
|
||||
public string StartRange { get; }
|
||||
/// <summary> Blob end range. Empty means account end. </summary>
|
||||
/// <summary> Blob end range. This is exclusive. Empty means account end. </summary>
|
||||
public string EndRange { get; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
#nullable disable
|
||||
|
||||
using System;
|
||||
using System.Text.Json;
|
||||
using Azure.Core;
|
||||
|
||||
|
@ -22,6 +23,11 @@ namespace Azure.Storage.Management.Models
|
|||
writer.WritePropertyName("days");
|
||||
writer.WriteNumberValue(Days.Value);
|
||||
}
|
||||
if (LastEnabledTime != null)
|
||||
{
|
||||
writer.WritePropertyName("lastEnabledTime");
|
||||
writer.WriteStringValue(LastEnabledTime.Value, "S");
|
||||
}
|
||||
writer.WriteEndObject();
|
||||
}
|
||||
|
||||
|
@ -29,6 +35,7 @@ namespace Azure.Storage.Management.Models
|
|||
{
|
||||
bool enabled = default;
|
||||
int? days = default;
|
||||
DateTimeOffset? lastEnabledTime = default;
|
||||
foreach (var property in element.EnumerateObject())
|
||||
{
|
||||
if (property.NameEquals("enabled"))
|
||||
|
@ -45,8 +52,17 @@ namespace Azure.Storage.Management.Models
|
|||
days = property.Value.GetInt32();
|
||||
continue;
|
||||
}
|
||||
if (property.NameEquals("lastEnabledTime"))
|
||||
{
|
||||
if (property.Value.ValueKind == JsonValueKind.Null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
lastEnabledTime = property.Value.GetDateTimeOffset("S");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
return new RestorePolicyProperties(enabled, days);
|
||||
return new RestorePolicyProperties(enabled, days, lastEnabledTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
#nullable disable
|
||||
|
||||
using System;
|
||||
|
||||
namespace Azure.Storage.Management.Models
|
||||
{
|
||||
/// <summary> The blob service properties for blob restore policy. </summary>
|
||||
|
@ -20,15 +22,19 @@ namespace Azure.Storage.Management.Models
|
|||
/// <summary> Initializes a new instance of RestorePolicyProperties. </summary>
|
||||
/// <param name="enabled"> Blob restore is enabled if set to true. </param>
|
||||
/// <param name="days"> how long this blob can be restored. It should be great than zero and less than DeleteRetentionPolicy.days. </param>
|
||||
internal RestorePolicyProperties(bool enabled, int? days)
|
||||
/// <param name="lastEnabledTime"> Returns the date and time the restore policy was last enabled. </param>
|
||||
internal RestorePolicyProperties(bool enabled, int? days, DateTimeOffset? lastEnabledTime)
|
||||
{
|
||||
Enabled = enabled;
|
||||
Days = days;
|
||||
LastEnabledTime = lastEnabledTime;
|
||||
}
|
||||
|
||||
/// <summary> Blob restore is enabled if set to true. </summary>
|
||||
public bool Enabled { get; }
|
||||
/// <summary> how long this blob can be restored. It should be great than zero and less than DeleteRetentionPolicy.days. </summary>
|
||||
public int? Days { get; set; }
|
||||
/// <summary> Returns the date and time the restore policy was last enabled. </summary>
|
||||
public DateTimeOffset? LastEnabledTime { get; }
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче