Azure.Storage.Management regeneration.

This commit is contained in:
Michael Yanni 2020-04-03 13:06:23 -07:00
Родитель 0c2154b49c
Коммит 9c5c548393
4 изменённых файлов: 982 добавлений и 939 удалений

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -13,8 +13,8 @@ namespace Azure.Storage.Management.Models
public partial class BlobRestoreRange public partial class BlobRestoreRange
{ {
/// <summary> Initializes a new instance of BlobRestoreRange. </summary> /// <summary> Initializes a new instance of BlobRestoreRange. </summary>
/// <param name="startRange"> Blob start range. Empty means account start. </param> /// <param name="startRange"> Blob start range. This is inclusive. Empty means account start. </param>
/// <param name="endRange"> Blob end range. Empty means account end. </param> /// <param name="endRange"> Blob end range. This is exclusive. Empty means account end. </param>
public BlobRestoreRange(string startRange, string endRange) public BlobRestoreRange(string startRange, string endRange)
{ {
if (startRange == null) if (startRange == null)
@ -30,9 +30,9 @@ namespace Azure.Storage.Management.Models
EndRange = endRange; 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; } 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; } public string EndRange { get; }
} }
} }

Просмотреть файл

@ -5,6 +5,7 @@
#nullable disable #nullable disable
using System;
using System.Text.Json; using System.Text.Json;
using Azure.Core; using Azure.Core;
@ -22,6 +23,11 @@ namespace Azure.Storage.Management.Models
writer.WritePropertyName("days"); writer.WritePropertyName("days");
writer.WriteNumberValue(Days.Value); writer.WriteNumberValue(Days.Value);
} }
if (LastEnabledTime != null)
{
writer.WritePropertyName("lastEnabledTime");
writer.WriteStringValue(LastEnabledTime.Value, "S");
}
writer.WriteEndObject(); writer.WriteEndObject();
} }
@ -29,6 +35,7 @@ namespace Azure.Storage.Management.Models
{ {
bool enabled = default; bool enabled = default;
int? days = default; int? days = default;
DateTimeOffset? lastEnabledTime = default;
foreach (var property in element.EnumerateObject()) foreach (var property in element.EnumerateObject())
{ {
if (property.NameEquals("enabled")) if (property.NameEquals("enabled"))
@ -45,8 +52,17 @@ namespace Azure.Storage.Management.Models
days = property.Value.GetInt32(); days = property.Value.GetInt32();
continue; 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 #nullable disable
using System;
namespace Azure.Storage.Management.Models namespace Azure.Storage.Management.Models
{ {
/// <summary> The blob service properties for blob restore policy. </summary> /// <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> /// <summary> Initializes a new instance of RestorePolicyProperties. </summary>
/// <param name="enabled"> Blob restore is enabled if set to true. </param> /// <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> /// <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; Enabled = enabled;
Days = days; Days = days;
LastEnabledTime = lastEnabledTime;
} }
/// <summary> Blob restore is enabled if set to true. </summary> /// <summary> Blob restore is enabled if set to true. </summary>
public bool Enabled { get; } public bool Enabled { get; }
/// <summary> how long this blob can be restored. It should be great than zero and less than DeleteRetentionPolicy.days. </summary> /// <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; } public int? Days { get; set; }
/// <summary> Returns the date and time the restore policy was last enabled. </summary>
public DateTimeOffset? LastEnabledTime { get; }
} }
} }