diff --git a/sdk/storage/azure-storage-blobs/CHANGELOG.md b/sdk/storage/azure-storage-blobs/CHANGELOG.md index 0276bbc62..af1282551 100644 --- a/sdk/storage/azure-storage-blobs/CHANGELOG.md +++ b/sdk/storage/azure-storage-blobs/CHANGELOG.md @@ -12,6 +12,13 @@ - Changed the return type of `StartCopyFromUri` and `StartCopyIncremental` API from a `Response` to the particular `Operation` type called `StartCopyBlobOperation` directly. - String conversion functions of extensible enums were renamed from `Get()` to `ToString()`. - Moved `SecondaryHostForRetryReads` out of retry options, now it's under `BlobClientOptions`. +- Changed return type of `BlobServiceClient::GetUserDelegationKey` to `UserDelegationKey`. +- Changed return type of `BlobServiceClient::GetProperties` to `BlobServiceProperties`. +- Changed return type of `BlobServiceClient::GetAccountInfo` to `AccountInfo`. +- Changed return type of `BlobServiceClient::GetStatistics` to `ServiceStatistics`. +- Changed return type of `BlobContainerClient::GetProperties` to `BlobContainerProperties`. +- Changed return type of `BlobContainerClient::GetAccessPolicy` to `BlobContainerAccessPolicy`. +- Changed return type of `BlobClient::GetProperties` to `BlobProperties`. ### Other Changes and Improvements diff --git a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_client.hpp b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_client.hpp index a68786a64..6e79f86ba 100644 --- a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_client.hpp +++ b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_client.hpp @@ -148,9 +148,9 @@ namespace Azure { namespace Storage { namespace Blobs { * * @param options Optional parameters to execute this function. * @param context Context for cancelling long running operations. - * @return A GetBlobPropertiesResult describing the blob's properties. + * @return A BlobProperties describing the blob's properties. */ - Azure::Response GetProperties( + Azure::Response GetProperties( const GetBlobPropertiesOptions& options = GetBlobPropertiesOptions(), const Azure::Core::Context& context = Azure::Core::Context()) const; @@ -337,7 +337,7 @@ namespace Azure { namespace Storage { namespace Blobs { * * @param options Optional parameters to execute this function. * @param context Context for cancelling long running operations. - * @return Tags on successfully getting tags. + * @return GetBlobTagsResult on successfully getting tags. */ Azure::Response GetTags( const GetBlobTagsOptions& options = GetBlobTagsOptions(), diff --git a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_container_client.hpp b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_container_client.hpp index c27d22c5b..b318a4601 100644 --- a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_container_client.hpp +++ b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_container_client.hpp @@ -180,9 +180,9 @@ namespace Azure { namespace Storage { namespace Blobs { * * @param options Optional parameters to execute this function. * @param context Context for cancelling long running operations. - * @return A GetBlobContainerPropertiesResult describing the container and its properties. + * @return A BlobContainerProperties describing the container and its properties. */ - Azure::Response GetProperties( + Azure::Response GetProperties( const GetBlobContainerPropertiesOptions& options = GetBlobContainerPropertiesOptions(), const Azure::Core::Context& context = Azure::Core::Context()) const; @@ -239,9 +239,9 @@ namespace Azure { namespace Storage { namespace Blobs { * * @param options Optional parameters to execute this function. * @param context Context for cancelling long running operations. - * @return A GetBlobContainerAccessPolicyResult describing the container's access policy. + * @return A BlobContainerAccessPolicy describing the container's access policy. */ - Azure::Response GetAccessPolicy( + Azure::Response GetAccessPolicy( const GetBlobContainerAccessPolicyOptions& options = GetBlobContainerAccessPolicyOptions(), const Azure::Core::Context& context = Azure::Core::Context()) const; diff --git a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_responses.hpp b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_responses.hpp index 576005ad9..fe686976c 100644 --- a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_responses.hpp +++ b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_responses.hpp @@ -70,7 +70,7 @@ namespace Azure { namespace Storage { namespace Blobs { } // namespace Models - class StartCopyBlobOperation : public Azure::Core::Operation { + class StartCopyBlobOperation : public Azure::Core::Operation { public: std::string RequestId; Azure::ETag ETag; @@ -80,7 +80,7 @@ namespace Azure { namespace Storage { namespace Blobs { Azure::Nullable VersionId; public: - Models::GetBlobPropertiesResult Value() const override { return m_pollResult; } + Models::BlobProperties Value() const override { return m_pollResult; } StartCopyBlobOperation() = default; @@ -100,7 +100,7 @@ namespace Azure { namespace Storage { namespace Blobs { std::unique_ptr PollInternal( Azure::Core::Context& context) override; - Azure::Response PollUntilDoneInternal( + Azure::Response PollUntilDoneInternal( std::chrono::milliseconds period, Azure::Core::Context& context) override; @@ -115,7 +115,7 @@ namespace Azure { namespace Storage { namespace Blobs { } std::shared_ptr m_blobClient; - Models::GetBlobPropertiesResult m_pollResult; + Models::BlobProperties m_pollResult; friend class Blobs::BlobClient; friend class Blobs::PageBlobClient; diff --git a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_service_client.hpp b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_service_client.hpp index e8d77e010..74d1d84dd 100644 --- a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_service_client.hpp +++ b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_service_client.hpp @@ -109,9 +109,9 @@ namespace Azure { namespace Storage { namespace Blobs { * will be truncated to second. * @param options Optional parameters to execute this function. * @param context Context for cancelling long running operations. - * @return A deserialized GetUserDelegationKeyResult instance. + * @return A deserialized UserDelegationKey instance. */ - Azure::Response GetUserDelegationKey( + Azure::Response GetUserDelegationKey( const Azure::DateTime& expiresOn, const GetUserDelegationKeyOptions& options = GetUserDelegationKeyOptions(), const Azure::Core::Context& context = Azure::Core::Context()) const; @@ -139,9 +139,9 @@ namespace Azure { namespace Storage { namespace Blobs { * * @param options Optional parameters to execute this function. * @param context Context for cancelling long running operations. - * @return A GetServicePropertiesResult describing the service properties. + * @return A BlobServiceProperties describing the service properties. */ - Azure::Response GetProperties( + Azure::Response GetProperties( const GetServicePropertiesOptions& options = GetServicePropertiesOptions(), const Azure::Core::Context& context = Azure::Core::Context()) const; @@ -150,9 +150,9 @@ namespace Azure { namespace Storage { namespace Blobs { * * @param options Optional parameters to execute this function. * @param context Context for cancelling long running operations. - * @return GetAccountInfoResult describing the account. + * @return AccountInfo describing the account. */ - Azure::Response GetAccountInfo( + Azure::Response GetAccountInfo( const GetAccountInfoOptions& options = GetAccountInfoOptions(), const Azure::Core::Context& context = Azure::Core::Context()) const; @@ -163,9 +163,9 @@ namespace Azure { namespace Storage { namespace Blobs { * * @param options Optional parameters to execute this function. * @param context Context for cancelling long running operations. - * @return A BlobServiceStatistics describing the service replication statistics. + * @return A ServiceStatistics describing the service replication statistics. */ - Azure::Response GetStatistics( + Azure::Response GetStatistics( const GetBlobServiceStatisticsOptions& options = GetBlobServiceStatisticsOptions(), const Azure::Core::Context& context = Azure::Core::Context()) const; diff --git a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/protocol/blob_rest_client.hpp b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/protocol/blob_rest_client.hpp index d9774097b..82d503fec 100644 --- a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/protocol/blob_rest_client.hpp +++ b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/protocol/blob_rest_client.hpp @@ -731,6 +731,13 @@ namespace Azure { namespace Storage { namespace Blobs { std::string Value; }; // struct UserDelegationKey + struct AccountInfo + { + Models::SkuName SkuName; + Models::AccountKind AccountKind; + bool IsHierarchicalNamespaceEnabled = false; + }; // struct AccountInfo + struct BlobAnalyticsLogging { std::string Version; @@ -740,6 +747,12 @@ namespace Azure { namespace Storage { namespace Blobs { BlobRetentionPolicy RetentionPolicy; }; // struct BlobAnalyticsLogging + struct BlobContainerAccessPolicy + { + PublicAccessType AccessType = PublicAccessType::None; + std::vector SignedIdentifiers; + }; // struct BlobContainerAccessPolicy + struct BlobContainerItemDetails { Azure::ETag ETag; @@ -757,6 +770,21 @@ namespace Azure { namespace Storage { namespace Blobs { Azure::Nullable DeletedOn; }; // struct BlobContainerItemDetails + struct BlobContainerProperties + { + Azure::ETag ETag; + Azure::DateTime LastModified; + Storage::Metadata Metadata; + PublicAccessType AccessType = PublicAccessType::None; + bool HasImmutabilityPolicy = false; + bool HasLegalHold = false; + Azure::Nullable LeaseDuration; + BlobLeaseState LeaseState = BlobLeaseState::Available; + BlobLeaseStatus LeaseStatus = BlobLeaseStatus::Unlocked; + std::string DefaultEncryptionScope; + bool PreventEncryptionScopeOverride = false; + }; // struct BlobContainerProperties + struct BlobGeoReplication { BlobGeoReplicationStatus Status; @@ -779,39 +807,6 @@ namespace Azure { namespace Storage { namespace Blobs { std::vector Items; }; // struct FindBlobsByTagsSinglePageResult - struct GetAccountInfoResult - { - std::string RequestId; - Models::SkuName SkuName; - Models::AccountKind AccountKind; - bool IsHierarchicalNamespaceEnabled = false; - }; // struct GetAccountInfoResult - - struct GetBlobContainerAccessPolicyResult - { - std::string RequestId; - PublicAccessType AccessType = PublicAccessType::None; - Azure::ETag ETag; - Azure::DateTime LastModified; - std::vector SignedIdentifiers; - }; // struct GetBlobContainerAccessPolicyResult - - struct GetBlobContainerPropertiesResult - { - std::string RequestId; - Azure::ETag ETag; - Azure::DateTime LastModified; - Storage::Metadata Metadata; - PublicAccessType AccessType = PublicAccessType::None; - bool HasImmutabilityPolicy = false; - bool HasLegalHold = false; - Azure::Nullable LeaseDuration; - BlobLeaseState LeaseState = BlobLeaseState::Available; - BlobLeaseStatus LeaseStatus = BlobLeaseStatus::Unlocked; - std::string DefaultEncryptionScope; - bool PreventEncryptionScopeOverride = false; - }; // struct GetBlobContainerPropertiesResult - struct GetBlockListResult { std::string RequestId; @@ -823,12 +818,6 @@ namespace Azure { namespace Storage { namespace Blobs { std::vector UncommittedBlocks; }; // struct GetBlockListResult - struct GetUserDelegationKeyResult - { - std::string RequestId; - UserDelegationKey Key; - }; // struct GetUserDelegationKeyResult - struct ObjectReplicationRule { std::string RuleId; @@ -926,30 +915,17 @@ namespace Azure { namespace Storage { namespace Blobs { Azure::Nullable TransactionalContentHash; }; // struct CommitBlockListResult - struct GetServicePropertiesResult - { - std::string RequestId; - BlobAnalyticsLogging Logging; - BlobMetrics HourMetrics; - BlobMetrics MinuteMetrics; - std::vector Cors; - Azure::Nullable DefaultServiceVersion; - BlobRetentionPolicy DeleteRetentionPolicy; - BlobStaticWebsite StaticWebsite; - }; // struct GetServicePropertiesResult - - struct GetServiceStatisticsResult - { - std::string RequestId; - BlobGeoReplication GeoReplication; - }; // struct GetServiceStatisticsResult - struct ObjectReplicationPolicy { std::string PolicyId; std::vector Rules; }; // struct ObjectReplicationPolicy + struct ServiceStatistics + { + BlobGeoReplication GeoReplication; + }; // struct ServiceStatistics + struct StageBlockFromUriResult { std::string RequestId; @@ -1027,42 +1003,8 @@ namespace Azure { namespace Storage { namespace Blobs { ObjectReplicationSourceProperties; // only valid for replication source blob }; // struct BlobItemDetails - struct DownloadBlobDetails + struct BlobProperties { - Azure::ETag ETag; - Azure::DateTime LastModified; - Azure::DateTime CreatedOn; - Azure::Nullable ExpiresOn; - Azure::Nullable LastAccessedOn; - BlobHttpHeaders HttpHeaders; - Storage::Metadata Metadata; - Azure::Nullable SequenceNumber; // only for page blob - Azure::Nullable CommittedBlockCount; // only for append blob - Azure::Nullable IsSealed; // only for append blob - Azure::Nullable LeaseDuration; - Azure::Nullable LeaseState; - Azure::Nullable LeaseStatus; - bool IsServerEncrypted = false; - Azure::Nullable> EncryptionKeySha256; - Azure::Nullable EncryptionScope; - Azure::Nullable - ObjectReplicationDestinationPolicyId; // only valid for replication destination blob - std::vector - ObjectReplicationSourceProperties; // only valid for replication source blob - Azure::Nullable TagCount; - Azure::Nullable CopyId; - Azure::Nullable CopySource; - Azure::Nullable CopyStatus; - Azure::Nullable CopyStatusDescription; - Azure::Nullable CopyProgress; - Azure::Nullable CopyCompletedOn; - Azure::Nullable VersionId; - Azure::Nullable IsCurrentVersion; - }; // struct DownloadBlobDetails - - struct GetBlobPropertiesResult - { - std::string RequestId; Azure::ETag ETag; Azure::DateTime LastModified; Azure::DateTime CreatedOn; @@ -1101,7 +1043,40 @@ namespace Azure { namespace Storage { namespace Blobs { Azure::Nullable TagCount; Azure::Nullable VersionId; Azure::Nullable IsCurrentVersion; - }; // struct GetBlobPropertiesResult + }; // struct BlobProperties + + struct DownloadBlobDetails + { + Azure::ETag ETag; + Azure::DateTime LastModified; + Azure::DateTime CreatedOn; + Azure::Nullable ExpiresOn; + Azure::Nullable LastAccessedOn; + BlobHttpHeaders HttpHeaders; + Storage::Metadata Metadata; + Azure::Nullable SequenceNumber; // only for page blob + Azure::Nullable CommittedBlockCount; // only for append blob + Azure::Nullable IsSealed; // only for append blob + Azure::Nullable LeaseDuration; + Azure::Nullable LeaseState; + Azure::Nullable LeaseStatus; + bool IsServerEncrypted = false; + Azure::Nullable> EncryptionKeySha256; + Azure::Nullable EncryptionScope; + Azure::Nullable + ObjectReplicationDestinationPolicyId; // only valid for replication destination blob + std::vector + ObjectReplicationSourceProperties; // only valid for replication source blob + Azure::Nullable TagCount; + Azure::Nullable CopyId; + Azure::Nullable CopySource; + Azure::Nullable CopyStatus; + Azure::Nullable CopyStatusDescription; + Azure::Nullable CopyProgress; + Azure::Nullable CopyCompletedOn; + Azure::Nullable VersionId; + Azure::Nullable IsCurrentVersion; + }; // struct DownloadBlobDetails struct ListBlobContainersSinglePageResult { @@ -1236,10 +1211,10 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct ListBlobContainersSinglePageOptions static Azure::Response ListBlobContainersSinglePage( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const ListBlobContainersSinglePageOptions& options) + const ListBlobContainersSinglePageOptions& options, + const Azure::Core::Context& context) { (void)options; auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Get, url); @@ -1302,11 +1277,11 @@ namespace Azure { namespace Storage { namespace Blobs { Azure::DateTime ExpiresOn; }; // struct GetUserDelegationKeyOptions - static Azure::Response GetUserDelegationKey( - const Azure::Core::Context& context, + static Azure::Response GetUserDelegationKey( Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const GetUserDelegationKeyOptions& options) + const GetUserDelegationKeyOptions& options, + const Azure::Core::Context& context) { (void)options; std::string xml_body; @@ -1331,7 +1306,7 @@ namespace Azure { namespace Storage { namespace Blobs { } auto pHttpResponse = pipeline.Send(request, context); Azure::Core::Http::RawResponse& httpResponse = *pHttpResponse; - GetUserDelegationKeyResult response; + UserDelegationKey response; auto http_status_code = static_cast::type>( httpResponse.GetStatusCode()); @@ -1343,11 +1318,9 @@ namespace Azure { namespace Storage { namespace Blobs { const auto& httpResponseBody = httpResponse.GetBody(); Storage::_detail::XmlReader reader( reinterpret_cast(httpResponseBody.data()), httpResponseBody.size()); - response = GetUserDelegationKeyResultFromXml(reader); + response = UserDelegationKeyFromXml(reader); } - response.RequestId = httpResponse.GetHeaders().at("x-ms-request-id"); - return Azure::Response( - std::move(response), std::move(pHttpResponse)); + return Azure::Response(std::move(response), std::move(pHttpResponse)); } struct GetServicePropertiesOptions @@ -1355,11 +1328,11 @@ namespace Azure { namespace Storage { namespace Blobs { Azure::Nullable Timeout; }; // struct GetServicePropertiesOptions - static Azure::Response GetProperties( - const Azure::Core::Context& context, + static Azure::Response GetProperties( Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const GetServicePropertiesOptions& options) + const GetServicePropertiesOptions& options, + const Azure::Core::Context& context) { (void)options; auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Get, url); @@ -1373,7 +1346,7 @@ namespace Azure { namespace Storage { namespace Blobs { } auto pHttpResponse = pipeline.Send(request, context); Azure::Core::Http::RawResponse& httpResponse = *pHttpResponse; - GetServicePropertiesResult response; + BlobServiceProperties response; auto http_status_code = static_cast::type>( httpResponse.GetStatusCode()); @@ -1385,10 +1358,9 @@ namespace Azure { namespace Storage { namespace Blobs { const auto& httpResponseBody = httpResponse.GetBody(); Storage::_detail::XmlReader reader( reinterpret_cast(httpResponseBody.data()), httpResponseBody.size()); - response = GetServicePropertiesResultFromXml(reader); + response = BlobServicePropertiesFromXml(reader); } - response.RequestId = httpResponse.GetHeaders().at("x-ms-request-id"); - return Azure::Response( + return Azure::Response( std::move(response), std::move(pHttpResponse)); } @@ -1399,10 +1371,10 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct SetServicePropertiesOptions static Azure::Response SetProperties( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const SetServicePropertiesOptions& options) + const SetServicePropertiesOptions& options, + const Azure::Core::Context& context) { (void)options; std::string xml_body; @@ -1445,11 +1417,11 @@ namespace Azure { namespace Storage { namespace Blobs { Azure::Nullable Timeout; }; // struct GetAccountInfoOptions - static Azure::Response GetAccountInfo( - const Azure::Core::Context& context, + static Azure::Response GetAccountInfo( Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const GetAccountInfoOptions& options) + const GetAccountInfoOptions& options, + const Azure::Core::Context& context) { (void)options; auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Head, url); @@ -1463,7 +1435,7 @@ namespace Azure { namespace Storage { namespace Blobs { } auto pHttpResponse = pipeline.Send(request, context); Azure::Core::Http::RawResponse& httpResponse = *pHttpResponse; - GetAccountInfoResult response; + AccountInfo response; auto http_status_code = static_cast::type>( httpResponse.GetStatusCode()); @@ -1471,13 +1443,11 @@ namespace Azure { namespace Storage { namespace Blobs { { throw StorageException::CreateFromResponse(std::move(pHttpResponse)); } - response.RequestId = httpResponse.GetHeaders().at("x-ms-request-id"); response.SkuName = SkuName(httpResponse.GetHeaders().at("x-ms-sku-name")); response.AccountKind = AccountKind(httpResponse.GetHeaders().at("x-ms-account-kind")); response.IsHierarchicalNamespaceEnabled = httpResponse.GetHeaders().at("x-ms-is-hns-enabled") == "true"; - return Azure::Response( - std::move(response), std::move(pHttpResponse)); + return Azure::Response(std::move(response), std::move(pHttpResponse)); } struct GetServiceStatisticsOptions @@ -1485,11 +1455,11 @@ namespace Azure { namespace Storage { namespace Blobs { Azure::Nullable Timeout; }; // struct GetServiceStatisticsOptions - static Azure::Response GetStatistics( - const Azure::Core::Context& context, + static Azure::Response GetStatistics( Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const GetServiceStatisticsOptions& options) + const GetServiceStatisticsOptions& options, + const Azure::Core::Context& context) { (void)options; auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Get, url); @@ -1503,7 +1473,7 @@ namespace Azure { namespace Storage { namespace Blobs { } auto pHttpResponse = pipeline.Send(request, context); Azure::Core::Http::RawResponse& httpResponse = *pHttpResponse; - GetServiceStatisticsResult response; + ServiceStatistics response; auto http_status_code = static_cast::type>( httpResponse.GetStatusCode()); @@ -1515,11 +1485,9 @@ namespace Azure { namespace Storage { namespace Blobs { const auto& httpResponseBody = httpResponse.GetBody(); Storage::_detail::XmlReader reader( reinterpret_cast(httpResponseBody.data()), httpResponseBody.size()); - response = GetServiceStatisticsResultFromXml(reader); + response = ServiceStatisticsFromXml(reader); } - response.RequestId = httpResponse.GetHeaders().at("x-ms-request-id"); - return Azure::Response( - std::move(response), std::move(pHttpResponse)); + return Azure::Response(std::move(response), std::move(pHttpResponse)); } struct FindBlobsByTagsSinglePageOptions @@ -1531,10 +1499,10 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct FindBlobsByTagsSinglePageOptions static Azure::Response FindBlobsByTagsSinglePage( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const FindBlobsByTagsSinglePageOptions& options) + const FindBlobsByTagsSinglePageOptions& options, + const Azure::Core::Context& context) { (void)options; auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Get, url); @@ -1580,90 +1548,10 @@ namespace Azure { namespace Storage { namespace Blobs { } private: - static FindBlobsByTagsSinglePageResult FindBlobsByTagsSinglePageResultFromXml( + static BlobServiceProperties BlobServicePropertiesFromXml( Storage::_detail::XmlReader& reader) { - FindBlobsByTagsSinglePageResult ret; - enum class XmlTagName - { - k_EnumerationResults, - k_NextMarker, - k_Blobs, - k_Blob, - k_Unknown, - }; - std::vector path; - while (true) - { - auto node = reader.Read(); - if (node.Type == Storage::_detail::XmlNodeType::End) - { - break; - } - else if (node.Type == Storage::_detail::XmlNodeType::EndTag) - { - if (path.size() > 0) - { - path.pop_back(); - } - else - { - break; - } - } - else if (node.Type == Storage::_detail::XmlNodeType::StartTag) - { - if (std::strcmp(node.Name, "EnumerationResults") == 0) - { - path.emplace_back(XmlTagName::k_EnumerationResults); - } - else if (std::strcmp(node.Name, "NextMarker") == 0) - { - path.emplace_back(XmlTagName::k_NextMarker); - } - else if (std::strcmp(node.Name, "Blobs") == 0) - { - path.emplace_back(XmlTagName::k_Blobs); - } - else if (std::strcmp(node.Name, "Blob") == 0) - { - path.emplace_back(XmlTagName::k_Blob); - } - else - { - path.emplace_back(XmlTagName::k_Unknown); - } - if (path.size() == 3 && path[0] == XmlTagName::k_EnumerationResults - && path[1] == XmlTagName::k_Blobs && path[2] == XmlTagName::k_Blob) - { - ret.Items.emplace_back(FilterBlobItemFromXml(reader)); - path.pop_back(); - } - } - else if (node.Type == Storage::_detail::XmlNodeType::Text) - { - if (path.size() == 2 && path[0] == XmlTagName::k_EnumerationResults - && path[1] == XmlTagName::k_NextMarker) - { - ret.ContinuationToken = node.Value; - } - } - else if (node.Type == Storage::_detail::XmlNodeType::Attribute) - { - if (path.size() == 1 && path[0] == XmlTagName::k_EnumerationResults - && std::strcmp(node.Name, "ServiceEndpoint") == 0) - { - ret.ServiceEndpoint = node.Value; - } - } - } - return ret; - } - - static GetServicePropertiesResult GetServicePropertiesResultFromXml( - Storage::_detail::XmlReader& reader) - { - GetServicePropertiesResult ret; + BlobServiceProperties ret; enum class XmlTagName { k_StorageServiceProperties, @@ -1792,14 +1680,16 @@ namespace Azure { namespace Storage { namespace Blobs { return ret; } - static GetServiceStatisticsResult GetServiceStatisticsResultFromXml( + static FindBlobsByTagsSinglePageResult FindBlobsByTagsSinglePageResultFromXml( Storage::_detail::XmlReader& reader) { - GetServiceStatisticsResult ret; + FindBlobsByTagsSinglePageResult ret; enum class XmlTagName { - k_StorageServiceStats, - k_GeoReplication, + k_EnumerationResults, + k_NextMarker, + k_Blobs, + k_Blob, k_Unknown, }; std::vector path; @@ -1823,78 +1713,48 @@ namespace Azure { namespace Storage { namespace Blobs { } else if (node.Type == Storage::_detail::XmlNodeType::StartTag) { - if (std::strcmp(node.Name, "StorageServiceStats") == 0) + if (std::strcmp(node.Name, "EnumerationResults") == 0) { - path.emplace_back(XmlTagName::k_StorageServiceStats); + path.emplace_back(XmlTagName::k_EnumerationResults); } - else if (std::strcmp(node.Name, "GeoReplication") == 0) + else if (std::strcmp(node.Name, "NextMarker") == 0) { - path.emplace_back(XmlTagName::k_GeoReplication); + path.emplace_back(XmlTagName::k_NextMarker); + } + else if (std::strcmp(node.Name, "Blobs") == 0) + { + path.emplace_back(XmlTagName::k_Blobs); + } + else if (std::strcmp(node.Name, "Blob") == 0) + { + path.emplace_back(XmlTagName::k_Blob); } else { path.emplace_back(XmlTagName::k_Unknown); } - if (path.size() == 2 && path[0] == XmlTagName::k_StorageServiceStats - && path[1] == XmlTagName::k_GeoReplication) + if (path.size() == 3 && path[0] == XmlTagName::k_EnumerationResults + && path[1] == XmlTagName::k_Blobs && path[2] == XmlTagName::k_Blob) { - ret.GeoReplication = BlobGeoReplicationFromXml(reader); + ret.Items.emplace_back(FilterBlobItemFromXml(reader)); path.pop_back(); } } else if (node.Type == Storage::_detail::XmlNodeType::Text) { - } - } - return ret; - } - - static GetUserDelegationKeyResult GetUserDelegationKeyResultFromXml( - Storage::_detail::XmlReader& reader) - { - GetUserDelegationKeyResult ret; - enum class XmlTagName - { - k_UserDelegationKey, - k_Unknown, - }; - std::vector path; - while (true) - { - auto node = reader.Read(); - if (node.Type == Storage::_detail::XmlNodeType::End) - { - break; - } - else if (node.Type == Storage::_detail::XmlNodeType::EndTag) - { - if (path.size() > 0) + if (path.size() == 2 && path[0] == XmlTagName::k_EnumerationResults + && path[1] == XmlTagName::k_NextMarker) { - path.pop_back(); - } - else - { - break; + ret.ContinuationToken = node.Value; } } - else if (node.Type == Storage::_detail::XmlNodeType::StartTag) + else if (node.Type == Storage::_detail::XmlNodeType::Attribute) { - if (std::strcmp(node.Name, "UserDelegationKey") == 0) + if (path.size() == 1 && path[0] == XmlTagName::k_EnumerationResults + && std::strcmp(node.Name, "ServiceEndpoint") == 0) { - path.emplace_back(XmlTagName::k_UserDelegationKey); + ret.ServiceEndpoint = node.Value; } - else - { - path.emplace_back(XmlTagName::k_Unknown); - } - if (path.size() == 1 && path[0] == XmlTagName::k_UserDelegationKey) - { - ret.Key = UserDelegationKeyFromXml(reader); - path.pop_back(); - } - } - else if (node.Type == Storage::_detail::XmlNodeType::Text) - { } } return ret; @@ -1991,6 +1851,185 @@ namespace Azure { namespace Storage { namespace Blobs { return ret; } + static ServiceStatistics ServiceStatisticsFromXml(Storage::_detail::XmlReader& reader) + { + ServiceStatistics ret; + enum class XmlTagName + { + k_StorageServiceStats, + k_GeoReplication, + k_Unknown, + }; + std::vector path; + while (true) + { + auto node = reader.Read(); + if (node.Type == Storage::_detail::XmlNodeType::End) + { + break; + } + else if (node.Type == Storage::_detail::XmlNodeType::EndTag) + { + if (path.size() > 0) + { + path.pop_back(); + } + else + { + break; + } + } + else if (node.Type == Storage::_detail::XmlNodeType::StartTag) + { + if (std::strcmp(node.Name, "StorageServiceStats") == 0) + { + path.emplace_back(XmlTagName::k_StorageServiceStats); + } + else if (std::strcmp(node.Name, "GeoReplication") == 0) + { + path.emplace_back(XmlTagName::k_GeoReplication); + } + else + { + path.emplace_back(XmlTagName::k_Unknown); + } + if (path.size() == 2 && path[0] == XmlTagName::k_StorageServiceStats + && path[1] == XmlTagName::k_GeoReplication) + { + ret.GeoReplication = BlobGeoReplicationFromXml(reader); + path.pop_back(); + } + } + else if (node.Type == Storage::_detail::XmlNodeType::Text) + { + } + } + return ret; + } + + static UserDelegationKey UserDelegationKeyFromXml(Storage::_detail::XmlReader& reader) + { + UserDelegationKey ret; + enum class XmlTagName + { + k_UserDelegationKey, + k_SignedOid, + k_SignedTid, + k_SignedStart, + k_SignedExpiry, + k_SignedService, + k_SignedVersion, + k_Value, + k_Unknown, + }; + std::vector path; + while (true) + { + auto node = reader.Read(); + if (node.Type == Storage::_detail::XmlNodeType::End) + { + break; + } + else if (node.Type == Storage::_detail::XmlNodeType::EndTag) + { + if (path.size() > 0) + { + path.pop_back(); + } + else + { + break; + } + } + else if (node.Type == Storage::_detail::XmlNodeType::StartTag) + { + if (std::strcmp(node.Name, "UserDelegationKey") == 0) + { + path.emplace_back(XmlTagName::k_UserDelegationKey); + } + else if (std::strcmp(node.Name, "SignedOid") == 0) + { + path.emplace_back(XmlTagName::k_SignedOid); + } + else if (std::strcmp(node.Name, "SignedTid") == 0) + { + path.emplace_back(XmlTagName::k_SignedTid); + } + else if (std::strcmp(node.Name, "SignedStart") == 0) + { + path.emplace_back(XmlTagName::k_SignedStart); + } + else if (std::strcmp(node.Name, "SignedExpiry") == 0) + { + path.emplace_back(XmlTagName::k_SignedExpiry); + } + else if (std::strcmp(node.Name, "SignedService") == 0) + { + path.emplace_back(XmlTagName::k_SignedService); + } + else if (std::strcmp(node.Name, "SignedVersion") == 0) + { + path.emplace_back(XmlTagName::k_SignedVersion); + } + else if (std::strcmp(node.Name, "Value") == 0) + { + path.emplace_back(XmlTagName::k_Value); + } + else + { + path.emplace_back(XmlTagName::k_Unknown); + } + } + else if (node.Type == Storage::_detail::XmlNodeType::Text) + { + if (path.size() == 2 && path[0] == XmlTagName::k_UserDelegationKey + && path[1] == XmlTagName::k_SignedOid) + { + ret.SignedObjectId = node.Value; + } + else if ( + path.size() == 2 && path[0] == XmlTagName::k_UserDelegationKey + && path[1] == XmlTagName::k_SignedTid) + { + ret.SignedTenantId = node.Value; + } + else if ( + path.size() == 2 && path[0] == XmlTagName::k_UserDelegationKey + && path[1] == XmlTagName::k_SignedStart) + { + ret.SignedStartsOn + = Azure::DateTime::Parse(node.Value, Azure::DateTime::DateFormat::Rfc3339); + } + else if ( + path.size() == 2 && path[0] == XmlTagName::k_UserDelegationKey + && path[1] == XmlTagName::k_SignedExpiry) + { + ret.SignedExpiresOn + = Azure::DateTime::Parse(node.Value, Azure::DateTime::DateFormat::Rfc3339); + } + else if ( + path.size() == 2 && path[0] == XmlTagName::k_UserDelegationKey + && path[1] == XmlTagName::k_SignedService) + { + ret.SignedService = node.Value; + } + else if ( + path.size() == 2 && path[0] == XmlTagName::k_UserDelegationKey + && path[1] == XmlTagName::k_SignedVersion) + { + ret.SignedVersion = node.Value; + } + else if ( + path.size() == 2 && path[0] == XmlTagName::k_UserDelegationKey + && path[1] == XmlTagName::k_Value) + { + ret.Value = node.Value; + } + } + } + return ret; + } + static BlobAnalyticsLogging BlobAnalyticsLoggingFromXml(Storage::_detail::XmlReader& reader) { BlobAnalyticsLogging ret; @@ -2706,111 +2745,6 @@ namespace Azure { namespace Storage { namespace Blobs { return ret; } - static UserDelegationKey UserDelegationKeyFromXml(Storage::_detail::XmlReader& reader) - { - UserDelegationKey ret; - enum class XmlTagName - { - k_SignedOid, - k_SignedTid, - k_SignedStart, - k_SignedExpiry, - k_SignedService, - k_SignedVersion, - k_Value, - k_Unknown, - }; - std::vector path; - while (true) - { - auto node = reader.Read(); - if (node.Type == Storage::_detail::XmlNodeType::End) - { - break; - } - else if (node.Type == Storage::_detail::XmlNodeType::EndTag) - { - if (path.size() > 0) - { - path.pop_back(); - } - else - { - break; - } - } - else if (node.Type == Storage::_detail::XmlNodeType::StartTag) - { - if (std::strcmp(node.Name, "SignedOid") == 0) - { - path.emplace_back(XmlTagName::k_SignedOid); - } - else if (std::strcmp(node.Name, "SignedTid") == 0) - { - path.emplace_back(XmlTagName::k_SignedTid); - } - else if (std::strcmp(node.Name, "SignedStart") == 0) - { - path.emplace_back(XmlTagName::k_SignedStart); - } - else if (std::strcmp(node.Name, "SignedExpiry") == 0) - { - path.emplace_back(XmlTagName::k_SignedExpiry); - } - else if (std::strcmp(node.Name, "SignedService") == 0) - { - path.emplace_back(XmlTagName::k_SignedService); - } - else if (std::strcmp(node.Name, "SignedVersion") == 0) - { - path.emplace_back(XmlTagName::k_SignedVersion); - } - else if (std::strcmp(node.Name, "Value") == 0) - { - path.emplace_back(XmlTagName::k_Value); - } - else - { - path.emplace_back(XmlTagName::k_Unknown); - } - } - else if (node.Type == Storage::_detail::XmlNodeType::Text) - { - if (path.size() == 1 && path[0] == XmlTagName::k_SignedOid) - { - ret.SignedObjectId = node.Value; - } - else if (path.size() == 1 && path[0] == XmlTagName::k_SignedTid) - { - ret.SignedTenantId = node.Value; - } - else if (path.size() == 1 && path[0] == XmlTagName::k_SignedStart) - { - ret.SignedStartsOn - = Azure::DateTime::Parse(node.Value, Azure::DateTime::DateFormat::Rfc3339); - } - else if (path.size() == 1 && path[0] == XmlTagName::k_SignedExpiry) - { - ret.SignedExpiresOn - = Azure::DateTime::Parse(node.Value, Azure::DateTime::DateFormat::Rfc3339); - } - else if (path.size() == 1 && path[0] == XmlTagName::k_SignedService) - { - ret.SignedService = node.Value; - } - else if (path.size() == 1 && path[0] == XmlTagName::k_SignedVersion) - { - ret.SignedVersion = node.Value; - } - else if (path.size() == 1 && path[0] == XmlTagName::k_Value) - { - ret.Value = node.Value; - } - } - } - return ret; - } - static Metadata MetadataFromXml(Storage::_detail::XmlReader& reader) { Metadata ret; @@ -3097,10 +3031,10 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct CreateBlobContainerOptions static Azure::Response Create( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const CreateBlobContainerOptions& options) + const CreateBlobContainerOptions& options, + const Azure::Core::Context& context) { (void)options; auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Put, url); @@ -3158,10 +3092,10 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct DeleteBlobContainerOptions static Azure::Response Delete( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const DeleteBlobContainerOptions& options) + const DeleteBlobContainerOptions& options, + const Azure::Core::Context& context) { (void)options; auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Delete, url); @@ -3212,10 +3146,10 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct UndeleteBlobContainerOptions static Azure::Response Undelete( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const UndeleteBlobContainerOptions& options) + const UndeleteBlobContainerOptions& options, + const Azure::Core::Context& context) { (void)options; auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Put, url); @@ -3251,11 +3185,11 @@ namespace Azure { namespace Storage { namespace Blobs { Azure::Nullable LeaseId; }; // struct GetBlobContainerPropertiesOptions - static Azure::Response GetProperties( - const Azure::Core::Context& context, + static Azure::Response GetProperties( Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const GetBlobContainerPropertiesOptions& options) + const GetBlobContainerPropertiesOptions& options, + const Azure::Core::Context& context) { (void)options; auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Head, url); @@ -3272,7 +3206,7 @@ namespace Azure { namespace Storage { namespace Blobs { } auto pHttpResponse = pipeline.Send(request, context); Azure::Core::Http::RawResponse& httpResponse = *pHttpResponse; - GetBlobContainerPropertiesResult response; + BlobContainerProperties response; auto http_status_code = static_cast::type>( httpResponse.GetStatusCode()); @@ -3280,7 +3214,6 @@ namespace Azure { namespace Storage { namespace Blobs { { throw StorageException::CreateFromResponse(std::move(pHttpResponse)); } - response.RequestId = httpResponse.GetHeaders().at("x-ms-request-id"); response.ETag = Azure::ETag(httpResponse.GetHeaders().at("etag")); response.LastModified = Azure::DateTime::Parse( httpResponse.GetHeaders().at("last-modified"), Azure::DateTime::DateFormat::Rfc1123); @@ -3311,7 +3244,7 @@ namespace Azure { namespace Storage { namespace Blobs { = httpResponse.GetHeaders().at("x-ms-default-encryption-scope"); response.PreventEncryptionScopeOverride = httpResponse.GetHeaders().at("x-ms-deny-encryption-scope-override") == "true"; - return Azure::Response( + return Azure::Response( std::move(response), std::move(pHttpResponse)); } @@ -3324,10 +3257,10 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct SetBlobContainerMetadataOptions static Azure::Response SetMetadata( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const SetBlobContainerMetadataOptions& options) + const SetBlobContainerMetadataOptions& options, + const Azure::Core::Context& context) { (void)options; auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Put, url); @@ -3382,10 +3315,10 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct ListBlobsSinglePageOptions static Azure::Response ListBlobsSinglePage( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const ListBlobsSinglePageOptions& options) + const ListBlobsSinglePageOptions& options, + const Azure::Core::Context& context) { (void)options; auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Get, url); @@ -3451,10 +3384,10 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct ListBlobsByHierarchySinglePageOptions static Azure::Response ListBlobsByHierarchySinglePage( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const ListBlobsByHierarchySinglePageOptions& options) + const ListBlobsByHierarchySinglePageOptions& options, + const Azure::Core::Context& context) { (void)options; auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Get, url); @@ -3521,11 +3454,11 @@ namespace Azure { namespace Storage { namespace Blobs { Azure::Nullable LeaseId; }; // struct GetBlobContainerAccessPolicyOptions - static Azure::Response GetAccessPolicy( - const Azure::Core::Context& context, + static Azure::Response GetAccessPolicy( Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const GetBlobContainerAccessPolicyOptions& options) + const GetBlobContainerAccessPolicyOptions& options, + const Azure::Core::Context& context) { (void)options; auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Get, url); @@ -3539,7 +3472,7 @@ namespace Azure { namespace Storage { namespace Blobs { request.GetUrl().AppendQueryParameter("comp", "acl"); auto pHttpResponse = pipeline.Send(request, context); Azure::Core::Http::RawResponse& httpResponse = *pHttpResponse; - GetBlobContainerAccessPolicyResult response; + BlobContainerAccessPolicy response; auto http_status_code = static_cast::type>( httpResponse.GetStatusCode()); @@ -3551,19 +3484,15 @@ namespace Azure { namespace Storage { namespace Blobs { const auto& httpResponseBody = httpResponse.GetBody(); Storage::_detail::XmlReader reader( reinterpret_cast(httpResponseBody.data()), httpResponseBody.size()); - response = GetBlobContainerAccessPolicyResultFromXml(reader); + response = BlobContainerAccessPolicyFromXml(reader); } - response.RequestId = httpResponse.GetHeaders().at("x-ms-request-id"); - response.ETag = Azure::ETag(httpResponse.GetHeaders().at("etag")); - response.LastModified = Azure::DateTime::Parse( - httpResponse.GetHeaders().at("last-modified"), Azure::DateTime::DateFormat::Rfc1123); auto x_ms_blob_public_access__iterator = httpResponse.GetHeaders().find("x-ms-blob-public-access"); if (x_ms_blob_public_access__iterator != httpResponse.GetHeaders().end()) { response.AccessType = PublicAccessType(x_ms_blob_public_access__iterator->second); } - return Azure::Response( + return Azure::Response( std::move(response), std::move(pHttpResponse)); } @@ -3578,10 +3507,10 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct SetBlobContainerAccessPolicyOptions static Azure::Response SetAccessPolicy( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const SetBlobContainerAccessPolicyOptions& options) + const SetBlobContainerAccessPolicyOptions& options, + const Azure::Core::Context& context) { (void)options; std::string xml_body; @@ -3653,10 +3582,10 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct AcquireBlobContainerLeaseOptions static Azure::Response AcquireLease( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const AcquireBlobContainerLeaseOptions& options) + const AcquireBlobContainerLeaseOptions& options, + const Azure::Core::Context& context) { (void)options; auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Put, url); @@ -3716,10 +3645,10 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct RenewBlobContainerLeaseOptions static Azure::Response RenewLease( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const RenewBlobContainerLeaseOptions& options) + const RenewBlobContainerLeaseOptions& options, + const Azure::Core::Context& context) { (void)options; auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Put, url); @@ -3776,10 +3705,10 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct ChangeBlobContainerLeaseOptions static Azure::Response ChangeLease( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const ChangeBlobContainerLeaseOptions& options) + const ChangeBlobContainerLeaseOptions& options, + const Azure::Core::Context& context) { (void)options; auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Put, url); @@ -3836,10 +3765,10 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct ReleaseBlobContainerLeaseOptions static Azure::Response ReleaseLease( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const ReleaseBlobContainerLeaseOptions& options) + const ReleaseBlobContainerLeaseOptions& options, + const Azure::Core::Context& context) { (void)options; auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Put, url); @@ -3894,10 +3823,10 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct BreakBlobContainerLeaseOptions static Azure::Response BreakLease( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const BreakBlobContainerLeaseOptions& options) + const BreakBlobContainerLeaseOptions& options, + const Azure::Core::Context& context) { (void)options; auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Put, url); @@ -3949,10 +3878,10 @@ namespace Azure { namespace Storage { namespace Blobs { } private: - static GetBlobContainerAccessPolicyResult GetBlobContainerAccessPolicyResultFromXml( + static BlobContainerAccessPolicy BlobContainerAccessPolicyFromXml( Storage::_detail::XmlReader& reader) { - GetBlobContainerAccessPolicyResult ret; + BlobContainerAccessPolicy ret; enum class XmlTagName { k_SignedIdentifiers, @@ -4837,10 +4766,10 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct DownloadBlobOptions static Azure::Response Download( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const DownloadBlobOptions& options) + const DownloadBlobOptions& options, + const Azure::Core::Context& context) { (void)options; auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Get, url, true); @@ -5241,8 +5170,8 @@ namespace Azure { namespace Storage { namespace Blobs { } static Azure::Response DeleteCreateResponse( - const Azure::Core::Context& context, - std::unique_ptr pHttpResponse) + std::unique_ptr pHttpResponse, + const Azure::Core::Context& context) { (void)context; Azure::Core::Http::RawResponse& httpResponse = *pHttpResponse; @@ -5259,14 +5188,14 @@ namespace Azure { namespace Storage { namespace Blobs { } static Azure::Response Delete( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const DeleteBlobOptions& options) + const DeleteBlobOptions& options, + const Azure::Core::Context& context) { auto request = DeleteCreateMessage(url, options); auto pHttpResponse = pipeline.Send(request, context); - return DeleteCreateResponse(context, std::move(pHttpResponse)); + return DeleteCreateResponse(std::move(pHttpResponse), context); } struct SetBlobExpiryOptions @@ -5277,10 +5206,10 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct SetBlobExpiryOptions static Azure::Response ScheduleDeletion( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const SetBlobExpiryOptions& options) + const SetBlobExpiryOptions& options, + const Azure::Core::Context& context) { (void)options; auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Put, url); @@ -5318,10 +5247,10 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct UndeleteBlobOptions static Azure::Response Undelete( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const UndeleteBlobOptions& options) + const UndeleteBlobOptions& options, + const Azure::Core::Context& context) { (void)options; auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Put, url); @@ -5361,11 +5290,11 @@ namespace Azure { namespace Storage { namespace Blobs { Azure::Nullable IfTags; }; // struct GetBlobPropertiesOptions - static Azure::Response GetProperties( - const Azure::Core::Context& context, + static Azure::Response GetProperties( Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const GetBlobPropertiesOptions& options) + const GetBlobPropertiesOptions& options, + const Azure::Core::Context& context) { (void)options; auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Head, url); @@ -5421,7 +5350,7 @@ namespace Azure { namespace Storage { namespace Blobs { } auto pHttpResponse = pipeline.Send(request, context); Azure::Core::Http::RawResponse& httpResponse = *pHttpResponse; - GetBlobPropertiesResult response; + BlobProperties response; auto http_status_code = static_cast::type>( httpResponse.GetStatusCode()); @@ -5429,7 +5358,6 @@ namespace Azure { namespace Storage { namespace Blobs { { throw StorageException::CreateFromResponse(std::move(pHttpResponse)); } - response.RequestId = httpResponse.GetHeaders().at("x-ms-request-id"); response.ETag = Azure::ETag(httpResponse.GetHeaders().at("etag")); response.LastModified = Azure::DateTime::Parse( httpResponse.GetHeaders().at("last-modified"), Azure::DateTime::DateFormat::Rfc1123); @@ -5673,8 +5601,7 @@ namespace Azure { namespace Storage { namespace Blobs { { response.IsCurrentVersion = x_ms_is_current_version__iterator->second == "true"; } - return Azure::Response( - std::move(response), std::move(pHttpResponse)); + return Azure::Response(std::move(response), std::move(pHttpResponse)); } struct SetBlobHttpHeadersOptions @@ -5690,10 +5617,10 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct SetBlobHttpHeadersOptions static Azure::Response SetHttpHeaders( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const SetBlobHttpHeadersOptions& options) + const SetBlobHttpHeadersOptions& options, + const Azure::Core::Context& context) { (void)options; auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Put, url); @@ -5802,10 +5729,10 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct SetBlobMetadataOptions static Azure::Response SetMetadata( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const SetBlobMetadataOptions& options) + const SetBlobMetadataOptions& options, + const Azure::Core::Context& context) { (void)options; auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Put, url); @@ -5923,8 +5850,8 @@ namespace Azure { namespace Storage { namespace Blobs { } static Azure::Response SetAccessTierCreateResponse( - const Azure::Core::Context& context, - std::unique_ptr pHttpResponse) + std::unique_ptr pHttpResponse, + const Azure::Core::Context& context) { (void)context; Azure::Core::Http::RawResponse& httpResponse = *pHttpResponse; @@ -5942,14 +5869,14 @@ namespace Azure { namespace Storage { namespace Blobs { } static Azure::Response SetAccessTier( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const SetBlobAccessTierOptions& options) + const SetBlobAccessTierOptions& options, + const Azure::Core::Context& context) { auto request = SetAccessTierCreateMessage(url, options); auto pHttpResponse = pipeline.Send(request, context); - return SetAccessTierCreateResponse(context, std::move(pHttpResponse)); + return SetAccessTierCreateResponse(std::move(pHttpResponse), context); } struct StartCopyBlobFromUriOptions @@ -5975,10 +5902,10 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct StartCopyBlobFromUriOptions static Azure::Response StartCopyFromUri( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const StartCopyBlobFromUriOptions& options) + const StartCopyBlobFromUriOptions& options, + const Azure::Core::Context& context) { (void)options; auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Put, url); @@ -6100,10 +6027,10 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct AbortCopyBlobFromUriOptions static Azure::Response AbortCopyFromUri( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const AbortCopyBlobFromUriOptions& options) + const AbortCopyBlobFromUriOptions& options, + const Azure::Core::Context& context) { (void)options; auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Put, url); @@ -6154,10 +6081,10 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct CreateBlobSnapshotOptions static Azure::Response CreateSnapshot( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const CreateBlobSnapshotOptions& options) + const CreateBlobSnapshotOptions& options, + const Azure::Core::Context& context) { (void)options; auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Put, url); @@ -6267,10 +6194,10 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct GetBlobTagsOptions static Azure::Response GetTags( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const GetBlobTagsOptions& options) + const GetBlobTagsOptions& options, + const Azure::Core::Context& context) { (void)options; auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Get, url); @@ -6313,10 +6240,10 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct SetBlobTagsOptions static Azure::Response SetTags( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const SetBlobTagsOptions& options) + const SetBlobTagsOptions& options, + const Azure::Core::Context& context) { (void)options; std::string xml_body; @@ -6370,10 +6297,10 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct AcquireBlobLeaseOptions static Azure::Response AcquireLease( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const AcquireBlobLeaseOptions& options) + const AcquireBlobLeaseOptions& options, + const Azure::Core::Context& context) { (void)options; auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Put, url); @@ -6447,10 +6374,10 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct RenewBlobLeaseOptions static Azure::Response RenewLease( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const RenewBlobLeaseOptions& options) + const RenewBlobLeaseOptions& options, + const Azure::Core::Context& context) { (void)options; auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Put, url); @@ -6521,10 +6448,10 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct ChangeBlobLeaseOptions static Azure::Response ChangeLease( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const ChangeBlobLeaseOptions& options) + const ChangeBlobLeaseOptions& options, + const Azure::Core::Context& context) { (void)options; auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Put, url); @@ -6595,10 +6522,10 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct ReleaseBlobLeaseOptions static Azure::Response ReleaseLease( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const ReleaseBlobLeaseOptions& options) + const ReleaseBlobLeaseOptions& options, + const Azure::Core::Context& context) { (void)options; auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Put, url); @@ -6673,10 +6600,10 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct BreakBlobLeaseOptions static Azure::Response BreakLease( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const BreakBlobLeaseOptions& options) + const BreakBlobLeaseOptions& options, + const Azure::Core::Context& context) { (void)options; auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Put, url); @@ -6894,11 +6821,11 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct UploadBlockBlobOptions static Azure::Response Upload( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, Azure::Core::IO::BodyStream* requestBody, - const UploadBlockBlobOptions& options) + const UploadBlockBlobOptions& options, + const Azure::Core::Context& context) { (void)options; auto request @@ -7081,11 +7008,11 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct StageBlockOptions static Azure::Response StageBlock( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, Azure::Core::IO::BodyStream* requestBody, - const StageBlockOptions& options) + const StageBlockOptions& options, + const Azure::Core::Context& context) { (void)options; auto request @@ -7207,10 +7134,10 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct StageBlockFromUriOptions static Azure::Response StageBlockFromUri( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const StageBlockFromUriOptions& options) + const StageBlockFromUriOptions& options, + const Azure::Core::Context& context) { (void)options; auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Put, url); @@ -7368,10 +7295,10 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct CommitBlockListOptions static Azure::Response CommitBlockList( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const CommitBlockListOptions& options) + const CommitBlockListOptions& options, + const Azure::Core::Context& context) { (void)options; std::string xml_body; @@ -7523,10 +7450,10 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct GetBlockListOptions static Azure::Response GetBlockList( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const GetBlockListOptions& options) + const GetBlockListOptions& options, + const Azure::Core::Context& context) { (void)options; auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Get, url); @@ -7746,10 +7673,10 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct CreatePageBlobOptions static Azure::Response Create( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const CreatePageBlobOptions& options) + const CreatePageBlobOptions& options, + const Azure::Core::Context& context) { (void)options; auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Put, url); @@ -7909,11 +7836,11 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct UploadPageBlobPagesOptions static Azure::Response UploadPages( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, Azure::Core::IO::BodyStream* requestBody, - const UploadPageBlobPagesOptions& options) + const UploadPageBlobPagesOptions& options, + const Azure::Core::Context& context) { (void)options; auto request @@ -8096,10 +8023,10 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct UploadPageBlobPagesFromUriOptions static Azure::Response UploadPagesFromUri( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const UploadPageBlobPagesFromUriOptions& options) + const UploadPageBlobPagesFromUriOptions& options, + const Azure::Core::Context& context) { (void)options; auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Put, url); @@ -8288,10 +8215,10 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct ClearPageBlobPagesOptions static Azure::Response ClearPages( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const ClearPageBlobPagesOptions& options) + const ClearPageBlobPagesOptions& options, + const Azure::Core::Context& context) { (void)options; auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Put, url); @@ -8419,10 +8346,10 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct ResizePageBlobOptions static Azure::Response Resize( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const ResizePageBlobOptions& options) + const ResizePageBlobOptions& options, + const Azure::Core::Context& context) { (void)options; auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Put, url); @@ -8536,10 +8463,10 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct GetPageBlobPageRangesOptions static Azure::Response GetPageRanges( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const GetPageBlobPageRangesOptions& options) + const GetPageBlobPageRangesOptions& options, + const Azure::Core::Context& context) { (void)options; auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Get, url); @@ -8638,10 +8565,10 @@ namespace Azure { namespace Storage { namespace Blobs { static Azure::Response StartCopyIncremental( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const StartCopyPageBlobIncrementalOptions& options) + const StartCopyPageBlobIncrementalOptions& options, + const Azure::Core::Context& context) { (void)options; auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Put, url); @@ -8906,10 +8833,10 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct CreateAppendBlobOptions static Azure::Response Create( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const CreateAppendBlobOptions& options) + const CreateAppendBlobOptions& options, + const Azure::Core::Context& context) { (void)options; auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Put, url); @@ -9057,11 +8984,11 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct AppendBlockOptions static Azure::Response AppendBlock( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, Azure::Core::IO::BodyStream* requestBody, - const AppendBlockOptions& options) + const AppendBlockOptions& options, + const Azure::Core::Context& context) { (void)options; auto request @@ -9225,10 +9152,10 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct AppendBlockFromUriOptions static Azure::Response AppendBlockFromUri( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const AppendBlockFromUriOptions& options) + const AppendBlockFromUriOptions& options, + const Azure::Core::Context& context) { (void)options; auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Put, url); @@ -9397,10 +9324,10 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct SealAppendBlobOptions static Azure::Response Seal( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, - const SealAppendBlobOptions& options) + const SealAppendBlobOptions& options, + const Azure::Core::Context& context) { (void)options; auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Put, url); @@ -9476,11 +9403,11 @@ namespace Azure { namespace Storage { namespace Blobs { }; // struct SubmitBlobBatchOptions static Azure::Response SubmitBatch( - const Azure::Core::Context& context, Azure::Core::Http::_internal::HttpPipeline& pipeline, const Azure::Core::Url& url, Azure::Core::IO::BodyStream* requestBody, - const SubmitBlobBatchOptions& options) + const SubmitBlobBatchOptions& options, + const Azure::Core::Context& context) { (void)options; auto request diff --git a/sdk/storage/azure-storage-blobs/src/append_blob_client.cpp b/sdk/storage/azure-storage-blobs/src/append_blob_client.cpp index d96003fd9..53728bc8d 100644 --- a/sdk/storage/azure-storage-blobs/src/append_blob_client.cpp +++ b/sdk/storage/azure-storage-blobs/src/append_blob_client.cpp @@ -94,7 +94,7 @@ namespace Azure { namespace Storage { namespace Blobs { } protocolLayerOptions.EncryptionScope = m_encryptionScope; return _detail::BlobRestClient::AppendBlob::Create( - context, *m_pipeline, m_blobUrl, protocolLayerOptions); + *m_pipeline, m_blobUrl, protocolLayerOptions, context); } Azure::Response AppendBlobClient::CreateIfNotExists( @@ -145,7 +145,7 @@ namespace Azure { namespace Storage { namespace Blobs { } protocolLayerOptions.EncryptionScope = m_encryptionScope; return _detail::BlobRestClient::AppendBlob::AppendBlock( - context, *m_pipeline, m_blobUrl, content, protocolLayerOptions); + *m_pipeline, m_blobUrl, content, protocolLayerOptions, context); } Azure::Response AppendBlobClient::AppendBlockFromUri( @@ -173,7 +173,7 @@ namespace Azure { namespace Storage { namespace Blobs { } protocolLayerOptions.EncryptionScope = m_encryptionScope; return _detail::BlobRestClient::AppendBlob::AppendBlockFromUri( - context, *m_pipeline, m_blobUrl, protocolLayerOptions); + *m_pipeline, m_blobUrl, protocolLayerOptions, context); } Azure::Response AppendBlobClient::Seal( @@ -189,7 +189,7 @@ namespace Azure { namespace Storage { namespace Blobs { protocolLayerOptions.IfNoneMatch = options.AccessConditions.IfNoneMatch; protocolLayerOptions.IfTags = options.AccessConditions.TagConditions; return _detail::BlobRestClient::AppendBlob::Seal( - context, *m_pipeline, m_blobUrl, protocolLayerOptions); + *m_pipeline, m_blobUrl, protocolLayerOptions, context); } }}} // namespace Azure::Storage::Blobs diff --git a/sdk/storage/azure-storage-blobs/src/blob_client.cpp b/sdk/storage/azure-storage-blobs/src/blob_client.cpp index 1dcdb1865..c9329ac9b 100644 --- a/sdk/storage/azure-storage-blobs/src/blob_client.cpp +++ b/sdk/storage/azure-storage-blobs/src/blob_client.cpp @@ -186,7 +186,7 @@ namespace Azure { namespace Storage { namespace Blobs { } auto downloadResponse = _detail::BlobRestClient::Blob::Download( - Storage::_detail::WithReplicaStatus(context), *m_pipeline, m_blobUrl, protocolLayerOptions); + *m_pipeline, m_blobUrl, protocolLayerOptions, Storage::_detail::WithReplicaStatus(context)); { // In case network failure during reading the body @@ -458,7 +458,7 @@ namespace Azure { namespace Storage { namespace Blobs { return ret; } - Azure::Response BlobClient::GetProperties( + Azure::Response BlobClient::GetProperties( const GetBlobPropertiesOptions& options, const Azure::Core::Context& context) const { @@ -476,7 +476,7 @@ namespace Azure { namespace Storage { namespace Blobs { protocolLayerOptions.EncryptionAlgorithm = m_customerProvidedKey.GetValue().Algorithm; } auto response = _detail::BlobRestClient::Blob::GetProperties( - Storage::_detail::WithReplicaStatus(context), *m_pipeline, m_blobUrl, protocolLayerOptions); + *m_pipeline, m_blobUrl, protocolLayerOptions, Storage::_detail::WithReplicaStatus(context)); if (response->Tier.HasValue() && !response->IsAccessTierInferred.HasValue()) { response->IsAccessTierInferred = false; @@ -510,7 +510,7 @@ namespace Azure { namespace Storage { namespace Blobs { protocolLayerOptions.IfNoneMatch = options.AccessConditions.IfNoneMatch; protocolLayerOptions.IfTags = options.AccessConditions.TagConditions; return _detail::BlobRestClient::Blob::SetHttpHeaders( - context, *m_pipeline, m_blobUrl, protocolLayerOptions); + *m_pipeline, m_blobUrl, protocolLayerOptions, context); } Azure::Response BlobClient::SetMetadata( @@ -534,7 +534,7 @@ namespace Azure { namespace Storage { namespace Blobs { } protocolLayerOptions.EncryptionScope = m_encryptionScope; return _detail::BlobRestClient::Blob::SetMetadata( - context, *m_pipeline, m_blobUrl, protocolLayerOptions); + *m_pipeline, m_blobUrl, protocolLayerOptions, context); } Azure::Response BlobClient::SetAccessTier( @@ -546,7 +546,7 @@ namespace Azure { namespace Storage { namespace Blobs { protocolLayerOptions.Tier = tier; protocolLayerOptions.RehydratePriority = options.RehydratePriority; return _detail::BlobRestClient::Blob::SetAccessTier( - context, *m_pipeline, m_blobUrl, protocolLayerOptions); + *m_pipeline, m_blobUrl, protocolLayerOptions, context); } StartCopyBlobOperation BlobClient::StartCopyFromUri( @@ -574,7 +574,7 @@ namespace Azure { namespace Storage { namespace Blobs { protocolLayerOptions.SourceIfTags = options.SourceAccessConditions.TagConditions; auto response = _detail::BlobRestClient::Blob::StartCopyFromUri( - context, *m_pipeline, m_blobUrl, protocolLayerOptions); + *m_pipeline, m_blobUrl, protocolLayerOptions, context); StartCopyBlobOperation res; res.m_rawResponse = response.ExtractRawResponse(); res.RequestId = std::move(response->RequestId); @@ -596,7 +596,7 @@ namespace Azure { namespace Storage { namespace Blobs { protocolLayerOptions.CopyId = copyId; protocolLayerOptions.LeaseId = options.AccessConditions.LeaseId; return _detail::BlobRestClient::Blob::AbortCopyFromUri( - context, *m_pipeline, m_blobUrl, protocolLayerOptions); + *m_pipeline, m_blobUrl, protocolLayerOptions, context); } Azure::Response BlobClient::CreateSnapshot( @@ -619,7 +619,7 @@ namespace Azure { namespace Storage { namespace Blobs { } protocolLayerOptions.EncryptionScope = m_encryptionScope; return _detail::BlobRestClient::Blob::CreateSnapshot( - context, *m_pipeline, m_blobUrl, protocolLayerOptions); + *m_pipeline, m_blobUrl, protocolLayerOptions, context); } Azure::Response BlobClient::Delete( @@ -635,7 +635,7 @@ namespace Azure { namespace Storage { namespace Blobs { protocolLayerOptions.IfNoneMatch = options.AccessConditions.IfNoneMatch; protocolLayerOptions.IfTags = options.AccessConditions.TagConditions; return _detail::BlobRestClient::Blob::Delete( - context, *m_pipeline, m_blobUrl, protocolLayerOptions); + *m_pipeline, m_blobUrl, protocolLayerOptions, context); } Azure::Response BlobClient::DeleteIfExists( @@ -667,7 +667,7 @@ namespace Azure { namespace Storage { namespace Blobs { (void)options; _detail::BlobRestClient::Blob::UndeleteBlobOptions protocolLayerOptions; return _detail::BlobRestClient::Blob::Undelete( - context, *m_pipeline, m_blobUrl, protocolLayerOptions); + *m_pipeline, m_blobUrl, protocolLayerOptions, context); } Azure::Response BlobClient::SetTags( @@ -679,7 +679,7 @@ namespace Azure { namespace Storage { namespace Blobs { protocolLayerOptions.Tags = std::move(tags); protocolLayerOptions.IfTags = options.AccessConditions.TagConditions; return _detail::BlobRestClient::Blob::SetTags( - context, *m_pipeline, m_blobUrl, protocolLayerOptions); + *m_pipeline, m_blobUrl, protocolLayerOptions, context); } Azure::Response BlobClient::GetTags( @@ -689,7 +689,7 @@ namespace Azure { namespace Storage { namespace Blobs { _detail::BlobRestClient::Blob::GetBlobTagsOptions protocolLayerOptions; protocolLayerOptions.IfTags = options.AccessConditions.TagConditions; return _detail::BlobRestClient::Blob::GetTags( - Storage::_detail::WithReplicaStatus(context), *m_pipeline, m_blobUrl, protocolLayerOptions); + *m_pipeline, m_blobUrl, protocolLayerOptions, Storage::_detail::WithReplicaStatus(context)); } }}} // namespace Azure::Storage::Blobs diff --git a/sdk/storage/azure-storage-blobs/src/blob_container_client.cpp b/sdk/storage/azure-storage-blobs/src/blob_container_client.cpp index 45d5558b5..144914802 100644 --- a/sdk/storage/azure-storage-blobs/src/blob_container_client.cpp +++ b/sdk/storage/azure-storage-blobs/src/blob_container_client.cpp @@ -158,7 +158,7 @@ namespace Azure { namespace Storage { namespace Blobs { protocolLayerOptions.DefaultEncryptionScope = options.DefaultEncryptionScope; protocolLayerOptions.PreventEncryptionScopeOverride = options.PreventEncryptionScopeOverride; return _detail::BlobRestClient::BlobContainer::Create( - context, *m_pipeline, m_blobContainerUrl, protocolLayerOptions); + *m_pipeline, m_blobContainerUrl, protocolLayerOptions, context); } Azure::Response BlobContainerClient::CreateIfNotExists( @@ -193,7 +193,7 @@ namespace Azure { namespace Storage { namespace Blobs { protocolLayerOptions.IfModifiedSince = options.AccessConditions.IfModifiedSince; protocolLayerOptions.IfUnmodifiedSince = options.AccessConditions.IfUnmodifiedSince; return _detail::BlobRestClient::BlobContainer::Delete( - context, *m_pipeline, m_blobContainerUrl, protocolLayerOptions); + *m_pipeline, m_blobContainerUrl, protocolLayerOptions, context); } Azure::Response BlobContainerClient::DeleteIfExists( @@ -219,17 +219,17 @@ namespace Azure { namespace Storage { namespace Blobs { } } - Azure::Response BlobContainerClient::GetProperties( + Azure::Response BlobContainerClient::GetProperties( const GetBlobContainerPropertiesOptions& options, const Azure::Core::Context& context) const { _detail::BlobRestClient::BlobContainer::GetBlobContainerPropertiesOptions protocolLayerOptions; protocolLayerOptions.LeaseId = options.AccessConditions.LeaseId; return _detail::BlobRestClient::BlobContainer::GetProperties( - Storage::_detail::WithReplicaStatus(context), *m_pipeline, m_blobContainerUrl, - protocolLayerOptions); + protocolLayerOptions, + Storage::_detail::WithReplicaStatus(context)); } Azure::Response BlobContainerClient::SetMetadata( @@ -242,7 +242,7 @@ namespace Azure { namespace Storage { namespace Blobs { protocolLayerOptions.LeaseId = options.AccessConditions.LeaseId; protocolLayerOptions.IfModifiedSince = options.AccessConditions.IfModifiedSince; return _detail::BlobRestClient::BlobContainer::SetMetadata( - context, *m_pipeline, m_blobContainerUrl, protocolLayerOptions); + *m_pipeline, m_blobContainerUrl, protocolLayerOptions, context); } Azure::Response BlobContainerClient::ListBlobsSinglePage( @@ -255,10 +255,10 @@ namespace Azure { namespace Storage { namespace Blobs { protocolLayerOptions.MaxResults = options.PageSizeHint; protocolLayerOptions.Include = options.Include; auto response = _detail::BlobRestClient::BlobContainer::ListBlobsSinglePage( - Storage::_detail::WithReplicaStatus(context), *m_pipeline, m_blobContainerUrl, - protocolLayerOptions); + protocolLayerOptions, + Storage::_detail::WithReplicaStatus(context)); for (auto& i : response->Items) { if (i.Details.Tier.HasValue() && !i.Details.IsAccessTierInferred.HasValue()) @@ -291,10 +291,10 @@ namespace Azure { namespace Storage { namespace Blobs { protocolLayerOptions.MaxResults = options.PageSizeHint; protocolLayerOptions.Include = options.Include; auto response = _detail::BlobRestClient::BlobContainer::ListBlobsByHierarchySinglePage( - Storage::_detail::WithReplicaStatus(context), *m_pipeline, m_blobContainerUrl, - protocolLayerOptions); + protocolLayerOptions, + Storage::_detail::WithReplicaStatus(context)); for (auto& i : response->Items) { if (i.VersionId.HasValue() && !i.IsCurrentVersion.HasValue()) @@ -305,7 +305,7 @@ namespace Azure { namespace Storage { namespace Blobs { return response; } - Azure::Response BlobContainerClient::GetAccessPolicy( + Azure::Response BlobContainerClient::GetAccessPolicy( const GetBlobContainerAccessPolicyOptions& options, const Azure::Core::Context& context) const { @@ -313,10 +313,10 @@ namespace Azure { namespace Storage { namespace Blobs { protocolLayerOptions; protocolLayerOptions.LeaseId = options.AccessConditions.LeaseId; return _detail::BlobRestClient::BlobContainer::GetAccessPolicy( - Storage::_detail::WithReplicaStatus(context), *m_pipeline, m_blobContainerUrl, - protocolLayerOptions); + protocolLayerOptions, + Storage::_detail::WithReplicaStatus(context)); } Azure::Response BlobContainerClient::SetAccessPolicy( @@ -331,7 +331,7 @@ namespace Azure { namespace Storage { namespace Blobs { protocolLayerOptions.IfModifiedSince = options.AccessConditions.IfModifiedSince; protocolLayerOptions.IfUnmodifiedSince = options.AccessConditions.IfUnmodifiedSince; return _detail::BlobRestClient::BlobContainer::SetAccessPolicy( - context, *m_pipeline, m_blobContainerUrl, protocolLayerOptions); + *m_pipeline, m_blobContainerUrl, protocolLayerOptions, context); } Azure::Response BlobContainerClient::DeleteBlob( diff --git a/sdk/storage/azure-storage-blobs/src/blob_lease_client.cpp b/sdk/storage/azure-storage-blobs/src/blob_lease_client.cpp index c4c3ee693..77a1f2d6b 100644 --- a/sdk/storage/azure-storage-blobs/src/blob_lease_client.cpp +++ b/sdk/storage/azure-storage-blobs/src/blob_lease_client.cpp @@ -31,10 +31,10 @@ namespace Azure { namespace Storage { namespace Blobs { protocolLayerOptions.IfTags = options.AccessConditions.TagConditions; auto response = _detail::BlobRestClient::Blob::AcquireLease( - context, *(m_blobClient.GetValue().m_pipeline), m_blobClient.GetValue().m_blobUrl, - protocolLayerOptions); + protocolLayerOptions, + context); Models::AcquireBlobLeaseResult ret; ret.RequestId = std::move(response->RequestId); @@ -60,10 +60,10 @@ namespace Azure { namespace Storage { namespace Blobs { std::abort(); } auto response = _detail::BlobRestClient::BlobContainer::AcquireLease( - context, *(m_blobContainerClient.GetValue().m_pipeline), m_blobContainerClient.GetValue().m_blobContainerUrl, - protocolLayerOptions); + protocolLayerOptions, + context); Models::AcquireBlobLeaseResult ret; ret.RequestId = std::move(response->RequestId); @@ -95,10 +95,10 @@ namespace Azure { namespace Storage { namespace Blobs { protocolLayerOptions.IfTags = options.AccessConditions.TagConditions; auto response = _detail::BlobRestClient::Blob::RenewLease( - context, *(m_blobClient.GetValue().m_pipeline), m_blobClient.GetValue().m_blobUrl, - protocolLayerOptions); + protocolLayerOptions, + context); Models::RenewBlobLeaseResult ret; ret.RequestId = std::move(response->RequestId); @@ -124,10 +124,10 @@ namespace Azure { namespace Storage { namespace Blobs { } auto response = _detail::BlobRestClient::BlobContainer::RenewLease( - context, *(m_blobContainerClient.GetValue().m_pipeline), m_blobContainerClient.GetValue().m_blobContainerUrl, - protocolLayerOptions); + protocolLayerOptions, + context); Models::RenewBlobLeaseResult ret; ret.RequestId = std::move(response->RequestId); @@ -159,10 +159,10 @@ namespace Azure { namespace Storage { namespace Blobs { protocolLayerOptions.IfTags = options.AccessConditions.TagConditions; auto response = _detail::BlobRestClient::Blob::ReleaseLease( - context, *(m_blobClient.GetValue().m_pipeline), m_blobClient.GetValue().m_blobUrl, - protocolLayerOptions); + protocolLayerOptions, + context); Models::ReleaseBlobLeaseResult ret; ret.RequestId = std::move(response->RequestId); @@ -187,10 +187,10 @@ namespace Azure { namespace Storage { namespace Blobs { } auto response = _detail::BlobRestClient::BlobContainer::ReleaseLease( - context, *(m_blobContainerClient.GetValue().m_pipeline), m_blobContainerClient.GetValue().m_blobContainerUrl, - protocolLayerOptions); + protocolLayerOptions, + context); Models::ReleaseBlobLeaseResult ret; ret.RequestId = std::move(response->RequestId); @@ -223,10 +223,10 @@ namespace Azure { namespace Storage { namespace Blobs { protocolLayerOptions.IfTags = options.AccessConditions.TagConditions; auto response = _detail::BlobRestClient::Blob::ChangeLease( - context, *(m_blobClient.GetValue().m_pipeline), m_blobClient.GetValue().m_blobUrl, - protocolLayerOptions); + protocolLayerOptions, + context); Models::ChangeBlobLeaseResult ret; ret.RequestId = std::move(response->RequestId); @@ -253,10 +253,10 @@ namespace Azure { namespace Storage { namespace Blobs { } auto response = _detail::BlobRestClient::BlobContainer::ChangeLease( - context, *(m_blobContainerClient.GetValue().m_pipeline), m_blobContainerClient.GetValue().m_blobContainerUrl, - protocolLayerOptions); + protocolLayerOptions, + context); Models::ChangeBlobLeaseResult ret; ret.RequestId = std::move(response->RequestId); @@ -288,10 +288,10 @@ namespace Azure { namespace Storage { namespace Blobs { protocolLayerOptions.IfTags = options.AccessConditions.TagConditions; auto response = _detail::BlobRestClient::Blob::BreakLease( - context, *(m_blobClient.GetValue().m_pipeline), m_blobClient.GetValue().m_blobUrl, - protocolLayerOptions); + protocolLayerOptions, + context); Models::BreakBlobLeaseResult ret; ret.RequestId = std::move(response->RequestId); @@ -316,10 +316,10 @@ namespace Azure { namespace Storage { namespace Blobs { } auto response = _detail::BlobRestClient::BlobContainer::BreakLease( - context, *(m_blobContainerClient.GetValue().m_pipeline), m_blobContainerClient.GetValue().m_blobContainerUrl, - protocolLayerOptions); + protocolLayerOptions, + context); Models::BreakBlobLeaseResult ret; ret.RequestId = std::move(response->RequestId); diff --git a/sdk/storage/azure-storage-blobs/src/blob_responses.cpp b/sdk/storage/azure-storage-blobs/src/blob_responses.cpp index c61399d50..d4b2ad298 100644 --- a/sdk/storage/azure-storage-blobs/src/blob_responses.cpp +++ b/sdk/storage/azure-storage-blobs/src/blob_responses.cpp @@ -32,7 +32,7 @@ namespace Azure { namespace Storage { namespace Blobs { return response.ExtractRawResponse(); } - Azure::Response StartCopyBlobOperation::PollUntilDoneInternal( + Azure::Response StartCopyBlobOperation::PollUntilDoneInternal( std::chrono::milliseconds period, Azure::Core::Context& context) { @@ -42,7 +42,7 @@ namespace Azure { namespace Storage { namespace Blobs { if (m_status == Azure::Core::OperationStatus::Succeeded) { - return Azure::Response( + return Azure::Response( m_pollResult, std::make_unique(rawResponse)); } else if (m_status == Azure::Core::OperationStatus::Failed) diff --git a/sdk/storage/azure-storage-blobs/src/blob_service_client.cpp b/sdk/storage/azure-storage-blobs/src/blob_service_client.cpp index 7beaa141e..b6967cdc7 100644 --- a/sdk/storage/azure-storage-blobs/src/blob_service_client.cpp +++ b/sdk/storage/azure-storage-blobs/src/blob_service_client.cpp @@ -141,13 +141,13 @@ namespace Azure { namespace Storage { namespace Blobs { protocolLayerOptions.MaxResults = options.PageSizeHint; protocolLayerOptions.Include = options.Include; return _detail::BlobRestClient::Service::ListBlobContainersSinglePage( - Storage::_detail::WithReplicaStatus(context), *m_pipeline, m_serviceUrl, - protocolLayerOptions); + protocolLayerOptions, + Storage::_detail::WithReplicaStatus(context)); } - Azure::Response BlobServiceClient::GetUserDelegationKey( + Azure::Response BlobServiceClient::GetUserDelegationKey( const Azure::DateTime& expiresOn, const GetUserDelegationKeyOptions& options, const Azure::Core::Context& context) const @@ -156,10 +156,10 @@ namespace Azure { namespace Storage { namespace Blobs { protocolLayerOptions.StartsOn = options.startsOn; protocolLayerOptions.ExpiresOn = expiresOn; return _detail::BlobRestClient::Service::GetUserDelegationKey( - Storage::_detail::WithReplicaStatus(context), *m_pipeline, m_serviceUrl, - protocolLayerOptions); + protocolLayerOptions, + Storage::_detail::WithReplicaStatus(context)); } Azure::Response BlobServiceClient::SetProperties( @@ -171,43 +171,43 @@ namespace Azure { namespace Storage { namespace Blobs { _detail::BlobRestClient::Service::SetServicePropertiesOptions protocolLayerOptions; protocolLayerOptions.Properties = std::move(properties); return _detail::BlobRestClient::Service::SetProperties( - context, *m_pipeline, m_serviceUrl, protocolLayerOptions); + *m_pipeline, m_serviceUrl, protocolLayerOptions, context); } - Azure::Response BlobServiceClient::GetProperties( + Azure::Response BlobServiceClient::GetProperties( const GetServicePropertiesOptions& options, const Azure::Core::Context& context) const { (void)options; _detail::BlobRestClient::Service::GetServicePropertiesOptions protocolLayerOptions; return _detail::BlobRestClient::Service::GetProperties( - Storage::_detail::WithReplicaStatus(context), *m_pipeline, m_serviceUrl, - protocolLayerOptions); + protocolLayerOptions, + Storage::_detail::WithReplicaStatus(context)); } - Azure::Response BlobServiceClient::GetAccountInfo( + Azure::Response BlobServiceClient::GetAccountInfo( const GetAccountInfoOptions& options, const Azure::Core::Context& context) const { (void)options; _detail::BlobRestClient::Service::GetAccountInfoOptions protocolLayerOptions; return _detail::BlobRestClient::Service::GetAccountInfo( - Storage::_detail::WithReplicaStatus(context), *m_pipeline, m_serviceUrl, - protocolLayerOptions); + protocolLayerOptions, + Storage::_detail::WithReplicaStatus(context)); } - Azure::Response BlobServiceClient::GetStatistics( + Azure::Response BlobServiceClient::GetStatistics( const GetBlobServiceStatisticsOptions& options, const Azure::Core::Context& context) const { (void)options; _detail::BlobRestClient::Service::GetServiceStatisticsOptions protocolLayerOptions; return _detail::BlobRestClient::Service::GetStatistics( - context, *m_pipeline, m_serviceUrl, protocolLayerOptions); + *m_pipeline, m_serviceUrl, protocolLayerOptions, context); } Azure::Response @@ -221,10 +221,10 @@ namespace Azure { namespace Storage { namespace Blobs { protocolLayerOptions.ContinuationToken = options.ContinuationToken; protocolLayerOptions.MaxResults = options.PageSizeHint; return _detail::BlobRestClient::Service::FindBlobsByTagsSinglePage( - Storage::_detail::WithReplicaStatus(context), *m_pipeline, m_serviceUrl, - protocolLayerOptions); + protocolLayerOptions, + Storage::_detail::WithReplicaStatus(context)); } Azure::Response BlobServiceClient::CreateBlobContainer( @@ -262,7 +262,7 @@ namespace Azure { namespace Storage { namespace Blobs { protocolLayerOptions.DeletedBlobContainerName = deletedBlobContainerName; protocolLayerOptions.DeletedBlobContainerVersion = deletedBlobContainerVersion; auto response = _detail::BlobRestClient::BlobContainer::Undelete( - context, *m_pipeline, Azure::Core::Url(blobContainerClient.GetUrl()), protocolLayerOptions); + *m_pipeline, Azure::Core::Url(blobContainerClient.GetUrl()), protocolLayerOptions, context); return Azure::Response( std::move(blobContainerClient), response.ExtractRawResponse()); diff --git a/sdk/storage/azure-storage-blobs/src/block_blob_client.cpp b/sdk/storage/azure-storage-blobs/src/block_blob_client.cpp index 56eed317b..5907f98a1 100644 --- a/sdk/storage/azure-storage-blobs/src/block_blob_client.cpp +++ b/sdk/storage/azure-storage-blobs/src/block_blob_client.cpp @@ -102,7 +102,7 @@ namespace Azure { namespace Storage { namespace Blobs { } protocolLayerOptions.EncryptionScope = m_encryptionScope; return _detail::BlobRestClient::BlockBlob::Upload( - context, *m_pipeline, m_blobUrl, content, protocolLayerOptions); + *m_pipeline, m_blobUrl, content, protocolLayerOptions, context); } Azure::Response BlockBlobClient::UploadFrom( @@ -258,7 +258,7 @@ namespace Azure { namespace Storage { namespace Blobs { } protocolLayerOptions.EncryptionScope = m_encryptionScope; return _detail::BlobRestClient::BlockBlob::StageBlock( - context, *m_pipeline, m_blobUrl, content, protocolLayerOptions); + *m_pipeline, m_blobUrl, content, protocolLayerOptions, context); } Azure::Response BlockBlobClient::StageBlockFromUri( @@ -285,7 +285,7 @@ namespace Azure { namespace Storage { namespace Blobs { } protocolLayerOptions.EncryptionScope = m_encryptionScope; return _detail::BlobRestClient::BlockBlob::StageBlockFromUri( - context, *m_pipeline, m_blobUrl, protocolLayerOptions); + *m_pipeline, m_blobUrl, protocolLayerOptions, context); } Azure::Response BlockBlobClient::CommitBlockList( @@ -316,7 +316,7 @@ namespace Azure { namespace Storage { namespace Blobs { } protocolLayerOptions.EncryptionScope = m_encryptionScope; return _detail::BlobRestClient::BlockBlob::CommitBlockList( - context, *m_pipeline, m_blobUrl, protocolLayerOptions); + *m_pipeline, m_blobUrl, protocolLayerOptions, context); } Azure::Response BlockBlobClient::GetBlockList( @@ -328,7 +328,7 @@ namespace Azure { namespace Storage { namespace Blobs { protocolLayerOptions.LeaseId = options.AccessConditions.LeaseId; protocolLayerOptions.IfTags = options.AccessConditions.TagConditions; return _detail::BlobRestClient::BlockBlob::GetBlockList( - Storage::_detail::WithReplicaStatus(context), *m_pipeline, m_blobUrl, protocolLayerOptions); + *m_pipeline, m_blobUrl, protocolLayerOptions, Storage::_detail::WithReplicaStatus(context)); } }}} // namespace Azure::Storage::Blobs diff --git a/sdk/storage/azure-storage-blobs/src/page_blob_client.cpp b/sdk/storage/azure-storage-blobs/src/page_blob_client.cpp index 6f08225f1..804b29a4e 100644 --- a/sdk/storage/azure-storage-blobs/src/page_blob_client.cpp +++ b/sdk/storage/azure-storage-blobs/src/page_blob_client.cpp @@ -101,7 +101,7 @@ namespace Azure { namespace Storage { namespace Blobs { } protocolLayerOptions.EncryptionScope = m_encryptionScope; return _detail::BlobRestClient::PageBlob::Create( - context, *m_pipeline, m_blobUrl, protocolLayerOptions); + *m_pipeline, m_blobUrl, protocolLayerOptions, context); } Azure::Response PageBlobClient::CreateIfNotExists( @@ -154,7 +154,7 @@ namespace Azure { namespace Storage { namespace Blobs { } protocolLayerOptions.EncryptionScope = m_encryptionScope; return _detail::BlobRestClient::PageBlob::UploadPages( - context, *m_pipeline, m_blobUrl, content, protocolLayerOptions); + *m_pipeline, m_blobUrl, content, protocolLayerOptions, context); } Azure::Response PageBlobClient::UploadPagesFromUri( @@ -184,7 +184,7 @@ namespace Azure { namespace Storage { namespace Blobs { } protocolLayerOptions.EncryptionScope = m_encryptionScope; return _detail::BlobRestClient::PageBlob::UploadPagesFromUri( - context, *m_pipeline, m_blobUrl, protocolLayerOptions); + *m_pipeline, m_blobUrl, protocolLayerOptions, context); } Azure::Response PageBlobClient::ClearPages( @@ -208,7 +208,7 @@ namespace Azure { namespace Storage { namespace Blobs { } protocolLayerOptions.EncryptionScope = m_encryptionScope; return _detail::BlobRestClient::PageBlob::ClearPages( - context, *m_pipeline, m_blobUrl, protocolLayerOptions); + *m_pipeline, m_blobUrl, protocolLayerOptions, context); } Azure::Response PageBlobClient::Resize( @@ -232,7 +232,7 @@ namespace Azure { namespace Storage { namespace Blobs { } protocolLayerOptions.EncryptionScope = m_encryptionScope; return _detail::BlobRestClient::PageBlob::Resize( - context, *m_pipeline, m_blobUrl, protocolLayerOptions); + *m_pipeline, m_blobUrl, protocolLayerOptions, context); } Azure::Response PageBlobClient::GetPageRanges( @@ -248,7 +248,7 @@ namespace Azure { namespace Storage { namespace Blobs { protocolLayerOptions.IfNoneMatch = options.AccessConditions.IfNoneMatch; protocolLayerOptions.IfTags = options.AccessConditions.TagConditions; return _detail::BlobRestClient::PageBlob::GetPageRanges( - Storage::_detail::WithReplicaStatus(context), *m_pipeline, m_blobUrl, protocolLayerOptions); + *m_pipeline, m_blobUrl, protocolLayerOptions, Storage::_detail::WithReplicaStatus(context)); } Azure::Response PageBlobClient::GetPageRangesDiff( @@ -266,7 +266,7 @@ namespace Azure { namespace Storage { namespace Blobs { protocolLayerOptions.IfNoneMatch = options.AccessConditions.IfNoneMatch; protocolLayerOptions.IfTags = options.AccessConditions.TagConditions; return _detail::BlobRestClient::PageBlob::GetPageRanges( - Storage::_detail::WithReplicaStatus(context), *m_pipeline, m_blobUrl, protocolLayerOptions); + *m_pipeline, m_blobUrl, protocolLayerOptions, Storage::_detail::WithReplicaStatus(context)); } Azure::Response PageBlobClient::GetManagedDiskPageRangesDiff( @@ -284,7 +284,7 @@ namespace Azure { namespace Storage { namespace Blobs { protocolLayerOptions.IfNoneMatch = options.AccessConditions.IfNoneMatch; protocolLayerOptions.IfTags = options.AccessConditions.TagConditions; return _detail::BlobRestClient::PageBlob::GetPageRanges( - Storage::_detail::WithReplicaStatus(context), *m_pipeline, m_blobUrl, protocolLayerOptions); + *m_pipeline, m_blobUrl, protocolLayerOptions, Storage::_detail::WithReplicaStatus(context)); } StartCopyBlobOperation PageBlobClient::StartCopyIncremental( @@ -301,7 +301,7 @@ namespace Azure { namespace Storage { namespace Blobs { protocolLayerOptions.IfTags = options.AccessConditions.TagConditions; auto response = _detail::BlobRestClient::PageBlob::StartCopyIncremental( - context, *m_pipeline, m_blobUrl, protocolLayerOptions); + *m_pipeline, m_blobUrl, protocolLayerOptions, context); StartCopyBlobOperation res; res.m_rawResponse = response.ExtractRawResponse(); res.RequestId = std::move(response->RequestId); diff --git a/sdk/storage/azure-storage-blobs/test/ut/append_blob_client_test.cpp b/sdk/storage/azure-storage-blobs/test/ut/append_blob_client_test.cpp index c3fc07dcd..c70b92041 100644 --- a/sdk/storage/azure-storage-blobs/test/ut/append_blob_client_test.cpp +++ b/sdk/storage/azure-storage-blobs/test/ut/append_blob_client_test.cpp @@ -54,7 +54,6 @@ namespace Azure { namespace Storage { namespace Test { EXPECT_FALSE(blobContentInfo->EncryptionKeySha256.HasValue()); auto properties = *appendBlobClient.GetProperties(); - EXPECT_FALSE(properties.RequestId.empty()); EXPECT_TRUE(properties.CommittedBlockCount.HasValue()); EXPECT_EQ(properties.CommittedBlockCount.GetValue(), 0); EXPECT_EQ(properties.BlobSize, 0); diff --git a/sdk/storage/azure-storage-blobs/test/ut/blob_container_client_test.cpp b/sdk/storage/azure-storage-blobs/test/ut/blob_container_client_test.cpp index a79bcee51..4b50e706a 100644 --- a/sdk/storage/azure-storage-blobs/test/ut/blob_container_client_test.cpp +++ b/sdk/storage/azure-storage-blobs/test/ut/blob_container_client_test.cpp @@ -116,7 +116,6 @@ namespace Azure { namespace Storage { namespace Test { EXPECT_TRUE(IsValidTime(res->LastModified)); auto res2 = m_blobContainerClient->GetProperties(); - EXPECT_FALSE(res2->RequestId.empty()); EXPECT_FALSE(res2.GetRawResponse().GetHeaders().at(_detail::HttpHeaderRequestId).empty()); EXPECT_FALSE(res2.GetRawResponse().GetHeaders().at(_detail::HttpHeaderDate).empty()); EXPECT_FALSE(res2.GetRawResponse().GetHeaders().at(_detail::HttpHeaderXMsVersion).empty()); @@ -404,9 +403,6 @@ namespace Azure { namespace Storage { namespace Test { EXPECT_TRUE(IsValidTime(ret->LastModified)); auto ret2 = container_client.GetAccessPolicy(); - EXPECT_FALSE(ret2->RequestId.empty()); - EXPECT_EQ(ret2->ETag, ret->ETag); - EXPECT_EQ(ret2->LastModified, ret->LastModified); EXPECT_EQ(ret2->AccessType, options.AccessType); EXPECT_EQ(ret2->SignedIdentifiers, options.SignedIdentifiers); diff --git a/sdk/storage/azure-storage-blobs/test/ut/blob_sas_test.cpp b/sdk/storage/azure-storage-blobs/test/ut/blob_sas_test.cpp index 95b84e995..160bb9d03 100644 --- a/sdk/storage/azure-storage-blobs/test/ut/blob_sas_test.cpp +++ b/sdk/storage/azure-storage-blobs/test/ut/blob_sas_test.cpp @@ -52,7 +52,7 @@ namespace Azure { namespace Storage { namespace Test { serviceUrl, std::make_shared( AadTenantId(), AadClientId(), AadClientSecret())); - auto userDelegationKey = blobServiceClient1.GetUserDelegationKey(sasExpiresOn)->Key; + auto userDelegationKey = *blobServiceClient1.GetUserDelegationKey(sasExpiresOn); auto verify_blob_read = [&](const std::string& sas) { EXPECT_NO_THROW(blobClient0.Create()); diff --git a/sdk/storage/azure-storage-blobs/test/ut/blob_service_client_test.cpp b/sdk/storage/azure-storage-blobs/test/ut/blob_service_client_test.cpp index 7e3893b42..db2c2ac80 100644 --- a/sdk/storage/azure-storage-blobs/test/ut/blob_service_client_test.cpp +++ b/sdk/storage/azure-storage-blobs/test/ut/blob_service_client_test.cpp @@ -169,7 +169,6 @@ namespace Azure { namespace Storage { namespace Test { TEST_F(BlobServiceClientTest, GetProperties) { auto ret = m_blobServiceClient.GetProperties(); - EXPECT_FALSE(ret->RequestId.empty()); auto properties = *ret; auto logging = properties.Logging; EXPECT_FALSE(logging.Version.empty()); @@ -322,7 +321,6 @@ namespace Azure { namespace Storage { namespace Test { TEST_F(BlobServiceClientTest, AccountInfo) { auto accountInfo = *m_blobServiceClient.GetAccountInfo(); - EXPECT_FALSE(accountInfo.RequestId.empty()); EXPECT_FALSE(accountInfo.SkuName.ToString().empty()); EXPECT_FALSE(accountInfo.AccountKind.ToString().empty()); EXPECT_FALSE(accountInfo.IsHierarchicalNamespaceEnabled); @@ -342,7 +340,6 @@ namespace Azure { namespace Storage { namespace Test { auto secondaryServiceClient = Blobs::BlobServiceClient(InferSecondaryUrl(m_blobServiceClient.GetUrl()), keyCredential); auto serviceStatistics = *secondaryServiceClient.GetStatistics(); - EXPECT_FALSE(serviceStatistics.RequestId.empty()); EXPECT_FALSE(serviceStatistics.GeoReplication.Status.ToString().empty()); if (serviceStatistics.GeoReplication.LastSyncedOn.HasValue()) { @@ -432,11 +429,8 @@ namespace Azure { namespace Storage { namespace Test { std::make_shared( AadTenantId(), AadClientId(), AadClientSecret())); - auto getUserDelegationKeyResult = blobServiceClient1.GetUserDelegationKey(sasExpiresOn); + auto userDelegationKey = *blobServiceClient1.GetUserDelegationKey(sasExpiresOn); - EXPECT_FALSE(getUserDelegationKeyResult->RequestId.empty()); - - auto userDelegationKey = getUserDelegationKeyResult->Key; EXPECT_FALSE(userDelegationKey.SignedObjectId.empty()); EXPECT_FALSE(userDelegationKey.SignedTenantId.empty()); EXPECT_TRUE(IsValidTime(userDelegationKey.SignedStartsOn)); diff --git a/sdk/storage/azure-storage-blobs/test/ut/block_blob_client_test.cpp b/sdk/storage/azure-storage-blobs/test/ut/block_blob_client_test.cpp index 398c7c795..5f82ae39d 100644 --- a/sdk/storage/azure-storage-blobs/test/ut/block_blob_client_test.cpp +++ b/sdk/storage/azure-storage-blobs/test/ut/block_blob_client_test.cpp @@ -372,7 +372,6 @@ namespace Azure { namespace Storage { namespace Test { blockBlobClient.SetHttpHeaders(m_blobUploadOptions.HttpHeaders); auto res = blockBlobClient.GetProperties(); - EXPECT_FALSE(res->RequestId.empty()); EXPECT_FALSE(res.GetRawResponse().GetHeaders().at(_detail::HttpHeaderRequestId).empty()); EXPECT_FALSE(res.GetRawResponse().GetHeaders().at(_detail::HttpHeaderDate).empty()); EXPECT_FALSE(res.GetRawResponse().GetHeaders().at(_detail::HttpHeaderXMsVersion).empty()); diff --git a/sdk/storage/azure-storage-files-datalake/CHANGELOG.md b/sdk/storage/azure-storage-files-datalake/CHANGELOG.md index 5e916f959..39915edca 100644 --- a/sdk/storage/azure-storage-files-datalake/CHANGELOG.md +++ b/sdk/storage/azure-storage-files-datalake/CHANGELOG.md @@ -12,6 +12,10 @@ - DataLake client constructors won't automatically convert blob url to dfs url anymore. - String conversion functions of extensible enums were renamed from `Get()` to `ToString()`. - Moved `SecondaryHostForRetryReads` out of retry options, now it's under `DataLakeClientOptions`. +- Changed return type of `DataLakeServiceClient::GetUserDelegationKey` to `UserDelegationKey`. +- Changed return type of `DataLakeFileSystemClient::GetProperties` to `DataLakeFileSystemProperties`. +- Changed return type of `DataLakeFileSystemClient::GetAccessPolicy` to `DataLakeFileSystemAccessPolicy`. +- Changed return type of `DataLakePathClient::GetProperties` to `DataLakePathProperties`. ## 12.0.0-beta.8 (2021-02-12) diff --git a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_file_system_client.hpp b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_file_system_client.hpp index 05c7d83b5..09b812786 100644 --- a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_file_system_client.hpp +++ b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_file_system_client.hpp @@ -159,11 +159,11 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { * @brief Gets the properties of file system. * @param options Optional parameters to get the metadata of this file system. * @param context Context for cancelling long running operations. - * @return Azure::Response containing the + * @return Azure::Response containing the * information when getting the file system's properties. * @remark This request is sent to blob endpoint. */ - Azure::Response GetProperties( + Azure::Response GetProperties( const GetDataLakeFileSystemPropertiesOptions& options = GetDataLakeFileSystemPropertiesOptions(), const Azure::Core::Context& context = Azure::Core::Context()) const; @@ -189,10 +189,10 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { * * @param options Optional parameters to execute this function. * @param context Context for cancelling long running operations. - * @return A GetDataLakeFileSystemAccessPolicyResult describing the container's access policy. + * @return A DataLakeFileSystemAccessPolicy describing the container's access policy. * @remark This request is sent to blob endpoint. */ - Azure::Response GetAccessPolicy( + Azure::Response GetAccessPolicy( const GetDataLakeFileSystemAccessPolicyOptions& options = GetDataLakeFileSystemAccessPolicyOptions(), const Azure::Core::Context& context = Azure::Core::Context()) const; diff --git a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_path_client.hpp b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_path_client.hpp index 131e96ea8..1d2e6f5cd 100644 --- a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_path_client.hpp +++ b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_path_client.hpp @@ -186,11 +186,11 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { * @param options Optional parameters to get the properties from the resource the path points * to. * @param context Context for cancelling long running operations. - * @return Azure::Response containing the + * @return Azure::Response containing the * properties of the path. * @remark This request is sent to blob endpoint. */ - Azure::Response GetProperties( + Azure::Response GetProperties( const GetDataLakePathPropertiesOptions& options = GetDataLakePathPropertiesOptions(), const Azure::Core::Context& context = Azure::Core::Context()) const; diff --git a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_responses.hpp b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_responses.hpp index 3d48d8606..4dd124b80 100644 --- a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_responses.hpp +++ b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_responses.hpp @@ -15,7 +15,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { nam // ServiceClient models: - using GetUserDelegationKeyResult = Blobs::Models::GetUserDelegationKeyResult; + using GetUserDelegationKeyResult = Blobs::Models::UserDelegationKey; using UserDelegationKey = Blobs::Models::UserDelegationKey; struct FileSystemItemDetails @@ -52,23 +52,19 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { nam using DataLakeSignedIdentifier = Blobs::Models::BlobSignedIdentifier; using ListDataLakeFileSystemsIncludeFlags = Blobs::Models::ListBlobContainersIncludeFlags; - struct GetDataLakeFileSystemAccessPolicyResult + struct DataLakeFileSystemAccessPolicy { PublicAccessType AccessType = PublicAccessType::None; - Azure::ETag ETag; - Azure::DateTime LastModified; std::vector SignedIdentifiers; - std::string RequestId; - }; // struct GetDataLakeFileSystemAccessPolicyResult + }; // struct DataLakeFileSystemAccessPolciy using SetDataLakeFileSystemAccessPolicyResult = Blobs::Models::SetBlobContainerAccessPolicyResult; - struct GetDataLakeFileSystemPropertiesResult + struct DataLakeFileSystemProperties { Azure::ETag ETag; DateTime LastModified; Storage::Metadata Metadata; - std::string RequestId; }; struct CreateDataLakeFileSystemResult @@ -144,7 +140,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { nam static std::string SerializeAcls(const std::vector& dataLakeAclsArray); }; - struct GetDataLakePathPropertiesResult + struct DataLakePathProperties { Azure::ETag ETag; DateTime LastModified; @@ -174,7 +170,6 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { nam Azure::Nullable IncrementalCopyDestinationSnapshot; Azure::Nullable VersionId; Azure::Nullable IsCurrentVersion; - std::string RequestId; }; struct GetDataLakePathAccessControlListResult diff --git a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_service_client.hpp b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_service_client.hpp index 861e4b778..1a2bbc4ac 100644 --- a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_service_client.hpp +++ b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_service_client.hpp @@ -98,11 +98,11 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { * will be truncated to second. * @param options Optional parameters to execute this function. * @param context Context for cancelling long running operations. - * @return Azure::Response containing the user + * @return Azure::Response containing the user * delegation key related information. * @remark This request is sent to blob endpoint. */ - Azure::Response GetUserDelegationKey( + Azure::Response GetUserDelegationKey( const Azure::DateTime& expiresOn, const GetUserDelegationKeyOptions& options = GetUserDelegationKeyOptions(), const Azure::Core::Context& context = Azure::Core::Context()) const diff --git a/sdk/storage/azure-storage-files-datalake/src/datalake_file_client.cpp b/sdk/storage/azure-storage-files-datalake/src/datalake_file_client.cpp index 88e38f303..67695e65d 100644 --- a/sdk/storage/azure-storage-files-datalake/src/datalake_file_client.cpp +++ b/sdk/storage/azure-storage-files-datalake/src/datalake_file_client.cpp @@ -397,7 +397,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { protocolLayerOptions.ExpiryTime = std::to_string(options.TimeToExpire.GetValue().count()); } return Blobs::_detail::BlobRestClient::Blob::ScheduleDeletion( - context, *m_pipeline, m_blobClient.m_blobUrl, protocolLayerOptions); + *m_pipeline, m_blobClient.m_blobUrl, protocolLayerOptions, context); } }}}} // namespace Azure::Storage::Files::DataLake diff --git a/sdk/storage/azure-storage-files-datalake/src/datalake_file_system_client.cpp b/sdk/storage/azure-storage-files-datalake/src/datalake_file_system_client.cpp index 29d1b51b9..625ec0a31 100644 --- a/sdk/storage/azure-storage-files-datalake/src/datalake_file_system_client.cpp +++ b/sdk/storage/azure-storage-files-datalake/src/datalake_file_system_client.cpp @@ -245,20 +245,18 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { } } - Azure::Response - DataLakeFileSystemClient::GetProperties( + Azure::Response DataLakeFileSystemClient::GetProperties( const GetDataLakeFileSystemPropertiesOptions& options, const Azure::Core::Context& context) const { Blobs::GetBlobContainerPropertiesOptions blobOptions; blobOptions.AccessConditions.LeaseId = options.AccessConditions.LeaseId; auto result = m_blobContainerClient.GetProperties(blobOptions, context); - Models::GetDataLakeFileSystemPropertiesResult ret; + Models::DataLakeFileSystemProperties ret; ret.ETag = std::move(result->ETag); ret.LastModified = std::move(result->LastModified); ret.Metadata = std::move(result->Metadata); - ret.RequestId = std::move(result->RequestId); - return Azure::Response( + return Azure::Response( std::move(ret), result.ExtractRawResponse()); } @@ -301,37 +299,33 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { protocolLayerOptions); } - Azure::Response - DataLakeFileSystemClient::GetAccessPolicy( + Azure::Response DataLakeFileSystemClient::GetAccessPolicy( const GetDataLakeFileSystemAccessPolicyOptions& options, const Azure::Core::Context& context) const { Blobs::GetBlobContainerAccessPolicyOptions blobOptions; blobOptions.AccessConditions.LeaseId = options.AccessConditions.LeaseId; - auto result = m_blobContainerClient.GetAccessPolicy(blobOptions, context); - Models::GetDataLakeFileSystemAccessPolicyResult ret; - if (result->AccessType == Blobs::Models::PublicAccessType::BlobContainer) + auto response = m_blobContainerClient.GetAccessPolicy(blobOptions, context); + Models::DataLakeFileSystemAccessPolicy ret; + if (response->AccessType == Blobs::Models::PublicAccessType::BlobContainer) { ret.AccessType = Models::PublicAccessType::FileSystem; } - else if (result->AccessType == Blobs::Models::PublicAccessType::Blob) + else if (response->AccessType == Blobs::Models::PublicAccessType::Blob) { ret.AccessType = Models::PublicAccessType::Path; } - else if (result->AccessType == Blobs::Models::PublicAccessType::None) + else if (response->AccessType == Blobs::Models::PublicAccessType::None) { ret.AccessType = Models::PublicAccessType::None; } else { - ret.AccessType = Models::PublicAccessType(result->AccessType.ToString()); + ret.AccessType = Models::PublicAccessType(response->AccessType.ToString()); } - ret.ETag = std::move(result->ETag); - ret.LastModified = std::move(result->LastModified); - ret.SignedIdentifiers = std::move(result->SignedIdentifiers); - ret.RequestId = std::move(result->RequestId); - return Azure::Response( - std::move(ret), result.ExtractRawResponse()); + ret.SignedIdentifiers = std::move(response->SignedIdentifiers); + return Azure::Response( + std::move(ret), response.ExtractRawResponse()); } Azure::Response diff --git a/sdk/storage/azure-storage-files-datalake/src/datalake_path_client.cpp b/sdk/storage/azure-storage-files-datalake/src/datalake_path_client.cpp index 9286c8399..b50136cd3 100644 --- a/sdk/storage/azure-storage-files-datalake/src/datalake_path_client.cpp +++ b/sdk/storage/azure-storage-files-datalake/src/datalake_path_client.cpp @@ -334,7 +334,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { } } - Azure::Response DataLakePathClient::GetProperties( + Azure::Response DataLakePathClient::GetProperties( const GetDataLakePathPropertiesOptions& options, const Azure::Core::Context& context) const { @@ -345,7 +345,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { blobOptions.AccessConditions.IfUnmodifiedSince = options.AccessConditions.IfUnmodifiedSince; blobOptions.AccessConditions.LeaseId = options.AccessConditions.LeaseId; auto result = m_blobClient.GetProperties(blobOptions, context); - Models::GetDataLakePathPropertiesResult ret; + Models::DataLakePathProperties ret; ret.ETag = std::move(result->ETag); ret.LastModified = std::move(result->LastModified); ret.CreatedOn = std::move(result->CreatedOn); @@ -377,7 +377,6 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { ret.ExpiresOn = std::move(result->ExpiresOn); ret.LastAccessedOn = std::move(result->LastAccessedOn); ret.FileSize = result->BlobSize; - ret.RequestId = std::move(result->RequestId); ret.ArchiveStatus = std::move(result->ArchiveStatus); ret.RehydratePriority = std::move(result->RehydratePriority); ret.CopyStatusDescription = std::move(result->CopyStatusDescription); @@ -386,7 +385,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { ret.VersionId = std::move(result->VersionId); ret.IsCurrentVersion = std::move(result->IsCurrentVersion); ret.IsDirectory = _detail::MetadataIncidatesIsDirectory(ret.Metadata); - return Azure::Response( + return Azure::Response( std::move(ret), result.ExtractRawResponse()); } diff --git a/sdk/storage/azure-storage-files-datalake/test/datalake_file_system_client_test.cpp b/sdk/storage/azure-storage-files-datalake/test/datalake_file_system_client_test.cpp index acf3bb75e..78190eff0 100644 --- a/sdk/storage/azure-storage-files-datalake/test/datalake_file_system_client_test.cpp +++ b/sdk/storage/azure-storage-files-datalake/test/datalake_file_system_client_test.cpp @@ -392,8 +392,6 @@ namespace Azure { namespace Storage { namespace Test { EXPECT_TRUE(IsValidTime(ret->LastModified)); auto ret2 = fileSystem.GetAccessPolicy(); - EXPECT_EQ(ret2->ETag, ret->ETag); - EXPECT_EQ(ret2->LastModified, ret->LastModified); EXPECT_EQ(ret2->AccessType, options.AccessType); for (size_t i = 0; i < ret2->SignedIdentifiers.size(); ++i) { diff --git a/sdk/storage/azure-storage-files-datalake/test/datalake_sas_test.cpp b/sdk/storage/azure-storage-files-datalake/test/datalake_sas_test.cpp index 854ea28fd..d2ef1e58b 100644 --- a/sdk/storage/azure-storage-files-datalake/test/datalake_sas_test.cpp +++ b/sdk/storage/azure-storage-files-datalake/test/datalake_sas_test.cpp @@ -62,7 +62,7 @@ namespace Azure { namespace Storage { namespace Test { serviceUrl, std::make_shared( AadTenantId(), AadClientId(), AadClientSecret())); - auto userDelegationKey = serviceClient1.GetUserDelegationKey(sasExpiresOn)->Key; + auto userDelegationKey = *serviceClient1.GetUserDelegationKey(sasExpiresOn); auto verify_file_read = [&](const std::string& sas) { EXPECT_NO_THROW(fileClient0.Create());