Use SinglePage suffix for list APIs. (#1242)
* Use SinglePage suffix for list APIs. * changelog * more
This commit is contained in:
parent
14e947ff03
commit
63afecab38
@ -53,6 +53,11 @@
|
||||
- `ServerEncrypted` fields are renamed to `IsServerEncrypted`, and changed to non-nullable type.
|
||||
- Add `Is` prefix to bool variable names. Like `IsAccessTierInferred`, `IsDeleted`.
|
||||
- `IsServerEncrypted`, `EncryptionKeySha256` and `EncryptionScope` are removed from `ClearPageBlobPagesResult`, since they are never returned from storage server.
|
||||
- `ListBlobsFlatSegment` is renamed to `ListBlobsSinglePage`.
|
||||
- `ListBlobsByHierarchySegment` is renamed to `ListBlobsByHierarchySinglePage`.
|
||||
- `ListBlobContainersSegment` is renamed to `ListBlobContainersSinglePage`.
|
||||
- `FindBlobsByTags` is renamed to `FindBlobsByTagsSinglePage`.
|
||||
- `MaxResults` in list APIs are renamed to `PageSizeHint`.
|
||||
|
||||
## 12.0.0-beta.5 (2020-11-13)
|
||||
|
||||
|
||||
@ -211,10 +211,10 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
* enumerating the blobs segment by segment. Blobs are ordered lexicographically by name.
|
||||
*
|
||||
* @param options Optional parameters to execute this function.
|
||||
* @return A ListBlobsFlatSegmentResult describing a segment of the blobs in the container.
|
||||
* @return A ListBlobsSinglePageResult describing a segment of the blobs in the container.
|
||||
*/
|
||||
Azure::Core::Response<Models::ListBlobsFlatSegmentResult> ListBlobsFlatSegment(
|
||||
const ListBlobsSegmentOptions& options = ListBlobsSegmentOptions()) const;
|
||||
Azure::Core::Response<Models::ListBlobsSinglePageResult> ListBlobsSinglePage(
|
||||
const ListBlobsSinglePageOptions& options = ListBlobsSinglePageOptions()) const;
|
||||
|
||||
/**
|
||||
* @brief Returns a single segment of blobs in this container, starting from the
|
||||
@ -227,12 +227,13 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
* @param delimiter This can be used to to traverse a virtual hierarchy of blobs as though it
|
||||
* were a file system. The delimiter may be a single character or a string.
|
||||
* @param options Optional parameters to execute this function.
|
||||
* @return A ListBlobsByHierarchySegmentResult describing a segment of the blobs in the
|
||||
* @return A ListBlobsByHierarchySinglePageResult describing a segment of the blobs in the
|
||||
* container.
|
||||
*/
|
||||
Azure::Core::Response<Models::ListBlobsByHierarchySegmentResult> ListBlobsByHierarchySegment(
|
||||
Azure::Core::Response<Models::ListBlobsByHierarchySinglePageResult>
|
||||
ListBlobsByHierarchySinglePage(
|
||||
const std::string& delimiter,
|
||||
const ListBlobsSegmentOptions& options = ListBlobsSegmentOptions()) const;
|
||||
const ListBlobsSinglePageOptions& options = ListBlobsSinglePageOptions()) const;
|
||||
|
||||
/**
|
||||
* @brief Gets the permissions for this container. The permissions indicate whether
|
||||
|
||||
@ -155,9 +155,9 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Optional parameters for BlobServiceClient::ListBlobContainers.
|
||||
* @brief Optional parameters for BlobServiceClient::ListBlobContainersSinglePage.
|
||||
*/
|
||||
struct ListBlobContainersSegmentOptions
|
||||
struct ListBlobContainersSinglePageOptions
|
||||
{
|
||||
/**
|
||||
* @brief Context for cancelling long running operations.
|
||||
@ -183,7 +183,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
/**
|
||||
* @brief Specifies the maximum number of containers to return.
|
||||
*/
|
||||
Azure::Core::Nullable<int32_t> MaxResults;
|
||||
Azure::Core::Nullable<int32_t> PageSizeHint;
|
||||
|
||||
/**
|
||||
* @brief Specifies that the container's metadata be returned.
|
||||
@ -247,9 +247,9 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Optional parameters for BlobServiceClient::FindBlobsByTags.
|
||||
* @brief Optional parameters for BlobServiceClient::FindBlobsByTagsSinglePage.
|
||||
*/
|
||||
struct FindBlobsByTagsOptions
|
||||
struct FindBlobsByTagsSinglePageOptions
|
||||
{
|
||||
/**
|
||||
* @brief Context for cancelling long running operations.
|
||||
@ -267,7 +267,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
/**
|
||||
* @brief Specifies the maximum number of blobs to return.
|
||||
*/
|
||||
Azure::Core::Nullable<int32_t> MaxResults;
|
||||
Azure::Core::Nullable<int32_t> PageSizeHint;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -363,9 +363,10 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Optional parameters for BlobContainerClient::ListBlobsFlatSegment.
|
||||
* @brief Optional parameters for BlobContainerClient::ListBlobsSinglePage and
|
||||
* BlobContainerClient::ListBlobsByHierarchySinglePage.
|
||||
*/
|
||||
struct ListBlobsSegmentOptions
|
||||
struct ListBlobsSinglePageOptions
|
||||
{
|
||||
/**
|
||||
* @brief Context for cancelling long running operations.
|
||||
@ -391,7 +392,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
/**
|
||||
* @brief Specifies the maximum number of blobs to return.
|
||||
*/
|
||||
Azure::Core::Nullable<int32_t> MaxResults;
|
||||
Azure::Core::Nullable<int32_t> PageSizeHint;
|
||||
|
||||
/**
|
||||
* @brief Specifies one or more datasets to include in the response.
|
||||
|
||||
@ -12,7 +12,6 @@
|
||||
namespace Azure { namespace Storage { namespace Blobs { namespace Models {
|
||||
|
||||
using UserDelegationKey = GetUserDelegationKeyResult;
|
||||
using FindBlobsByTagsResult = FilterBlobsSegmentResult;
|
||||
|
||||
struct DownloadBlobToResult
|
||||
{
|
||||
|
||||
@ -94,11 +94,12 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
* lexicographically by name.
|
||||
*
|
||||
* @param options Optional parameters to execute this function.
|
||||
* @return A ListBlobContainersSegmentResult describing segment of the blob containers in the
|
||||
* @return A ListBlobContainersSinglePageResult describing segment of the blob containers in the
|
||||
* storage account.
|
||||
*/
|
||||
Azure::Core::Response<Models::ListBlobContainersSegmentResult> ListBlobContainersSegment(
|
||||
const ListBlobContainersSegmentOptions& options = ListBlobContainersSegmentOptions()) const;
|
||||
Azure::Core::Response<Models::ListBlobContainersSinglePageResult> ListBlobContainersSinglePage(
|
||||
const ListBlobContainersSinglePageOptions& options
|
||||
= ListBlobContainersSinglePageOptions()) const;
|
||||
|
||||
/**
|
||||
* @brief Retrieves a key that can be used to delegate Active Directory authorization to
|
||||
@ -173,11 +174,11 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
* is supported in the Blob service.
|
||||
* @param options Optional parameters to execute this
|
||||
* function.
|
||||
* @return A FilterBlobSegment describing the blobs.
|
||||
* @return A FindBlobsByTagsSinglePageResult describing the blobs.
|
||||
*/
|
||||
Azure::Core::Response<Models::FindBlobsByTagsResult> FindBlobsByTags(
|
||||
Azure::Core::Response<Models::FindBlobsByTagsSinglePageResult> FindBlobsByTagsSinglePage(
|
||||
const std::string& tagFilterSqlExpression,
|
||||
const FindBlobsByTagsOptions& options = FindBlobsByTagsOptions()) const;
|
||||
const FindBlobsByTagsSinglePageOptions& options = FindBlobsByTagsSinglePageOptions()) const;
|
||||
|
||||
protected:
|
||||
Azure::Core::Http::Url m_serviceUrl;
|
||||
|
||||
@ -566,13 +566,13 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
Azure::Core::Nullable<bool> IncludeApis;
|
||||
}; // struct BlobMetrics
|
||||
|
||||
struct FilterBlobsSegmentResult
|
||||
struct FindBlobsByTagsSinglePageResult
|
||||
{
|
||||
std::string ServiceEndpoint;
|
||||
std::string Where;
|
||||
std::string ContinuationToken;
|
||||
std::vector<FilterBlobItem> Items;
|
||||
}; // struct FilterBlobsSegmentResult
|
||||
}; // struct FindBlobsByTagsSinglePageResult
|
||||
|
||||
struct GetAccountInfoResult
|
||||
{
|
||||
@ -710,14 +710,14 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
BlobGeoReplication GeoReplication;
|
||||
}; // struct GetServiceStatisticsResult
|
||||
|
||||
struct ListBlobContainersSegmentResult
|
||||
struct ListBlobContainersSinglePageResult
|
||||
{
|
||||
std::string ServiceEndpoint;
|
||||
std::string Prefix;
|
||||
std::string PreviousContinuationToken;
|
||||
std::string ContinuationToken;
|
||||
std::vector<BlobContainerItem> Items;
|
||||
}; // struct ListBlobContainersSegmentResult
|
||||
}; // struct ListBlobContainersSinglePageResult
|
||||
|
||||
struct ObjectReplicationPolicy
|
||||
{
|
||||
@ -869,7 +869,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
Azure::Core::Nullable<int32_t> TagCount;
|
||||
}; // struct GetBlobPropertiesResult
|
||||
|
||||
struct ListBlobsByHierarchySegmentResult
|
||||
struct ListBlobsByHierarchySinglePageResult
|
||||
{
|
||||
std::string ServiceEndpoint;
|
||||
std::string BlobContainerName;
|
||||
@ -879,9 +879,9 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
std::string ContinuationToken;
|
||||
std::vector<BlobItem> Items;
|
||||
std::vector<BlobPrefix> BlobPrefixes;
|
||||
}; // struct ListBlobsByHierarchySegmentResult
|
||||
}; // struct ListBlobsByHierarchySinglePageResult
|
||||
|
||||
struct ListBlobsFlatSegmentResult
|
||||
struct ListBlobsSinglePageResult
|
||||
{
|
||||
std::string ServiceEndpoint;
|
||||
std::string BlobContainerName;
|
||||
@ -889,7 +889,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
std::string PreviousContinuationToken;
|
||||
std::string ContinuationToken;
|
||||
std::vector<BlobItem> Items;
|
||||
}; // struct ListBlobsFlatSegmentResult
|
||||
}; // struct ListBlobsSinglePageResult
|
||||
|
||||
} // namespace Models
|
||||
|
||||
@ -1691,20 +1691,21 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
public:
|
||||
class Service {
|
||||
public:
|
||||
struct ListBlobContainersSegmentOptions
|
||||
struct ListBlobContainersSinglePageOptions
|
||||
{
|
||||
Azure::Core::Nullable<int32_t> Timeout;
|
||||
Azure::Core::Nullable<std::string> Prefix;
|
||||
Azure::Core::Nullable<std::string> ContinuationToken;
|
||||
Azure::Core::Nullable<int32_t> MaxResults;
|
||||
ListBlobContainersIncludeItem Include = ListBlobContainersIncludeItem::None;
|
||||
}; // struct ListBlobContainersSegmentOptions
|
||||
}; // struct ListBlobContainersSinglePageOptions
|
||||
|
||||
static Azure::Core::Response<ListBlobContainersSegmentResult> ListBlobContainers(
|
||||
static Azure::Core::Response<ListBlobContainersSinglePageResult>
|
||||
ListBlobContainersSinglePage(
|
||||
const Azure::Core::Context& context,
|
||||
Azure::Core::Http::HttpPipeline& pipeline,
|
||||
const Azure::Core::Http::Url& url,
|
||||
const ListBlobContainersSegmentOptions& options)
|
||||
const ListBlobContainersSinglePageOptions& options)
|
||||
{
|
||||
unused(options);
|
||||
auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Get, url);
|
||||
@ -1741,7 +1742,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
}
|
||||
auto pHttpResponse = pipeline.Send(context, request);
|
||||
Azure::Core::Http::RawResponse& httpResponse = *pHttpResponse;
|
||||
ListBlobContainersSegmentResult response;
|
||||
ListBlobContainersSinglePageResult response;
|
||||
auto http_status_code
|
||||
= static_cast<std::underlying_type<Azure::Core::Http::HttpStatusCode>::type>(
|
||||
httpResponse.GetStatusCode());
|
||||
@ -1753,9 +1754,9 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
const auto& httpResponseBody = httpResponse.GetBody();
|
||||
Storage::Details::XmlReader reader(
|
||||
reinterpret_cast<const char*>(httpResponseBody.data()), httpResponseBody.size());
|
||||
response = ListBlobContainersSegmentResultFromXml(reader);
|
||||
response = ListBlobContainersSinglePageResultFromXml(reader);
|
||||
}
|
||||
return Azure::Core::Response<ListBlobContainersSegmentResult>(
|
||||
return Azure::Core::Response<ListBlobContainersSinglePageResult>(
|
||||
std::move(response), std::move(pHttpResponse));
|
||||
}
|
||||
|
||||
@ -1982,19 +1983,19 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
std::move(response), std::move(pHttpResponse));
|
||||
}
|
||||
|
||||
struct FilterBlobsSegmentOptions
|
||||
struct FindBlobsByTagsSinglePageOptions
|
||||
{
|
||||
Azure::Core::Nullable<int32_t> Timeout;
|
||||
std::string Where;
|
||||
Azure::Core::Nullable<std::string> ContinuationToken;
|
||||
Azure::Core::Nullable<int32_t> MaxResults;
|
||||
}; // struct FilterBlobsSegmentOptions
|
||||
}; // struct FindBlobsByTagsSinglePageOptions
|
||||
|
||||
static Azure::Core::Response<FilterBlobsSegmentResult> FilterBlobs(
|
||||
static Azure::Core::Response<FindBlobsByTagsSinglePageResult> FindBlobsByTagsSinglePage(
|
||||
const Azure::Core::Context& context,
|
||||
Azure::Core::Http::HttpPipeline& pipeline,
|
||||
const Azure::Core::Http::Url& url,
|
||||
const FilterBlobsSegmentOptions& options)
|
||||
const FindBlobsByTagsSinglePageOptions& options)
|
||||
{
|
||||
unused(options);
|
||||
auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Get, url);
|
||||
@ -2020,7 +2021,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
}
|
||||
auto pHttpResponse = pipeline.Send(context, request);
|
||||
Azure::Core::Http::RawResponse& httpResponse = *pHttpResponse;
|
||||
FilterBlobsSegmentResult response;
|
||||
FindBlobsByTagsSinglePageResult response;
|
||||
auto http_status_code
|
||||
= static_cast<std::underlying_type<Azure::Core::Http::HttpStatusCode>::type>(
|
||||
httpResponse.GetStatusCode());
|
||||
@ -2032,17 +2033,17 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
const auto& httpResponseBody = httpResponse.GetBody();
|
||||
Storage::Details::XmlReader reader(
|
||||
reinterpret_cast<const char*>(httpResponseBody.data()), httpResponseBody.size());
|
||||
response = FilterBlobsSegmentResultFromXml(reader);
|
||||
response = FindBlobsByTagsSinglePageResultFromXml(reader);
|
||||
}
|
||||
return Azure::Core::Response<FilterBlobsSegmentResult>(
|
||||
return Azure::Core::Response<FindBlobsByTagsSinglePageResult>(
|
||||
std::move(response), std::move(pHttpResponse));
|
||||
}
|
||||
|
||||
private:
|
||||
static FilterBlobsSegmentResult FilterBlobsSegmentResultFromXml(
|
||||
static FindBlobsByTagsSinglePageResult FindBlobsByTagsSinglePageResultFromXml(
|
||||
Storage::Details::XmlReader& reader)
|
||||
{
|
||||
FilterBlobsSegmentResult ret;
|
||||
FindBlobsByTagsSinglePageResult ret;
|
||||
enum class XmlTagName
|
||||
{
|
||||
k_EnumerationResults,
|
||||
@ -2441,10 +2442,10 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
return ret;
|
||||
}
|
||||
|
||||
static ListBlobContainersSegmentResult ListBlobContainersSegmentResultFromXml(
|
||||
static ListBlobContainersSinglePageResult ListBlobContainersSinglePageResultFromXml(
|
||||
Storage::Details::XmlReader& reader)
|
||||
{
|
||||
ListBlobContainersSegmentResult ret;
|
||||
ListBlobContainersSinglePageResult ret;
|
||||
enum class XmlTagName
|
||||
{
|
||||
k_EnumerationResults,
|
||||
@ -3802,20 +3803,20 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
std::move(response), std::move(pHttpResponse));
|
||||
}
|
||||
|
||||
struct ListBlobsFlatSegmentOptions
|
||||
struct ListBlobsSinglePageOptions
|
||||
{
|
||||
Azure::Core::Nullable<int32_t> Timeout;
|
||||
Azure::Core::Nullable<std::string> Prefix;
|
||||
Azure::Core::Nullable<std::string> ContinuationToken;
|
||||
Azure::Core::Nullable<int32_t> MaxResults;
|
||||
ListBlobsIncludeItem Include = ListBlobsIncludeItem::None;
|
||||
}; // struct ListBlobsFlatSegmentOptions
|
||||
}; // struct ListBlobsSinglePageOptions
|
||||
|
||||
static Azure::Core::Response<ListBlobsFlatSegmentResult> ListBlobsFlat(
|
||||
static Azure::Core::Response<ListBlobsSinglePageResult> ListBlobsSinglePage(
|
||||
const Azure::Core::Context& context,
|
||||
Azure::Core::Http::HttpPipeline& pipeline,
|
||||
const Azure::Core::Http::Url& url,
|
||||
const ListBlobsFlatSegmentOptions& options)
|
||||
const ListBlobsSinglePageOptions& options)
|
||||
{
|
||||
unused(options);
|
||||
auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Get, url);
|
||||
@ -3851,7 +3852,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
}
|
||||
auto pHttpResponse = pipeline.Send(context, request);
|
||||
Azure::Core::Http::RawResponse& httpResponse = *pHttpResponse;
|
||||
ListBlobsFlatSegmentResult response;
|
||||
ListBlobsSinglePageResult response;
|
||||
auto http_status_code
|
||||
= static_cast<std::underlying_type<Azure::Core::Http::HttpStatusCode>::type>(
|
||||
httpResponse.GetStatusCode());
|
||||
@ -3863,13 +3864,13 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
const auto& httpResponseBody = httpResponse.GetBody();
|
||||
Storage::Details::XmlReader reader(
|
||||
reinterpret_cast<const char*>(httpResponseBody.data()), httpResponseBody.size());
|
||||
response = ListBlobsFlatSegmentResultFromXml(reader);
|
||||
response = ListBlobsSinglePageResultFromXml(reader);
|
||||
}
|
||||
return Azure::Core::Response<ListBlobsFlatSegmentResult>(
|
||||
return Azure::Core::Response<ListBlobsSinglePageResult>(
|
||||
std::move(response), std::move(pHttpResponse));
|
||||
}
|
||||
|
||||
struct ListBlobsByHierarchySegmentOptions
|
||||
struct ListBlobsByHierarchySinglePageOptions
|
||||
{
|
||||
Azure::Core::Nullable<int32_t> Timeout;
|
||||
Azure::Core::Nullable<std::string> Prefix;
|
||||
@ -3877,13 +3878,14 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
Azure::Core::Nullable<std::string> ContinuationToken;
|
||||
Azure::Core::Nullable<int32_t> MaxResults;
|
||||
ListBlobsIncludeItem Include = ListBlobsIncludeItem::None;
|
||||
}; // struct ListBlobsByHierarchySegmentOptions
|
||||
}; // struct ListBlobsByHierarchySinglePageOptions
|
||||
|
||||
static Azure::Core::Response<ListBlobsByHierarchySegmentResult> ListBlobsByHierarchy(
|
||||
static Azure::Core::Response<ListBlobsByHierarchySinglePageResult>
|
||||
ListBlobsByHierarchySinglePage(
|
||||
const Azure::Core::Context& context,
|
||||
Azure::Core::Http::HttpPipeline& pipeline,
|
||||
const Azure::Core::Http::Url& url,
|
||||
const ListBlobsByHierarchySegmentOptions& options)
|
||||
const ListBlobsByHierarchySinglePageOptions& options)
|
||||
{
|
||||
unused(options);
|
||||
auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Get, url);
|
||||
@ -3925,7 +3927,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
}
|
||||
auto pHttpResponse = pipeline.Send(context, request);
|
||||
Azure::Core::Http::RawResponse& httpResponse = *pHttpResponse;
|
||||
ListBlobsByHierarchySegmentResult response;
|
||||
ListBlobsByHierarchySinglePageResult response;
|
||||
auto http_status_code
|
||||
= static_cast<std::underlying_type<Azure::Core::Http::HttpStatusCode>::type>(
|
||||
httpResponse.GetStatusCode());
|
||||
@ -3937,9 +3939,9 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
const auto& httpResponseBody = httpResponse.GetBody();
|
||||
Storage::Details::XmlReader reader(
|
||||
reinterpret_cast<const char*>(httpResponseBody.data()), httpResponseBody.size());
|
||||
response = ListBlobsByHierarchySegmentResultFromXml(reader);
|
||||
response = ListBlobsByHierarchySinglePageResultFromXml(reader);
|
||||
}
|
||||
return Azure::Core::Response<ListBlobsByHierarchySegmentResult>(
|
||||
return Azure::Core::Response<ListBlobsByHierarchySinglePageResult>(
|
||||
std::move(response), std::move(pHttpResponse));
|
||||
}
|
||||
|
||||
@ -4387,10 +4389,10 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
return ret;
|
||||
}
|
||||
|
||||
static ListBlobsByHierarchySegmentResult ListBlobsByHierarchySegmentResultFromXml(
|
||||
static ListBlobsByHierarchySinglePageResult ListBlobsByHierarchySinglePageResultFromXml(
|
||||
Storage::Details::XmlReader& reader)
|
||||
{
|
||||
ListBlobsByHierarchySegmentResult ret;
|
||||
ListBlobsByHierarchySinglePageResult ret;
|
||||
enum class XmlTagName
|
||||
{
|
||||
k_EnumerationResults,
|
||||
@ -4518,10 +4520,10 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
return ret;
|
||||
}
|
||||
|
||||
static ListBlobsFlatSegmentResult ListBlobsFlatSegmentResultFromXml(
|
||||
static ListBlobsSinglePageResult ListBlobsSinglePageResultFromXml(
|
||||
Storage::Details::XmlReader& reader)
|
||||
{
|
||||
ListBlobsFlatSegmentResult ret;
|
||||
ListBlobsSinglePageResult ret;
|
||||
enum class XmlTagName
|
||||
{
|
||||
k_EnumerationResults,
|
||||
|
||||
@ -236,15 +236,15 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
options.Context, *m_pipeline, m_blobContainerUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
Azure::Core::Response<Models::ListBlobsFlatSegmentResult>
|
||||
BlobContainerClient::ListBlobsFlatSegment(const ListBlobsSegmentOptions& options) const
|
||||
Azure::Core::Response<Models::ListBlobsSinglePageResult> BlobContainerClient::ListBlobsSinglePage(
|
||||
const ListBlobsSinglePageOptions& options) const
|
||||
{
|
||||
Details::BlobRestClient::BlobContainer::ListBlobsFlatSegmentOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::BlobContainer::ListBlobsSinglePageOptions protocolLayerOptions;
|
||||
protocolLayerOptions.Prefix = options.Prefix;
|
||||
protocolLayerOptions.ContinuationToken = options.ContinuationToken;
|
||||
protocolLayerOptions.MaxResults = options.MaxResults;
|
||||
protocolLayerOptions.MaxResults = options.PageSizeHint;
|
||||
protocolLayerOptions.Include = options.Include;
|
||||
auto response = Details::BlobRestClient::BlobContainer::ListBlobsFlat(
|
||||
auto response = Details::BlobRestClient::BlobContainer::ListBlobsSinglePage(
|
||||
options.Context, *m_pipeline, m_blobContainerUrl, protocolLayerOptions);
|
||||
for (auto& i : response->Items)
|
||||
{
|
||||
@ -256,18 +256,19 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
return response;
|
||||
}
|
||||
|
||||
Azure::Core::Response<Models::ListBlobsByHierarchySegmentResult>
|
||||
BlobContainerClient::ListBlobsByHierarchySegment(
|
||||
Azure::Core::Response<Models::ListBlobsByHierarchySinglePageResult>
|
||||
BlobContainerClient::ListBlobsByHierarchySinglePage(
|
||||
const std::string& delimiter,
|
||||
const ListBlobsSegmentOptions& options) const
|
||||
const ListBlobsSinglePageOptions& options) const
|
||||
{
|
||||
Details::BlobRestClient::BlobContainer::ListBlobsByHierarchySegmentOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::BlobContainer::ListBlobsByHierarchySinglePageOptions
|
||||
protocolLayerOptions;
|
||||
protocolLayerOptions.Prefix = options.Prefix;
|
||||
protocolLayerOptions.Delimiter = delimiter;
|
||||
protocolLayerOptions.ContinuationToken = options.ContinuationToken;
|
||||
protocolLayerOptions.MaxResults = options.MaxResults;
|
||||
protocolLayerOptions.MaxResults = options.PageSizeHint;
|
||||
protocolLayerOptions.Include = options.Include;
|
||||
auto response = Details::BlobRestClient::BlobContainer::ListBlobsByHierarchy(
|
||||
auto response = Details::BlobRestClient::BlobContainer::ListBlobsByHierarchySinglePage(
|
||||
options.Context, *m_pipeline, m_blobContainerUrl, protocolLayerOptions);
|
||||
for (auto& i : response->Items)
|
||||
{
|
||||
|
||||
@ -119,16 +119,16 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
std::move(blobContainerUrl), m_pipeline, m_customerProvidedKey, m_encryptionScope);
|
||||
}
|
||||
|
||||
Azure::Core::Response<Models::ListBlobContainersSegmentResult>
|
||||
BlobServiceClient::ListBlobContainersSegment(
|
||||
const ListBlobContainersSegmentOptions& options) const
|
||||
Azure::Core::Response<Models::ListBlobContainersSinglePageResult>
|
||||
BlobServiceClient::ListBlobContainersSinglePage(
|
||||
const ListBlobContainersSinglePageOptions& options) const
|
||||
{
|
||||
Details::BlobRestClient::Service::ListBlobContainersSegmentOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::Service::ListBlobContainersSinglePageOptions protocolLayerOptions;
|
||||
protocolLayerOptions.Prefix = options.Prefix;
|
||||
protocolLayerOptions.ContinuationToken = options.ContinuationToken;
|
||||
protocolLayerOptions.MaxResults = options.MaxResults;
|
||||
protocolLayerOptions.MaxResults = options.PageSizeHint;
|
||||
protocolLayerOptions.Include = options.Include;
|
||||
return Details::BlobRestClient::Service::ListBlobContainers(
|
||||
return Details::BlobRestClient::Service::ListBlobContainersSinglePage(
|
||||
options.Context, *m_pipeline, m_serviceUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
@ -178,15 +178,16 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
options.Context, *m_pipeline, m_serviceUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
Azure::Core::Response<Models::FindBlobsByTagsResult> BlobServiceClient::FindBlobsByTags(
|
||||
Azure::Core::Response<Models::FindBlobsByTagsSinglePageResult>
|
||||
BlobServiceClient::FindBlobsByTagsSinglePage(
|
||||
const std::string& tagFilterSqlExpression,
|
||||
const FindBlobsByTagsOptions& options) const
|
||||
const FindBlobsByTagsSinglePageOptions& options) const
|
||||
{
|
||||
Details::BlobRestClient::Service::FilterBlobsSegmentOptions protocolLayerOptions;
|
||||
Details::BlobRestClient::Service::FindBlobsByTagsSinglePageOptions protocolLayerOptions;
|
||||
protocolLayerOptions.Where = tagFilterSqlExpression;
|
||||
protocolLayerOptions.ContinuationToken = options.ContinuationToken;
|
||||
protocolLayerOptions.MaxResults = options.MaxResults;
|
||||
return Details::BlobRestClient::Service::FilterBlobs(
|
||||
protocolLayerOptions.MaxResults = options.PageSizeHint;
|
||||
return Details::BlobRestClient::Service::FindBlobsByTagsSinglePage(
|
||||
options.Context, *m_pipeline, m_serviceUrl, protocolLayerOptions);
|
||||
}
|
||||
|
||||
|
||||
@ -296,11 +296,11 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
EXPECT_TRUE(getPropertiesResult->IsSealed.HasValue());
|
||||
EXPECT_TRUE(getPropertiesResult->IsSealed.GetValue());
|
||||
|
||||
Azure::Storage::Blobs::ListBlobsSegmentOptions options;
|
||||
Azure::Storage::Blobs::ListBlobsSinglePageOptions options;
|
||||
options.Prefix = blobName;
|
||||
do
|
||||
{
|
||||
auto res = m_blobContainerClient->ListBlobsFlatSegment(options);
|
||||
auto res = m_blobContainerClient->ListBlobsSinglePage(options);
|
||||
options.ContinuationToken = res->ContinuationToken;
|
||||
for (const auto& blob : res->Items)
|
||||
{
|
||||
|
||||
@ -157,12 +157,12 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
p1p2Blobs.insert(blobName);
|
||||
}
|
||||
|
||||
Azure::Storage::Blobs::ListBlobsSegmentOptions options;
|
||||
options.MaxResults = 4;
|
||||
Azure::Storage::Blobs::ListBlobsSinglePageOptions options;
|
||||
options.PageSizeHint = 4;
|
||||
std::set<std::string> listBlobs;
|
||||
do
|
||||
{
|
||||
auto res = m_blobContainerClient->ListBlobsFlatSegment(options);
|
||||
auto res = m_blobContainerClient->ListBlobsSinglePage(options);
|
||||
EXPECT_FALSE(res.GetRawResponse().GetHeaders().at(Details::HttpHeaderRequestId).empty());
|
||||
EXPECT_FALSE(res.GetRawResponse().GetHeaders().at(Details::HttpHeaderDate).empty());
|
||||
EXPECT_FALSE(res.GetRawResponse().GetHeaders().at(Details::HttpHeaderXMsVersion).empty());
|
||||
@ -215,7 +215,7 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
listBlobs.clear();
|
||||
do
|
||||
{
|
||||
auto res = m_blobContainerClient->ListBlobsFlatSegment(options);
|
||||
auto res = m_blobContainerClient->ListBlobsSinglePage(options);
|
||||
options.ContinuationToken = res->ContinuationToken;
|
||||
for (const auto& blob : res->Items)
|
||||
{
|
||||
@ -244,12 +244,12 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
}
|
||||
}
|
||||
|
||||
Azure::Storage::Blobs::ListBlobsSegmentOptions options;
|
||||
Azure::Storage::Blobs::ListBlobsSinglePageOptions options;
|
||||
options.Prefix = prefix;
|
||||
std::set<std::string> items;
|
||||
while (true)
|
||||
{
|
||||
auto res = m_blobContainerClient->ListBlobsByHierarchySegment(delimiter, options);
|
||||
auto res = m_blobContainerClient->ListBlobsByHierarchySinglePage(delimiter, options);
|
||||
EXPECT_EQ(res->Delimiter, delimiter);
|
||||
EXPECT_EQ(res->Prefix, options.Prefix.GetValue());
|
||||
EXPECT_TRUE(res->Items.empty());
|
||||
@ -274,7 +274,7 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
options.Prefix = p + delimiter;
|
||||
while (true)
|
||||
{
|
||||
auto res = m_blobContainerClient->ListBlobsByHierarchySegment(delimiter, options);
|
||||
auto res = m_blobContainerClient->ListBlobsByHierarchySinglePage(delimiter, options);
|
||||
EXPECT_EQ(res->Delimiter, delimiter);
|
||||
EXPECT_EQ(res->Prefix, options.Prefix.GetValue());
|
||||
EXPECT_TRUE(res->BlobPrefixes.empty());
|
||||
@ -308,7 +308,7 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
auto contentStream = Azure::Core::Http::MemoryBodyStream(content.data(), 1);
|
||||
blobClient.AppendBlock(&contentStream);
|
||||
|
||||
Azure::Storage::Blobs::ListBlobsSegmentOptions options;
|
||||
Azure::Storage::Blobs::ListBlobsSinglePageOptions options;
|
||||
options.Prefix = blobName;
|
||||
options.Include = Blobs::Models::ListBlobsIncludeItem::Snapshots
|
||||
| Blobs::Models::ListBlobsIncludeItem::Versions
|
||||
@ -322,7 +322,7 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
bool foundMetadata = false;
|
||||
do
|
||||
{
|
||||
auto res = m_blobContainerClient->ListBlobsFlatSegment(options);
|
||||
auto res = m_blobContainerClient->ListBlobsSinglePage(options);
|
||||
options.ContinuationToken = res->ContinuationToken;
|
||||
for (const auto& blob : res->Items)
|
||||
{
|
||||
@ -701,12 +701,12 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
|
||||
Blobs::Models::BlobContainerItem deletedContainerItem;
|
||||
{
|
||||
Azure::Storage::Blobs::ListBlobContainersSegmentOptions options;
|
||||
Azure::Storage::Blobs::ListBlobContainersSinglePageOptions options;
|
||||
options.Prefix = containerName;
|
||||
options.Include = Blobs::Models::ListBlobContainersIncludeItem::Deleted;
|
||||
do
|
||||
{
|
||||
auto res = serviceClient.ListBlobContainersSegment(options);
|
||||
auto res = serviceClient.ListBlobContainersSinglePage(options);
|
||||
options.ContinuationToken = res->ContinuationToken;
|
||||
for (const auto& container : res->Items)
|
||||
{
|
||||
@ -801,12 +801,12 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
std::string marker;
|
||||
do
|
||||
{
|
||||
Blobs::FindBlobsByTagsOptions options;
|
||||
Blobs::FindBlobsByTagsSinglePageOptions options;
|
||||
if (!marker.empty())
|
||||
{
|
||||
options.ContinuationToken = marker;
|
||||
}
|
||||
auto findBlobsRet = *blobServiceClient.FindBlobsByTags(whereExpression, options);
|
||||
auto findBlobsRet = *blobServiceClient.FindBlobsByTagsSinglePage(whereExpression, options);
|
||||
EXPECT_FALSE(findBlobsRet.ServiceEndpoint.empty());
|
||||
EXPECT_EQ(findBlobsRet.Where, whereExpression);
|
||||
options.ContinuationToken = findBlobsRet.ContinuationToken;
|
||||
|
||||
@ -84,7 +84,7 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
|
||||
auto verify_blob_list = [&](const std::string& sas) {
|
||||
auto blobContainerClient = Blobs::BlobContainerClient(containerUrl + sas);
|
||||
EXPECT_NO_THROW(blobContainerClient.ListBlobsFlatSegment());
|
||||
EXPECT_NO_THROW(blobContainerClient.ListBlobsSinglePage());
|
||||
};
|
||||
|
||||
auto verify_blob_create = [&](const std::string& sas) {
|
||||
@ -167,14 +167,15 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
}
|
||||
}
|
||||
|
||||
for (auto permissions : {Sas::BlobSasPermissions::All,
|
||||
Sas::BlobSasPermissions::Read,
|
||||
Sas::BlobSasPermissions::Write,
|
||||
Sas::BlobSasPermissions::Delete,
|
||||
Sas::BlobSasPermissions::Add,
|
||||
Sas::BlobSasPermissions::Create,
|
||||
Sas::BlobSasPermissions::Tags,
|
||||
Sas::BlobSasPermissions::DeleteVersion})
|
||||
for (auto permissions :
|
||||
{Sas::BlobSasPermissions::All,
|
||||
Sas::BlobSasPermissions::Read,
|
||||
Sas::BlobSasPermissions::Write,
|
||||
Sas::BlobSasPermissions::Delete,
|
||||
Sas::BlobSasPermissions::Add,
|
||||
Sas::BlobSasPermissions::Create,
|
||||
Sas::BlobSasPermissions::Tags,
|
||||
Sas::BlobSasPermissions::DeleteVersion})
|
||||
{
|
||||
blobSasBuilder.SetPermissions(permissions);
|
||||
auto sasToken = blobSasBuilder.GenerateSasToken(*keyCredential);
|
||||
@ -263,17 +264,18 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
EXPECT_THROW(verify_blob_create(sasToken), StorageException);
|
||||
|
||||
auto serviceClient = Blobs::BlobServiceClient(serviceUrl + sasToken);
|
||||
EXPECT_NO_THROW(serviceClient.ListBlobContainersSegment());
|
||||
EXPECT_NO_THROW(serviceClient.ListBlobContainersSinglePage());
|
||||
}
|
||||
|
||||
for (auto permissions : {Sas::BlobContainerSasPermissions::All,
|
||||
Sas::BlobContainerSasPermissions::Read,
|
||||
Sas::BlobContainerSasPermissions::Write,
|
||||
Sas::BlobContainerSasPermissions::Delete,
|
||||
Sas::BlobContainerSasPermissions::List,
|
||||
Sas::BlobContainerSasPermissions::Add,
|
||||
Sas::BlobContainerSasPermissions::Create,
|
||||
Sas::BlobContainerSasPermissions::Tags})
|
||||
for (auto permissions :
|
||||
{Sas::BlobContainerSasPermissions::All,
|
||||
Sas::BlobContainerSasPermissions::Read,
|
||||
Sas::BlobContainerSasPermissions::Write,
|
||||
Sas::BlobContainerSasPermissions::Delete,
|
||||
Sas::BlobContainerSasPermissions::List,
|
||||
Sas::BlobContainerSasPermissions::Add,
|
||||
Sas::BlobContainerSasPermissions::Create,
|
||||
Sas::BlobContainerSasPermissions::Tags})
|
||||
{
|
||||
containerSasBuilder.SetPermissions(permissions);
|
||||
auto sasToken = containerSasBuilder.GenerateSasToken(*keyCredential);
|
||||
|
||||
@ -105,12 +105,12 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
p1p2Containers.insert(containerName);
|
||||
}
|
||||
|
||||
Azure::Storage::Blobs::ListBlobContainersSegmentOptions options;
|
||||
options.MaxResults = 4;
|
||||
Azure::Storage::Blobs::ListBlobContainersSinglePageOptions options;
|
||||
options.PageSizeHint = 4;
|
||||
std::set<std::string> listContainers;
|
||||
do
|
||||
{
|
||||
auto res = m_blobServiceClient.ListBlobContainersSegment(options);
|
||||
auto res = m_blobServiceClient.ListBlobContainersSinglePage(options);
|
||||
EXPECT_FALSE(res.GetRawResponse().GetHeaders().at(Details::HttpHeaderRequestId).empty());
|
||||
EXPECT_FALSE(res.GetRawResponse().GetHeaders().at(Details::HttpHeaderDate).empty());
|
||||
EXPECT_FALSE(res.GetRawResponse().GetHeaders().at(Details::HttpHeaderXMsVersion).empty());
|
||||
@ -132,7 +132,7 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
listContainers.clear();
|
||||
do
|
||||
{
|
||||
auto res = m_blobServiceClient.ListBlobContainersSegment(options);
|
||||
auto res = m_blobServiceClient.ListBlobContainersSinglePage(options);
|
||||
EXPECT_FALSE(res.GetRawResponse().GetHeaders().at(Details::HttpHeaderRequestId).empty());
|
||||
EXPECT_FALSE(res.GetRawResponse().GetHeaders().at(Details::HttpHeaderDate).empty());
|
||||
EXPECT_FALSE(res.GetRawResponse().GetHeaders().at(Details::HttpHeaderXMsVersion).empty());
|
||||
|
||||
@ -117,11 +117,11 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
{
|
||||
std::string lastAccessTime;
|
||||
|
||||
Azure::Storage::Blobs::ListBlobsSegmentOptions options;
|
||||
Azure::Storage::Blobs::ListBlobsSinglePageOptions options;
|
||||
options.Prefix = m_blobName;
|
||||
do
|
||||
{
|
||||
auto res = m_blobContainerClient->ListBlobsFlatSegment(options);
|
||||
auto res = m_blobContainerClient->ListBlobsSinglePage(options);
|
||||
options.ContinuationToken = res->ContinuationToken;
|
||||
for (const auto& blob : res->Items)
|
||||
{
|
||||
|
||||
@ -174,12 +174,12 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
Azure::Core::Response<Models::ListFileSystemsSegmentResult>
|
||||
DataLakeServiceClient::ListFileSystemsSegement(const ListFileSystemsSegmentOptions& options) const
|
||||
{
|
||||
Blobs::ListBlobContainersSegmentOptions blobOptions;
|
||||
Blobs::ListBlobContainersSinglePageOptions blobOptions;
|
||||
blobOptions.Context = options.Context;
|
||||
blobOptions.Prefix = options.Prefix;
|
||||
blobOptions.ContinuationToken = options.ContinuationToken;
|
||||
blobOptions.MaxResults = options.MaxResults;
|
||||
auto result = m_blobServiceClient.ListBlobContainersSegment(blobOptions);
|
||||
blobOptions.PageSizeHint = options.MaxResults;
|
||||
auto result = m_blobServiceClient.ListBlobContainersSinglePage(blobOptions);
|
||||
auto response = Models::ListFileSystemsSegmentResult();
|
||||
response.ContinuationToken = result->ContinuationToken.empty() ? response.ContinuationToken
|
||||
: result->ContinuationToken;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user