BlobGeoReplication
Geo-Replication information for the Secondary Storage Service.
using Azure.Core;
using System;
using System.Xml.Linq;
namespace Azure.Storage.Blobs.Models
{
[CodeGenModel("GeoReplication")]
public class BlobGeoReplication
{
public BlobGeoReplicationStatus Status { get; }
[CodeGenMember("LastSyncTime")]
public DateTimeOffset? LastSyncedOn { get; set; }
internal BlobGeoReplication(BlobGeoReplicationStatus status, DateTimeOffset? lastSyncedOn)
{
Status = status;
LastSyncedOn = lastSyncedOn;
}
internal static BlobGeoReplication DeserializeBlobGeoReplication(XElement element)
{
BlobGeoReplicationStatus status = BlobGeoReplicationStatus.Live;
DateTimeOffset? lastSyncedOn = null;
XElement xElement = element.Element("Status");
if (xElement != null)
status = xElement.Value.ToBlobGeoReplicationStatus();
XElement xElement2 = element.Element("LastSyncTime");
if (xElement2 != null)
lastSyncedOn = xElement2.GetDateTimeOffsetValue("R");
return new BlobGeoReplication(status, lastSyncedOn);
}
}
}