diff --git a/sdk/storage/azure-storage-blobs/CHANGELOG.md b/sdk/storage/azure-storage-blobs/CHANGELOG.md index f79cc6d51..d6d3ede39 100644 --- a/sdk/storage/azure-storage-blobs/CHANGELOG.md +++ b/sdk/storage/azure-storage-blobs/CHANGELOG.md @@ -19,6 +19,8 @@ - Return types of `BlobClient::StartCopyFromUri` and `PageBlobClient::StartCopyIncremental` were changed to `StartCopyBlobResult`, supporting poll operations. - Fixed typo `Expiries` in model types. - Removed `PreviousContinuationToken` from `ListBlobContainersSinglePageResult`, `ListBlobsByHierarchySinglePageResult` and `ListBlobsSinglePageResult`. +- `ListBlobContainersIncludeItem` was renamed to `ListBlobContainersIncludeFlags`. +- `ListBlobsIncludeItem` was renamed to `ListBlobsIncludeFlags`. ## 12.0.0-beta.6 (2020-01-14) diff --git a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_options.hpp b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_options.hpp index ebaa9b524..e703eea98 100644 --- a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_options.hpp +++ b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_options.hpp @@ -191,7 +191,7 @@ namespace Azure { namespace Storage { namespace Blobs { /** * @brief Specifies that the container's metadata be returned. */ - Models::ListBlobContainersIncludeItem Include = Models::ListBlobContainersIncludeItem::None; + Models::ListBlobContainersIncludeFlags Include = Models::ListBlobContainersIncludeFlags::None; }; /** @@ -419,7 +419,7 @@ namespace Azure { namespace Storage { namespace Blobs { /** * @brief Specifies one or more datasets to include in the response. */ - Models::ListBlobsIncludeItem Include = Models::ListBlobsIncludeItem::None; + Models::ListBlobsIncludeFlags Include = Models::ListBlobsIncludeFlags::None; }; /** 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 69af82430..42b41a882 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 @@ -441,48 +441,48 @@ namespace Azure { namespace Storage { namespace Blobs { std::vector ClearRanges; }; // struct GetPageBlobPageRangesResult - enum class ListBlobContainersIncludeItem + enum class ListBlobContainersIncludeFlags { None = 0, Metadata = 1, Deleted = 2, - }; // bitwise enum ListBlobContainersIncludeItem + }; // bitwise enum ListBlobContainersIncludeFlags - inline ListBlobContainersIncludeItem operator|( - ListBlobContainersIncludeItem lhs, - ListBlobContainersIncludeItem rhs) + inline ListBlobContainersIncludeFlags operator|( + ListBlobContainersIncludeFlags lhs, + ListBlobContainersIncludeFlags rhs) { - using type = std::underlying_type_t; - return static_cast( + using type = std::underlying_type_t; + return static_cast( static_cast(lhs) | static_cast(rhs)); } - inline ListBlobContainersIncludeItem& operator|=( - ListBlobContainersIncludeItem& lhs, - ListBlobContainersIncludeItem rhs) + inline ListBlobContainersIncludeFlags& operator|=( + ListBlobContainersIncludeFlags& lhs, + ListBlobContainersIncludeFlags rhs) { lhs = lhs | rhs; return lhs; } - inline ListBlobContainersIncludeItem operator&( - ListBlobContainersIncludeItem lhs, - ListBlobContainersIncludeItem rhs) + inline ListBlobContainersIncludeFlags operator&( + ListBlobContainersIncludeFlags lhs, + ListBlobContainersIncludeFlags rhs) { - using type = std::underlying_type_t; - return static_cast( + using type = std::underlying_type_t; + return static_cast( static_cast(lhs) & static_cast(rhs)); } - inline ListBlobContainersIncludeItem& operator&=( - ListBlobContainersIncludeItem& lhs, - ListBlobContainersIncludeItem rhs) + inline ListBlobContainersIncludeFlags& operator&=( + ListBlobContainersIncludeFlags& lhs, + ListBlobContainersIncludeFlags rhs) { lhs = lhs & rhs; return lhs; } - enum class ListBlobsIncludeItem + enum class ListBlobsIncludeFlags { None = 0, Copy = 1, @@ -491,27 +491,27 @@ namespace Azure { namespace Storage { namespace Blobs { Snapshots = 8, Versions = 16, UncomittedBlobs = 32, - }; // bitwise enum ListBlobsIncludeItem + }; // bitwise enum ListBlobsIncludeFlags - inline ListBlobsIncludeItem operator|(ListBlobsIncludeItem lhs, ListBlobsIncludeItem rhs) + inline ListBlobsIncludeFlags operator|(ListBlobsIncludeFlags lhs, ListBlobsIncludeFlags rhs) { - using type = std::underlying_type_t; - return static_cast(static_cast(lhs) | static_cast(rhs)); + using type = std::underlying_type_t; + return static_cast(static_cast(lhs) | static_cast(rhs)); } - inline ListBlobsIncludeItem& operator|=(ListBlobsIncludeItem& lhs, ListBlobsIncludeItem rhs) + inline ListBlobsIncludeFlags& operator|=(ListBlobsIncludeFlags& lhs, ListBlobsIncludeFlags rhs) { lhs = lhs | rhs; return lhs; } - inline ListBlobsIncludeItem operator&(ListBlobsIncludeItem lhs, ListBlobsIncludeItem rhs) + inline ListBlobsIncludeFlags operator&(ListBlobsIncludeFlags lhs, ListBlobsIncludeFlags rhs) { - using type = std::underlying_type_t; - return static_cast(static_cast(lhs) & static_cast(rhs)); + using type = std::underlying_type_t; + return static_cast(static_cast(lhs) & static_cast(rhs)); } - inline ListBlobsIncludeItem& operator&=(ListBlobsIncludeItem& lhs, ListBlobsIncludeItem rhs) + inline ListBlobsIncludeFlags& operator&=(ListBlobsIncludeFlags& lhs, ListBlobsIncludeFlags rhs) { lhs = lhs & rhs; return lhs; @@ -1140,19 +1140,19 @@ namespace Azure { namespace Storage { namespace Blobs { using namespace Models; - inline std::string ListBlobContainersIncludeItemToString( - const ListBlobContainersIncludeItem& val) + inline std::string ListBlobContainersIncludeFlagsToString( + const ListBlobContainersIncludeFlags& val) { - ListBlobContainersIncludeItem value_list[] = { - ListBlobContainersIncludeItem::Metadata, - ListBlobContainersIncludeItem::Deleted, + ListBlobContainersIncludeFlags value_list[] = { + ListBlobContainersIncludeFlags::Metadata, + ListBlobContainersIncludeFlags::Deleted, }; const char* string_list[] = { "metadata", "deleted", }; std::string ret; - for (std::size_t i = 0; i < sizeof(value_list) / sizeof(ListBlobContainersIncludeItem); ++i) + for (std::size_t i = 0; i < sizeof(value_list) / sizeof(ListBlobContainersIncludeFlags); ++i) { if ((val & value_list[i]) == value_list[i]) { @@ -1166,15 +1166,15 @@ namespace Azure { namespace Storage { namespace Blobs { return ret; } - inline std::string ListBlobsIncludeItemToString(const ListBlobsIncludeItem& val) + inline std::string ListBlobsIncludeFlagsToString(const ListBlobsIncludeFlags& val) { - ListBlobsIncludeItem value_list[] = { - ListBlobsIncludeItem::Copy, - ListBlobsIncludeItem::Deleted, - ListBlobsIncludeItem::Metadata, - ListBlobsIncludeItem::Snapshots, - ListBlobsIncludeItem::Versions, - ListBlobsIncludeItem::UncomittedBlobs, + ListBlobsIncludeFlags value_list[] = { + ListBlobsIncludeFlags::Copy, + ListBlobsIncludeFlags::Deleted, + ListBlobsIncludeFlags::Metadata, + ListBlobsIncludeFlags::Snapshots, + ListBlobsIncludeFlags::Versions, + ListBlobsIncludeFlags::UncomittedBlobs, }; const char* string_list[] = { "copy", @@ -1185,7 +1185,7 @@ namespace Azure { namespace Storage { namespace Blobs { "uncommittedblobs", }; std::string ret; - for (std::size_t i = 0; i < sizeof(value_list) / sizeof(ListBlobsIncludeItem); ++i) + for (std::size_t i = 0; i < sizeof(value_list) / sizeof(ListBlobsIncludeFlags); ++i) { if ((val & value_list[i]) == value_list[i]) { @@ -1209,7 +1209,7 @@ namespace Azure { namespace Storage { namespace Blobs { Azure::Core::Nullable Prefix; Azure::Core::Nullable ContinuationToken; Azure::Core::Nullable MaxResults; - ListBlobContainersIncludeItem Include = ListBlobContainersIncludeItem::None; + ListBlobContainersIncludeFlags Include = ListBlobContainersIncludeFlags::None; }; // struct ListBlobContainersSinglePageOptions static Azure::Core::Response @@ -1244,13 +1244,13 @@ namespace Azure { namespace Storage { namespace Blobs { request.GetUrl().AppendQueryParameter( "maxresults", std::to_string(options.MaxResults.GetValue())); } - std::string list_blob_containers_include_item - = ListBlobContainersIncludeItemToString(options.Include); - if (!list_blob_containers_include_item.empty()) + std::string list_blob_containers_include_flags + = ListBlobContainersIncludeFlagsToString(options.Include); + if (!list_blob_containers_include_flags.empty()) { request.GetUrl().AppendQueryParameter( "include", - Storage::Details::UrlEncodeQueryParameter(list_blob_containers_include_item)); + Storage::Details::UrlEncodeQueryParameter(list_blob_containers_include_flags)); } auto pHttpResponse = pipeline.Send(context, request); Azure::Core::Http::RawResponse& httpResponse = *pHttpResponse; @@ -3376,7 +3376,7 @@ namespace Azure { namespace Storage { namespace Blobs { Azure::Core::Nullable Prefix; Azure::Core::Nullable ContinuationToken; Azure::Core::Nullable MaxResults; - ListBlobsIncludeItem Include = ListBlobsIncludeItem::None; + ListBlobsIncludeFlags Include = ListBlobsIncludeFlags::None; }; // struct ListBlobsSinglePageOptions static Azure::Core::Response ListBlobsSinglePage( @@ -3411,11 +3411,11 @@ namespace Azure { namespace Storage { namespace Blobs { request.GetUrl().AppendQueryParameter( "maxresults", std::to_string(options.MaxResults.GetValue())); } - std::string list_blobs_include_item = ListBlobsIncludeItemToString(options.Include); - if (!list_blobs_include_item.empty()) + std::string list_blobs_include_flags = ListBlobsIncludeFlagsToString(options.Include); + if (!list_blobs_include_flags.empty()) { request.GetUrl().AppendQueryParameter( - "include", Storage::Details::UrlEncodeQueryParameter(list_blobs_include_item)); + "include", Storage::Details::UrlEncodeQueryParameter(list_blobs_include_flags)); } auto pHttpResponse = pipeline.Send(context, request); Azure::Core::Http::RawResponse& httpResponse = *pHttpResponse; @@ -3445,7 +3445,7 @@ namespace Azure { namespace Storage { namespace Blobs { Azure::Core::Nullable Delimiter; Azure::Core::Nullable ContinuationToken; Azure::Core::Nullable MaxResults; - ListBlobsIncludeItem Include = ListBlobsIncludeItem::None; + ListBlobsIncludeFlags Include = ListBlobsIncludeFlags::None; }; // struct ListBlobsByHierarchySinglePageOptions static Azure::Core::Response @@ -3487,11 +3487,11 @@ namespace Azure { namespace Storage { namespace Blobs { request.GetUrl().AppendQueryParameter( "maxresults", std::to_string(options.MaxResults.GetValue())); } - std::string list_blobs_include_item = ListBlobsIncludeItemToString(options.Include); - if (!list_blobs_include_item.empty()) + std::string list_blobs_include_flags = ListBlobsIncludeFlagsToString(options.Include); + if (!list_blobs_include_flags.empty()) { request.GetUrl().AppendQueryParameter( - "include", Storage::Details::UrlEncodeQueryParameter(list_blobs_include_item)); + "include", Storage::Details::UrlEncodeQueryParameter(list_blobs_include_flags)); } auto pHttpResponse = pipeline.Send(context, request); Azure::Core::Http::RawResponse& httpResponse = *pHttpResponse; diff --git a/sdk/storage/azure-storage-blobs/test/blob_container_client_test.cpp b/sdk/storage/azure-storage-blobs/test/blob_container_client_test.cpp index 759747c51..618bbf41f 100644 --- a/sdk/storage/azure-storage-blobs/test/blob_container_client_test.cpp +++ b/sdk/storage/azure-storage-blobs/test/blob_container_client_test.cpp @@ -322,10 +322,10 @@ namespace Azure { namespace Storage { namespace Test { Azure::Storage::Blobs::ListBlobsSinglePageOptions options; options.Prefix = blobName; - options.Include = Blobs::Models::ListBlobsIncludeItem::Snapshots - | Blobs::Models::ListBlobsIncludeItem::Versions - | Blobs::Models::ListBlobsIncludeItem::Deleted - | Blobs::Models::ListBlobsIncludeItem::Metadata; + options.Include = Blobs::Models::ListBlobsIncludeFlags::Snapshots + | Blobs::Models::ListBlobsIncludeFlags::Versions + | Blobs::Models::ListBlobsIncludeFlags::Deleted + | Blobs::Models::ListBlobsIncludeFlags::Metadata; bool foundSnapshot = false; bool foundVersions = false; bool foundCurrentVersion = false; diff --git a/sdk/storage/azure-storage-blobs/test/blob_service_client_test.cpp b/sdk/storage/azure-storage-blobs/test/blob_service_client_test.cpp index 607463a6f..9a99c8908 100644 --- a/sdk/storage/azure-storage-blobs/test/blob_service_client_test.cpp +++ b/sdk/storage/azure-storage-blobs/test/blob_service_client_test.cpp @@ -371,7 +371,7 @@ namespace Azure { namespace Storage { namespace Test { { Azure::Storage::Blobs::ListBlobContainersSinglePageOptions options; options.Prefix = containerName; - options.Include = Blobs::Models::ListBlobContainersIncludeItem::Deleted; + options.Include = Blobs::Models::ListBlobContainersIncludeFlags::Deleted; do { auto res = m_blobServiceClient.ListBlobContainersSinglePage(options); 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 705e3587b..d00a55c5e 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 @@ -45,7 +45,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { nam using ListPathsSinglePageResult = Details::FileSystemListPathsResult; using DataLakeSignedIdentifier = Blobs::Models::BlobSignedIdentifier; - using ListDataLakeFileSystemsIncludeItem = Blobs::Models::ListBlobContainersIncludeItem; + using ListDataLakeFileSystemsIncludeItem = Blobs::Models::ListBlobContainersIncludeFlags; struct GetDataLakeFileSystemAccessPolicyResult {