refine list return types for blob service (#1578)

* refine return type of listblob and listblobcontainers

* changelog
This commit is contained in:
JinmingHu 2021-02-03 16:14:14 +08:00 committed by GitHub
parent c8da53d544
commit d26e148c86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 121 additions and 111 deletions

View File

@ -29,7 +29,7 @@
- Removed `TagValue` from `FilterBlobItem`, removed `Where` from `FindBlobsByTagsSinglePageResult`.
- Type for ETag was changed to `Azure::Core::ETag`.
- Removed `BlobPrefix` struct, use `std::string` instead.
- Refined `DownloadBlobResult` and `DownloadBlobToResult`.
- Refined `BlobContainerItem`, `BlobItem`, `DownloadBlobResult` and `DownloadBlobToResult`.
## 12.0.0-beta.6 (2020-01-14)

View File

@ -740,9 +740,8 @@ namespace Azure { namespace Storage { namespace Blobs {
BlobRetentionPolicy RetentionPolicy;
}; // struct BlobAnalyticsLogging
struct BlobContainerItem
struct BlobContainerItemDetails
{
std::string Name;
Azure::Core::ETag ETag;
Azure::Core::DateTime LastModified;
Storage::Metadata Metadata;
@ -754,11 +753,9 @@ namespace Azure { namespace Storage { namespace Blobs {
BlobLeaseStatus LeaseStatus = BlobLeaseStatus::Unlocked;
std::string DefaultEncryptionScope;
bool PreventEncryptionScopeOverride = false;
bool IsDeleted = false;
Azure::Core::Nullable<std::string> VersionId;
Azure::Core::Nullable<Azure::Core::DateTime> DeletedOn;
Azure::Core::Nullable<int32_t> RemainingRetentionDays;
}; // struct BlobContainerItem
Azure::Core::Nullable<Azure::Core::DateTime> DeletedOn;
}; // struct BlobContainerItemDetails
struct BlobGeoReplication
{
@ -888,6 +885,14 @@ namespace Azure { namespace Storage { namespace Blobs {
Azure::Core::Nullable<std::string> EncryptionScope;
}; // struct AppendBlockResult
struct BlobContainerItem
{
std::string Name;
bool IsDeleted = false;
Azure::Core::Nullable<std::string> VersionId;
BlobContainerItemDetails Details;
}; // struct BlobContainerItem
struct BlobHttpHeaders
{
std::string ContentType;
@ -939,15 +944,6 @@ namespace Azure { namespace Storage { namespace Blobs {
BlobGeoReplication GeoReplication;
}; // struct GetServiceStatisticsResult
struct ListBlobContainersSinglePageResult
{
std::string RequestId;
std::string ServiceEndpoint;
std::string Prefix;
Azure::Core::Nullable<std::string> ContinuationToken;
std::vector<BlobContainerItem> Items;
}; // struct ListBlobContainersSinglePageResult
struct ObjectReplicationPolicy
{
std::string PolicyId;
@ -1008,13 +1004,8 @@ namespace Azure { namespace Storage { namespace Blobs {
Azure::Core::Nullable<std::string> EncryptionScope;
}; // struct UploadPageBlobPagesResult
struct BlobItem
struct BlobItemDetails
{
std::string Name;
bool IsDeleted = false;
std::string Snapshot;
Azure::Core::Nullable<std::string> VersionId;
Azure::Core::Nullable<bool> IsCurrentVersion;
BlobHttpHeaders HttpHeaders;
Storage::Metadata Metadata;
Azure::Core::DateTime CreatedOn;
@ -1022,8 +1013,6 @@ namespace Azure { namespace Storage { namespace Blobs {
Azure::Core::Nullable<Azure::Core::DateTime> LastAccessedOn;
Azure::Core::DateTime LastModified;
Azure::Core::ETag ETag;
int64_t BlobSize = 0;
Models::BlobType BlobType;
Azure::Core::Nullable<AccessTier> Tier;
Azure::Core::Nullable<bool> IsAccessTierInferred;
BlobLeaseStatus LeaseStatus = BlobLeaseStatus::Unlocked;
@ -1036,7 +1025,7 @@ namespace Azure { namespace Storage { namespace Blobs {
Azure::Core::Nullable<bool> IsSealed; // only for append blob
std::vector<ObjectReplicationPolicy>
ObjectReplicationSourceProperties; // only valid for replication source blob
}; // struct BlobItem
}; // struct BlobItemDetails
struct DownloadBlobDetails
{
@ -1114,6 +1103,27 @@ namespace Azure { namespace Storage { namespace Blobs {
Azure::Core::Nullable<bool> IsCurrentVersion;
}; // struct GetBlobPropertiesResult
struct ListBlobContainersSinglePageResult
{
std::string RequestId;
std::string ServiceEndpoint;
std::string Prefix;
Azure::Core::Nullable<std::string> ContinuationToken;
std::vector<BlobContainerItem> Items;
}; // struct ListBlobContainersSinglePageResult
struct BlobItem
{
std::string Name;
int64_t BlobSize = 0;
Models::BlobType BlobType;
bool IsDeleted = false;
std::string Snapshot;
Azure::Core::Nullable<std::string> VersionId;
Azure::Core::Nullable<bool> IsCurrentVersion;
BlobItemDetails Details;
}; // struct BlobItem
struct DownloadBlobResult
{
std::string RequestId;
@ -2187,7 +2197,7 @@ namespace Azure { namespace Storage { namespace Blobs {
}
if (path.size() == 1 && path[0] == XmlTagName::k_Metadata)
{
ret.Metadata = MetadataFromXml(reader);
ret.Details.Metadata = MetadataFromXml(reader);
path.pop_back();
}
}
@ -2201,62 +2211,62 @@ namespace Azure { namespace Storage { namespace Blobs {
path.size() == 2 && path[0] == XmlTagName::k_Properties
&& path[1] == XmlTagName::k_Etag)
{
ret.ETag = Azure::Core::ETag(node.Value);
ret.Details.ETag = Azure::Core::ETag(node.Value);
}
else if (
path.size() == 2 && path[0] == XmlTagName::k_Properties
&& path[1] == XmlTagName::k_LastModified)
{
ret.LastModified = Azure::Core::DateTime::Parse(
ret.Details.LastModified = Azure::Core::DateTime::Parse(
node.Value, Azure::Core::DateTime::DateFormat::Rfc1123);
}
else if (
path.size() == 2 && path[0] == XmlTagName::k_Properties
&& path[1] == XmlTagName::k_PublicAccess)
{
ret.AccessType = PublicAccessType(node.Value);
ret.Details.AccessType = PublicAccessType(node.Value);
}
else if (
path.size() == 2 && path[0] == XmlTagName::k_Properties
&& path[1] == XmlTagName::k_HasImmutabilityPolicy)
{
ret.HasImmutabilityPolicy = std::strcmp(node.Value, "true") == 0;
ret.Details.HasImmutabilityPolicy = std::strcmp(node.Value, "true") == 0;
}
else if (
path.size() == 2 && path[0] == XmlTagName::k_Properties
&& path[1] == XmlTagName::k_HasLegalHold)
{
ret.HasLegalHold = std::strcmp(node.Value, "true") == 0;
ret.Details.HasLegalHold = std::strcmp(node.Value, "true") == 0;
}
else if (
path.size() == 2 && path[0] == XmlTagName::k_Properties
&& path[1] == XmlTagName::k_LeaseStatus)
{
ret.LeaseStatus = BlobLeaseStatus(node.Value);
ret.Details.LeaseStatus = BlobLeaseStatus(node.Value);
}
else if (
path.size() == 2 && path[0] == XmlTagName::k_Properties
&& path[1] == XmlTagName::k_LeaseState)
{
ret.LeaseState = BlobLeaseState(node.Value);
ret.Details.LeaseState = BlobLeaseState(node.Value);
}
else if (
path.size() == 2 && path[0] == XmlTagName::k_Properties
&& path[1] == XmlTagName::k_LeaseDuration)
{
ret.LeaseDuration = BlobLeaseDurationType(node.Value);
ret.Details.LeaseDuration = BlobLeaseDurationType(node.Value);
}
else if (
path.size() == 2 && path[0] == XmlTagName::k_Properties
&& path[1] == XmlTagName::k_DefaultEncryptionScope)
{
ret.DefaultEncryptionScope = node.Value;
ret.Details.DefaultEncryptionScope = node.Value;
}
else if (
path.size() == 2 && path[0] == XmlTagName::k_Properties
&& path[1] == XmlTagName::k_DenyEncryptionScopeOverride)
{
ret.PreventEncryptionScopeOverride = std::strcmp(node.Value, "true") == 0;
ret.Details.PreventEncryptionScopeOverride = std::strcmp(node.Value, "true") == 0;
}
else if (path.size() == 1 && path[0] == XmlTagName::k_Deleted)
{
@ -2270,14 +2280,14 @@ namespace Azure { namespace Storage { namespace Blobs {
path.size() == 2 && path[0] == XmlTagName::k_Properties
&& path[1] == XmlTagName::k_DeletedTime)
{
ret.DeletedOn = Azure::Core::DateTime::Parse(
ret.Details.DeletedOn = Azure::Core::DateTime::Parse(
node.Value, Azure::Core::DateTime::DateFormat::Rfc1123);
}
else if (
path.size() == 2 && path[0] == XmlTagName::k_Properties
&& path[1] == XmlTagName::k_RemainingRetentionDays)
{
ret.RemainingRetentionDays = std::stoi(node.Value);
ret.Details.RemainingRetentionDays = std::stoi(node.Value);
}
}
}
@ -4417,12 +4427,12 @@ namespace Azure { namespace Storage { namespace Blobs {
}
if (path.size() == 1 && path[0] == XmlTagName::k_Metadata)
{
ret.Metadata = MetadataFromXml(reader);
ret.Details.Metadata = MetadataFromXml(reader);
path.pop_back();
}
else if (path.size() == 1 && path[0] == XmlTagName::k_OrMetadata)
{
ret.ObjectReplicationSourceProperties
ret.Details.ObjectReplicationSourceProperties
= ObjectReplicationSourcePropertiesFromXml(reader);
path.pop_back();
}
@ -4453,71 +4463,71 @@ namespace Azure { namespace Storage { namespace Blobs {
path.size() == 2 && path[0] == XmlTagName::k_Properties
&& path[1] == XmlTagName::k_ContentType)
{
ret.HttpHeaders.ContentType = node.Value;
ret.Details.HttpHeaders.ContentType = node.Value;
}
else if (
path.size() == 2 && path[0] == XmlTagName::k_Properties
&& path[1] == XmlTagName::k_ContentEncoding)
{
ret.HttpHeaders.ContentEncoding = node.Value;
ret.Details.HttpHeaders.ContentEncoding = node.Value;
}
else if (
path.size() == 2 && path[0] == XmlTagName::k_Properties
&& path[1] == XmlTagName::k_ContentLanguage)
{
ret.HttpHeaders.ContentLanguage = node.Value;
ret.Details.HttpHeaders.ContentLanguage = node.Value;
}
else if (
path.size() == 2 && path[0] == XmlTagName::k_Properties
&& path[1] == XmlTagName::k_ContentMD5)
{
ret.HttpHeaders.ContentHash.Value = Azure::Core::Base64Decode(node.Value);
ret.Details.HttpHeaders.ContentHash.Value = Azure::Core::Base64Decode(node.Value);
}
else if (
path.size() == 2 && path[0] == XmlTagName::k_Properties
&& path[1] == XmlTagName::k_CacheControl)
{
ret.HttpHeaders.CacheControl = node.Value;
ret.Details.HttpHeaders.CacheControl = node.Value;
}
else if (
path.size() == 2 && path[0] == XmlTagName::k_Properties
&& path[1] == XmlTagName::k_ContentDisposition)
{
ret.HttpHeaders.ContentDisposition = node.Value;
ret.Details.HttpHeaders.ContentDisposition = node.Value;
}
else if (
path.size() == 2 && path[0] == XmlTagName::k_Properties
&& path[1] == XmlTagName::k_CreationTime)
{
ret.CreatedOn = Azure::Core::DateTime::Parse(
ret.Details.CreatedOn = Azure::Core::DateTime::Parse(
node.Value, Azure::Core::DateTime::DateFormat::Rfc1123);
}
else if (
path.size() == 2 && path[0] == XmlTagName::k_Properties
&& path[1] == XmlTagName::k_ExpiryTime)
{
ret.ExpiresOn = Azure::Core::DateTime::Parse(
ret.Details.ExpiresOn = Azure::Core::DateTime::Parse(
node.Value, Azure::Core::DateTime::DateFormat::Rfc1123);
}
else if (
path.size() == 2 && path[0] == XmlTagName::k_Properties
&& path[1] == XmlTagName::k_LastAccessTime)
{
ret.LastAccessedOn = Azure::Core::DateTime::Parse(
ret.Details.LastAccessedOn = Azure::Core::DateTime::Parse(
node.Value, Azure::Core::DateTime::DateFormat::Rfc1123);
}
else if (
path.size() == 2 && path[0] == XmlTagName::k_Properties
&& path[1] == XmlTagName::k_LastModified)
{
ret.LastModified = Azure::Core::DateTime::Parse(
ret.Details.LastModified = Azure::Core::DateTime::Parse(
node.Value, Azure::Core::DateTime::DateFormat::Rfc1123);
}
else if (
path.size() == 2 && path[0] == XmlTagName::k_Properties
&& path[1] == XmlTagName::k_Etag)
{
ret.ETag = Azure::Core::ETag(node.Value);
ret.Details.ETag = Azure::Core::ETag(node.Value);
}
else if (
path.size() == 2 && path[0] == XmlTagName::k_Properties
@ -4535,55 +4545,55 @@ namespace Azure { namespace Storage { namespace Blobs {
path.size() == 2 && path[0] == XmlTagName::k_Properties
&& path[1] == XmlTagName::k_AccessTier)
{
ret.Tier = AccessTier(node.Value);
ret.Details.Tier = AccessTier(node.Value);
}
else if (
path.size() == 2 && path[0] == XmlTagName::k_Properties
&& path[1] == XmlTagName::k_AccessTierInferred)
{
ret.IsAccessTierInferred = std::strcmp(node.Value, "true") == 0;
ret.Details.IsAccessTierInferred = std::strcmp(node.Value, "true") == 0;
}
else if (
path.size() == 2 && path[0] == XmlTagName::k_Properties
&& path[1] == XmlTagName::k_LeaseStatus)
{
ret.LeaseStatus = BlobLeaseStatus(node.Value);
ret.Details.LeaseStatus = BlobLeaseStatus(node.Value);
}
else if (
path.size() == 2 && path[0] == XmlTagName::k_Properties
&& path[1] == XmlTagName::k_LeaseState)
{
ret.LeaseState = BlobLeaseState(node.Value);
ret.Details.LeaseState = BlobLeaseState(node.Value);
}
else if (
path.size() == 2 && path[0] == XmlTagName::k_Properties
&& path[1] == XmlTagName::k_LeaseDuration)
{
ret.LeaseDuration = BlobLeaseDurationType(node.Value);
ret.Details.LeaseDuration = BlobLeaseDurationType(node.Value);
}
else if (
path.size() == 2 && path[0] == XmlTagName::k_Properties
&& path[1] == XmlTagName::k_ServerEncrypted)
{
ret.IsServerEncrypted = std::strcmp(node.Value, "true") == 0;
ret.Details.IsServerEncrypted = std::strcmp(node.Value, "true") == 0;
}
else if (
path.size() == 2 && path[0] == XmlTagName::k_Properties
&& path[1] == XmlTagName::k_EncryptionKeySHA256)
{
ret.EncryptionKeySha256 = Azure::Core::Base64Decode(node.Value);
ret.Details.EncryptionKeySha256 = Azure::Core::Base64Decode(node.Value);
}
else if (
path.size() == 2 && path[0] == XmlTagName::k_Properties
&& path[1] == XmlTagName::k_Sealed)
{
ret.IsSealed = std::strcmp(node.Value, "true") == 0;
ret.Details.IsSealed = std::strcmp(node.Value, "true") == 0;
}
else if (
path.size() == 2 && path[0] == XmlTagName::k_Properties
&& path[1] == XmlTagName::k_xmsblobsequencenumber)
{
ret.SequenceNumber = std::stoll(node.Value);
ret.Details.SequenceNumber = std::stoll(node.Value);
}
}
}

View File

@ -246,17 +246,17 @@ namespace Azure { namespace Storage { namespace Blobs {
options.Context, *m_pipeline, m_blobContainerUrl, protocolLayerOptions);
for (auto& i : response->Items)
{
if (i.Tier.HasValue() && !i.IsAccessTierInferred.HasValue())
if (i.Details.Tier.HasValue() && !i.Details.IsAccessTierInferred.HasValue())
{
i.IsAccessTierInferred = false;
i.Details.IsAccessTierInferred = false;
}
if (i.VersionId.HasValue() && !i.IsCurrentVersion.HasValue())
{
i.IsCurrentVersion = false;
}
if (i.BlobType == Models::BlobType::AppendBlob && !i.IsSealed)
if (i.BlobType == Models::BlobType::AppendBlob && !i.Details.IsSealed)
{
i.IsSealed = false;
i.Details.IsSealed = false;
}
}
return response;

View File

@ -291,8 +291,8 @@ namespace Azure { namespace Storage { namespace Test {
{
if (blob.Name == blobName)
{
EXPECT_TRUE(blob.IsSealed.HasValue());
EXPECT_FALSE(blob.IsSealed.GetValue());
EXPECT_TRUE(blob.Details.IsSealed.HasValue());
EXPECT_FALSE(blob.Details.IsSealed.GetValue());
}
}
} while (options.ContinuationToken.HasValue());
@ -324,8 +324,8 @@ namespace Azure { namespace Storage { namespace Test {
{
if (blob.Name == blobName)
{
EXPECT_TRUE(blob.IsSealed.HasValue());
EXPECT_TRUE(blob.IsSealed.GetValue());
EXPECT_TRUE(blob.Details.IsSealed.HasValue());
EXPECT_TRUE(blob.Details.IsSealed.GetValue());
}
}
} while (options.ContinuationToken.HasValue());

View File

@ -184,37 +184,37 @@ namespace Azure { namespace Storage { namespace Test {
for (const auto& blob : res->Items)
{
EXPECT_FALSE(blob.Name.empty());
EXPECT_TRUE(IsValidTime(blob.CreatedOn));
EXPECT_TRUE(IsValidTime(blob.LastModified));
EXPECT_TRUE(blob.ETag.HasValue());
EXPECT_TRUE(IsValidTime(blob.Details.CreatedOn));
EXPECT_TRUE(IsValidTime(blob.Details.LastModified));
EXPECT_TRUE(blob.Details.ETag.HasValue());
EXPECT_FALSE(blob.BlobType.Get().empty());
if (blob.BlobType == Blobs::Models::BlobType::BlockBlob)
{
EXPECT_TRUE(blob.Tier.HasValue());
EXPECT_TRUE(blob.IsAccessTierInferred.HasValue());
EXPECT_TRUE(blob.Details.Tier.HasValue());
EXPECT_TRUE(blob.Details.IsAccessTierInferred.HasValue());
}
if (blob.Tier.HasValue())
if (blob.Details.Tier.HasValue())
{
EXPECT_FALSE(blob.Tier.GetValue().Get().empty());
EXPECT_FALSE(blob.Details.Tier.GetValue().Get().empty());
}
if (blob.BlobType == Blobs::Models::BlobType::AppendBlob)
{
if (blob.IsSealed.HasValue())
if (blob.Details.IsSealed.HasValue())
{
EXPECT_FALSE(blob.IsSealed.GetValue());
EXPECT_FALSE(blob.Details.IsSealed.GetValue());
}
}
else
{
EXPECT_FALSE(blob.IsSealed.HasValue());
EXPECT_FALSE(blob.Details.IsSealed.HasValue());
}
if (blob.BlobType == Blobs::Models::BlobType::PageBlob)
{
EXPECT_TRUE(blob.SequenceNumber.HasValue());
EXPECT_TRUE(blob.Details.SequenceNumber.HasValue());
}
else
{
EXPECT_FALSE(blob.SequenceNumber.HasValue());
EXPECT_FALSE(blob.Details.SequenceNumber.HasValue());
}
listBlobs.insert(blob.Name);
}
@ -363,7 +363,7 @@ namespace Azure { namespace Storage { namespace Test {
{
foundDeleted = true;
}
if (!blob.Metadata.empty())
if (!blob.Details.Metadata.empty())
{
foundMetadata = true;
}

View File

@ -145,14 +145,14 @@ namespace Azure { namespace Storage { namespace Test {
for (const auto& container : res->Items)
{
EXPECT_FALSE(container.Name.empty());
EXPECT_TRUE(container.ETag.HasValue());
EXPECT_TRUE(IsValidTime(container.LastModified));
EXPECT_TRUE(container.Details.ETag.HasValue());
EXPECT_TRUE(IsValidTime(container.Details.LastModified));
EXPECT_FALSE(container.IsDeleted);
EXPECT_FALSE(container.VersionId.HasValue());
EXPECT_FALSE(container.DeletedOn.HasValue());
EXPECT_FALSE(container.RemainingRetentionDays.HasValue());
EXPECT_EQ(container.DefaultEncryptionScope, AccountEncryptionKey);
EXPECT_FALSE(container.PreventEncryptionScopeOverride);
EXPECT_FALSE(container.Details.DeletedOn.HasValue());
EXPECT_FALSE(container.Details.RemainingRetentionDays.HasValue());
EXPECT_EQ(container.Details.DefaultEncryptionScope, AccountEncryptionKey);
EXPECT_FALSE(container.Details.PreventEncryptionScopeOverride);
listContainers.insert(container.Name);
}
} while (options.ContinuationToken.HasValue());
@ -390,10 +390,10 @@ namespace Azure { namespace Storage { namespace Test {
EXPECT_TRUE(deletedContainerItem.IsDeleted);
EXPECT_TRUE(deletedContainerItem.VersionId.HasValue());
EXPECT_FALSE(deletedContainerItem.VersionId.GetValue().empty());
EXPECT_TRUE(deletedContainerItem.DeletedOn.HasValue());
EXPECT_TRUE(IsValidTime(deletedContainerItem.DeletedOn.GetValue()));
EXPECT_TRUE(deletedContainerItem.RemainingRetentionDays.HasValue());
EXPECT_GE(deletedContainerItem.RemainingRetentionDays.GetValue(), 0);
EXPECT_TRUE(deletedContainerItem.Details.DeletedOn.HasValue());
EXPECT_TRUE(IsValidTime(deletedContainerItem.Details.DeletedOn.GetValue()));
EXPECT_TRUE(deletedContainerItem.Details.RemainingRetentionDays.HasValue());
EXPECT_GE(deletedContainerItem.Details.RemainingRetentionDays.GetValue(), 0);
std::string containerName2 = LowercaseRandomString();
for (int i = 0; i < 60; ++i)

View File

@ -158,7 +158,7 @@ namespace Azure { namespace Storage { namespace Test {
{
if (blob.Name == m_blobName)
{
lastAccessedOn = blob.LastAccessedOn.GetValue();
lastAccessedOn = blob.Details.LastAccessedOn.GetValue();
break;
}
}
@ -999,9 +999,9 @@ namespace Azure { namespace Storage { namespace Test {
{
if (blob.Name == blobName)
{
ASSERT_TRUE(blob.Tier.HasValue());
ASSERT_TRUE(blob.IsAccessTierInferred.HasValue());
EXPECT_TRUE(blob.IsAccessTierInferred.GetValue());
ASSERT_TRUE(blob.Details.Tier.HasValue());
ASSERT_TRUE(blob.Details.IsAccessTierInferred.HasValue());
EXPECT_TRUE(blob.Details.IsAccessTierInferred.GetValue());
}
}
} while (options.ContinuationToken.HasValue());
@ -1026,9 +1026,9 @@ namespace Azure { namespace Storage { namespace Test {
{
if (blob.Name == blobName)
{
ASSERT_TRUE(blob.Tier.HasValue());
ASSERT_TRUE(blob.IsAccessTierInferred.HasValue());
EXPECT_FALSE(blob.IsAccessTierInferred.GetValue());
ASSERT_TRUE(blob.Details.Tier.HasValue());
ASSERT_TRUE(blob.Details.IsAccessTierInferred.HasValue());
EXPECT_FALSE(blob.Details.IsAccessTierInferred.GetValue());
}
}
} while (options.ContinuationToken.HasValue());

View File

@ -43,34 +43,34 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
{
Models::FileSystemItem fileSystem;
fileSystem.Name = std::move(item.Name);
fileSystem.ETag = std::move(item.ETag);
fileSystem.LastModified = std::move(item.LastModified);
fileSystem.Metadata = std::move(item.Metadata);
if (item.AccessType == Blobs::Models::PublicAccessType::BlobContainer)
fileSystem.ETag = std::move(item.Details.ETag);
fileSystem.LastModified = std::move(item.Details.LastModified);
fileSystem.Metadata = std::move(item.Details.Metadata);
if (item.Details.AccessType == Blobs::Models::PublicAccessType::BlobContainer)
{
fileSystem.AccessType = Models::PublicAccessType::FileSystem;
}
else if (item.AccessType == Blobs::Models::PublicAccessType::Blob)
else if (item.Details.AccessType == Blobs::Models::PublicAccessType::Blob)
{
fileSystem.AccessType = Models::PublicAccessType::Path;
}
else if (item.AccessType == Blobs::Models::PublicAccessType::None)
else if (item.Details.AccessType == Blobs::Models::PublicAccessType::None)
{
fileSystem.AccessType = Models::PublicAccessType::None;
}
else
{
fileSystem.AccessType = Models::PublicAccessType(item.AccessType.Get());
fileSystem.AccessType = Models::PublicAccessType(item.Details.AccessType.Get());
}
fileSystem.HasImmutabilityPolicy = item.HasImmutabilityPolicy;
fileSystem.HasLegalHold = item.HasLegalHold;
if (item.LeaseDuration.HasValue())
fileSystem.HasImmutabilityPolicy = item.Details.HasImmutabilityPolicy;
fileSystem.HasLegalHold = item.Details.HasLegalHold;
if (item.Details.LeaseDuration.HasValue())
{
fileSystem.LeaseDuration
= Models::LeaseDurationType((item.LeaseDuration.GetValue().Get()));
= Models::LeaseDurationType((item.Details.LeaseDuration.GetValue().Get()));
}
fileSystem.LeaseState = Models::LeaseStateType(item.LeaseState.Get());
fileSystem.LeaseStatus = Models::LeaseStatusType(item.LeaseStatus.Get());
fileSystem.LeaseState = Models::LeaseStateType(item.Details.LeaseState.Get());
fileSystem.LeaseStatus = Models::LeaseStatusType(item.Details.LeaseStatus.Get());
fileSystems.emplace_back(std::move(fileSystem));
}