Renamed all continuation related object to ContinuationToken. (#779)

* Renamed all continuation related object to ContinuationToken.

* Refined changelog.
This commit is contained in:
Kan Tang 2020-10-14 00:18:38 -07:00 committed by GitHub
parent e0079f0541
commit a7672f67f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
22 changed files with 235 additions and 222 deletions

View File

@ -6,16 +6,15 @@
* Service version is now 2020-02-10.
* Added support for SAS generation in DataLake service.
* CreateFromConnectionString now accepts unencoded file, path and directory name.
* Added support for `FileClient::ScheduleDeletion`.
* Added support for `DirectoryClient::SetAccessControlRecursive`.
* `ETag` and `LastModified` is now `std::string` instead of `Azure::Core::Nullable<std::string>` in `CreateDirectoryResult`, `CreateFileResult` and `CreatePathResult`.
* `PathAppendDataResult` now returns `ContentMD5`, `ContentCrc64` and `IsServerEncrypted`.
### Breaking Changes
* `CreateFromConnectionString` now accepts unencoded file, path and directory name.
* `ETag` and `LastModified` is now `std::string` instead of `Azure::Core::Nullable<std::string>` in `CreateDirectoryResult`, `CreateFileResult` and `CreatePathResult`.
* `Continuation` is renamed to `ContinuationToken` in options and returned result objects.
## 1.0.0-beta.2 (2020-09-09)

View File

@ -114,7 +114,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
* in the response, it must be specified in a subsequent invocation
* of the list operation to continue listing the filesystems.
*/
Azure::Core::Nullable<std::string> Continuation;
Azure::Core::Nullable<std::string> ContinuationToken;
/**
* @brief An optional value that specifies the maximum number of items to
@ -219,7 +219,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
* in the response, it must be specified in a subsequent invocation
* of the list operation to continue listing the paths.
*/
Azure::Core::Nullable<std::string> Continuation;
Azure::Core::Nullable<std::string> ContinuationToken;
/**
* @brief An optional value that specifies the maximum number of items to
@ -452,7 +452,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
* the response, it must be specified in a subsequent invocation of the delete operation
* to continue deleting the directory.
*/
Azure::Core::Nullable<std::string> Continuation;
Azure::Core::Nullable<std::string> ContinuationToken;
/**
* @brief Required and valid only when the resource is a directory. If "true", all paths beneath
@ -611,7 +611,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
* is returned in the response, it must be specified in a subsequent invocation of the
* rename operation to continue renaming the directory.
*/
Azure::Core::Nullable<std::string> Continuation;
Azure::Core::Nullable<std::string> ContinuationToken;
/**
* @brief This parameter determines the behavior of the rename operation. The value must be
@ -654,7 +654,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
* the response, it must be specified in a subsequent invocation of the delete operation
* to continue deleting the directory.
*/
Azure::Core::Nullable<std::string> Continuation;
Azure::Core::Nullable<std::string> ContinuationToken;
/**
* @brief Specify the access condition for the path.
@ -680,7 +680,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
* invocation of the setAccessControlRecursive operation to continue the
* setAccessControlRecursive operation on the directory.
*/
Azure::Core::Nullable<std::string> Continuation;
Azure::Core::Nullable<std::string> ContinuationToken;
/**
* @brief It specifies the maximum number of files or directories on which the acl change will

View File

@ -176,7 +176,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
struct RenameDirectoryResult
{
Azure::Core::Nullable<std::string> Continuation;
Azure::Core::Nullable<std::string> ContinuationToken;
};
using SetDirectoryAccessControlRecursiveResult = PathSetAccessControlRecursiveResult;

View File

@ -30,7 +30,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
constexpr static const char* c_QueryTimeout = "timeout";
constexpr static const char* c_QueryRecursiveOptional = "recursive";
constexpr static const char* c_QueryRecursiveRequired = "recursive";
constexpr static const char* c_QueryContinuation = "continuation";
constexpr static const char* c_QueryContinuationToken = "continuation";
constexpr static const char* c_QueryPathSetAccessControlRecursiveMode = "mode";
constexpr static const char* c_QueryForceFlag = "forceflag";
constexpr static const char* c_QueryDirectory = "directory";
@ -669,7 +669,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
struct ServiceListFileSystemsResult
{
Azure::Core::Nullable<std::string> Continuation;
Azure::Core::Nullable<std::string> ContinuationToken;
std::vector<FileSystem> Filesystems;
static ServiceListFileSystemsResult ServiceListFileSystemsResultFromFileSystemList(
@ -709,7 +709,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
struct FileSystemListPathsResult
{
Azure::Core::Nullable<std::string> Continuation;
Azure::Core::Nullable<std::string> ContinuationToken;
std::vector<Path> Paths;
static FileSystemListPathsResult FileSystemListPathsResultFromPathList(PathList object)
@ -725,7 +725,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
{
Azure::Core::Nullable<std::string> ETag;
Azure::Core::Nullable<std::string> LastModified;
Azure::Core::Nullable<std::string> Continuation;
Azure::Core::Nullable<std::string> ContinuationToken;
Azure::Core::Nullable<int64_t> ContentLength;
};
@ -739,7 +739,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
Azure::Core::Nullable<std::string> ContentRange;
Azure::Core::Nullable<std::string> ContentMd5;
Azure::Core::Nullable<std::string> Properties;
Azure::Core::Nullable<std::string> Continuation;
Azure::Core::Nullable<std::string> ContinuationToken;
int32_t DirectoriesSuccessful = int32_t();
int32_t FilesSuccessful = int32_t();
int32_t FailureCount = int32_t();
@ -806,7 +806,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
struct PathDeleteResult
{
Azure::Core::Nullable<std::string> Continuation;
Azure::Core::Nullable<std::string> ContinuationToken;
};
struct PathSetAccessControlResult
@ -817,7 +817,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
struct PathSetAccessControlRecursiveResult
{
Azure::Core::Nullable<std::string> Continuation;
Azure::Core::Nullable<std::string> ContinuationToken;
int32_t DirectoriesSuccessful = int32_t();
int32_t FilesSuccessful = int32_t();
int32_t FailureCount = int32_t();
@ -866,12 +866,12 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
Azure::Core::Nullable<std::string>
Prefix; // Filters results to filesystems within the specified prefix.
Azure::Core::Nullable<std::string>
Continuation; // Optional. When deleting a directory, the number of paths that are
// deleted with each invocation is limited. If the number of paths to be
// deleted exceeds this limit, a continuation token is returned in this
// response header. When a continuation token is returned in the
// response, it must be specified in a subsequent invocation of the delete
// operation to continue deleting the directory.
ContinuationToken; // Optional. The number of paths processed with each invocation is
// limited. If the number of paths to be processed exceeds this
// limit, a continuation token is returned in the response header
// x-ms-continuation. When a continuation token is returned in the
// response, it must be percent-encoded and specified in a subsequent
// invocation of setAcessControlRecursive operation.
Azure::Core::Nullable<int32_t>
MaxResults; // An optional value that specifies the maximum number of items to return.
// If omitted or greater than 5,000, the response will include up to 5,000
@ -903,12 +903,12 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
Details::c_QueryPrefix,
Storage::Details::UrlEncodeQueryParameter(listFileSystemsOptions.Prefix.GetValue()));
}
if (listFileSystemsOptions.Continuation.HasValue())
if (listFileSystemsOptions.ContinuationToken.HasValue())
{
request.GetUrl().AppendQueryParameter(
Details::c_QueryContinuation,
Details::c_QueryContinuationToken,
Storage::Details::UrlEncodeQueryParameter(
listFileSystemsOptions.Continuation.GetValue()));
listFileSystemsOptions.ContinuationToken.GetValue()));
}
if (listFileSystemsOptions.MaxResults.HasValue())
{
@ -951,7 +951,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
if (response.GetHeaders().find(Details::c_HeaderXMsContinuation)
!= response.GetHeaders().end())
{
result.Continuation = response.GetHeaders().at(Details::c_HeaderXMsContinuation);
result.ContinuationToken = response.GetHeaders().at(Details::c_HeaderXMsContinuation);
}
return Azure::Core::Response<ServiceListFileSystemsResult>(
std::move(result), std::move(responsePtr));
@ -1209,12 +1209,12 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
= Details::c_DefaultServiceApiVersion; // Specifies the version of the operation to use
// for this request.
Azure::Core::Nullable<std::string>
Continuation; // Optional. When deleting a directory, the number of paths that are
// deleted with each invocation is limited. If the number of paths to be
// deleted exceeds this limit, a continuation token is returned in this
// response header. When a continuation token is returned in the
// response, it must be specified in a subsequent invocation of the delete
// operation to continue deleting the directory.
ContinuationToken; // Optional. The number of paths processed with each invocation is
// limited. If the number of paths to be processed exceeds this
// limit, a continuation token is returned in the response header
// x-ms-continuation. When a continuation token is returned in the
// response, it must be percent-encoded and specified in a subsequent
// invocation of setAcessControlRecursive operation.
Azure::Core::Nullable<std::string>
Directory; // Optional. Filters results to paths within the specified directory. An
// error occurs if the directory does not exist.
@ -1257,11 +1257,12 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
}
request.AddHeader(
Details::c_HeaderApiVersionParameter, listPathsOptions.ApiVersionParameter);
if (listPathsOptions.Continuation.HasValue())
if (listPathsOptions.ContinuationToken.HasValue())
{
request.GetUrl().AppendQueryParameter(
Details::c_QueryContinuation,
Storage::Details::UrlEncodeQueryParameter(listPathsOptions.Continuation.GetValue()));
Details::c_QueryContinuationToken,
Storage::Details::UrlEncodeQueryParameter(
listPathsOptions.ContinuationToken.GetValue()));
}
if (listPathsOptions.Directory.HasValue())
{
@ -1392,7 +1393,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
if (response.GetHeaders().find(Details::c_HeaderXMsContinuation)
!= response.GetHeaders().end())
{
result.Continuation = response.GetHeaders().at(Details::c_HeaderXMsContinuation);
result.ContinuationToken = response.GetHeaders().at(Details::c_HeaderXMsContinuation);
}
return Azure::Core::Response<FileSystemListPathsResult>(
std::move(result), std::move(responsePtr));
@ -1424,12 +1425,12 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
Resource; // Required only for Create File and Create Directory. The value must be
// "file" or "directory".
Azure::Core::Nullable<std::string>
Continuation; // Optional. When deleting a directory, the number of paths that are
// deleted with each invocation is limited. If the number of paths to be
// deleted exceeds this limit, a continuation token is returned in this
// response header. When a continuation token is returned in the
// response, it must be specified in a subsequent invocation of the delete
// operation to continue deleting the directory.
ContinuationToken; // Optional. The number of paths processed with each invocation is
// limited. If the number of paths to be processed exceeds this
// limit, a continuation token is returned in the response header
// x-ms-continuation. When a continuation token is returned in the
// response, it must be percent-encoded and specified in a subsequent
// invocation of setAcessControlRecursive operation.
Azure::Core::Nullable<PathRenameMode>
Mode; // Optional. Valid only when namespace is enabled. This parameter determines the
// behavior of the rename operation. The value must be "legacy" or "posix", and
@ -1537,11 +1538,12 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
Storage::Details::UrlEncodeQueryParameter(
PathResourceTypeToString(createOptions.Resource.GetValue())));
}
if (createOptions.Continuation.HasValue())
if (createOptions.ContinuationToken.HasValue())
{
request.GetUrl().AppendQueryParameter(
Details::c_QueryContinuation,
Storage::Details::UrlEncodeQueryParameter(createOptions.Continuation.GetValue()));
Details::c_QueryContinuationToken,
Storage::Details::UrlEncodeQueryParameter(
createOptions.ContinuationToken.GetValue()));
}
if (createOptions.Mode.HasValue())
{
@ -1669,12 +1671,12 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
// be applied. If omitted or greater than 2,000, the request will process up
// to 2,000 items
Azure::Core::Nullable<std::string>
Continuation; // Optional. The number of paths processed with each invocation is
// limited. If the number of paths to be processed exceeds this limit, a
// continuation token is returned in the response header
// x-ms-continuation. When a continuation token is returned in the
// response, it must be percent-encoded and specified in a subsequent
// invocation of setAcessControlRecursive operation.
ContinuationToken; // Optional. The number of paths processed with each invocation is
// limited. If the number of paths to be processed exceeds this
// limit, a continuation token is returned in the response header
// x-ms-continuation. When a continuation token is returned in the
// response, it must be percent-encoded and specified in a subsequent
// invocation of setAcessControlRecursive operation.
PathSetAccessControlRecursiveMode
Mode; // Mode "set" sets POSIX access control rights on files and directories, "modify"
// modifies one or more POSIX access control rights that pre-exist on files and
@ -1810,11 +1812,12 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
Storage::Details::UrlEncodeQueryParameter(
std::to_string(updateOptions.MaxRecords.GetValue())));
}
if (updateOptions.Continuation.HasValue())
if (updateOptions.ContinuationToken.HasValue())
{
request.GetUrl().AppendQueryParameter(
Details::c_QueryContinuation,
Storage::Details::UrlEncodeQueryParameter(updateOptions.Continuation.GetValue()));
Details::c_QueryContinuationToken,
Storage::Details::UrlEncodeQueryParameter(
updateOptions.ContinuationToken.GetValue()));
}
request.GetUrl().AppendQueryParameter(
Details::c_QueryPathSetAccessControlRecursiveMode,
@ -2263,12 +2266,12 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
// for this request.
Azure::Core::Nullable<bool> RecursiveOptional; // Required
Azure::Core::Nullable<std::string>
Continuation; // Optional. When deleting a directory, the number of paths that are
// deleted with each invocation is limited. If the number of paths to be
// deleted exceeds this limit, a continuation token is returned in this
// response header. When a continuation token is returned in the
// response, it must be specified in a subsequent invocation of the delete
// operation to continue deleting the directory.
ContinuationToken; // Optional. The number of paths processed with each invocation is
// limited. If the number of paths to be processed exceeds this
// limit, a continuation token is returned in the response header
// x-ms-continuation. When a continuation token is returned in the
// response, it must be percent-encoded and specified in a subsequent
// invocation of setAcessControlRecursive operation.
Azure::Core::Nullable<std::string>
LeaseIdOptional; // If specified, the operation only succeeds if the resource's lease is
// active and matches this ID.
@ -2311,11 +2314,12 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
Storage::Details::UrlEncodeQueryParameter(
(deleteOptions.RecursiveOptional.GetValue() ? "true" : "false")));
}
if (deleteOptions.Continuation.HasValue())
if (deleteOptions.ContinuationToken.HasValue())
{
request.GetUrl().AppendQueryParameter(
Details::c_QueryContinuation,
Storage::Details::UrlEncodeQueryParameter(deleteOptions.Continuation.GetValue()));
Details::c_QueryContinuationToken,
Storage::Details::UrlEncodeQueryParameter(
deleteOptions.ContinuationToken.GetValue()));
}
if (deleteOptions.LeaseIdOptional.HasValue())
{
@ -2459,12 +2463,12 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
// href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
// Timeouts for Blob Service Operations.</a>
Azure::Core::Nullable<std::string>
Continuation; // Optional. When deleting a directory, the number of paths that are
// deleted with each invocation is limited. If the number of paths to be
// deleted exceeds this limit, a continuation token is returned in this
// response header. When a continuation token is returned in the
// response, it must be specified in a subsequent invocation of the delete
// operation to continue deleting the directory.
ContinuationToken; // Optional. The number of paths processed with each invocation is
// limited. If the number of paths to be processed exceeds this
// limit, a continuation token is returned in the response header
// x-ms-continuation. When a continuation token is returned in the
// response, it must be percent-encoded and specified in a subsequent
// invocation of setAcessControlRecursive operation.
PathSetAccessControlRecursiveMode
Mode; // Mode "set" sets POSIX access control rights on files and directories, "modify"
// modifies one or more POSIX access control rights that pre-exist on files and
@ -2510,12 +2514,12 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
Storage::Details::UrlEncodeQueryParameter(
std::to_string(setAccessControlRecursiveOptions.Timeout.GetValue())));
}
if (setAccessControlRecursiveOptions.Continuation.HasValue())
if (setAccessControlRecursiveOptions.ContinuationToken.HasValue())
{
request.GetUrl().AppendQueryParameter(
Details::c_QueryContinuation,
Details::c_QueryContinuationToken,
Storage::Details::UrlEncodeQueryParameter(
setAccessControlRecursiveOptions.Continuation.GetValue()));
setAccessControlRecursiveOptions.ContinuationToken.GetValue()));
}
request.GetUrl().AppendQueryParameter(
Details::c_QueryPathSetAccessControlRecursiveMode,
@ -2899,7 +2903,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
if (response.GetHeaders().find(Details::c_HeaderXMsContinuation)
!= response.GetHeaders().end())
{
result.Continuation = response.GetHeaders().at(Details::c_HeaderXMsContinuation);
result.ContinuationToken = response.GetHeaders().at(Details::c_HeaderXMsContinuation);
}
if (response.GetHeaders().find(Details::c_HeaderContentLength)
!= response.GetHeaders().end())
@ -2989,7 +2993,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
if (response.GetHeaders().find(Details::c_HeaderXMsContinuation)
!= response.GetHeaders().end())
{
result.Continuation = response.GetHeaders().at(Details::c_HeaderXMsContinuation);
result.ContinuationToken = response.GetHeaders().at(Details::c_HeaderXMsContinuation);
}
return Azure::Core::Response<PathUpdateResult>(std::move(result), std::move(responsePtr));
}
@ -3323,7 +3327,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
if (response.GetHeaders().find(Details::c_HeaderXMsContinuation)
!= response.GetHeaders().end())
{
result.Continuation = response.GetHeaders().at(Details::c_HeaderXMsContinuation);
result.ContinuationToken = response.GetHeaders().at(Details::c_HeaderXMsContinuation);
}
return Azure::Core::Response<PathDeleteResult>(std::move(result), std::move(responsePtr));
}
@ -3374,7 +3378,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
if (response.GetHeaders().find(Details::c_HeaderXMsContinuation)
!= response.GetHeaders().end())
{
result.Continuation = response.GetHeaders().at(Details::c_HeaderXMsContinuation);
result.ContinuationToken = response.GetHeaders().at(Details::c_HeaderXMsContinuation);
}
return Azure::Core::Response<PathSetAccessControlRecursiveResult>(
std::move(result), std::move(responsePtr));

View File

@ -91,9 +91,9 @@ void DataLakeGettingStarted()
do
{
auto response = serviceClient.ListFileSystemsSegement();
if (response->Continuation.HasValue())
if (response->ContinuationToken.HasValue())
{
continuation = response->Continuation.GetValue();
continuation = response->ContinuationToken.GetValue();
}
fileSystems.insert(
fileSystems.end(), response->Filesystems.begin(), response->Filesystems.end());

View File

@ -164,7 +164,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
destinationDfsUri.SetPath(destinationFileSystem.GetValue() + '/' + destinationPath);
DataLakeRestClient::Path::CreateOptions protocolLayerOptions;
protocolLayerOptions.Continuation = options.Continuation;
protocolLayerOptions.ContinuationToken = options.ContinuationToken;
protocolLayerOptions.Mode = options.Mode;
protocolLayerOptions.SourceLeaseId = options.SourceAccessConditions.LeaseId;
protocolLayerOptions.LeaseIdOptional = options.AccessConditions.LeaseId;
@ -181,7 +181,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
destinationDfsUri, *m_pipeline, options.Context, protocolLayerOptions);
// At this point, there is not more exception thrown, meaning the rename is successful.
auto ret = RenameDirectoryResult();
ret.Continuation = std::move(result->Continuation);
ret.ContinuationToken = std::move(result->ContinuationToken);
return Azure::Core::Response<RenameDirectoryResult>(
std::move(ret), result.ExtractRawResponse());
}
@ -191,7 +191,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
const DeleteDirectoryOptions& options) const
{
DataLakeRestClient::Path::DeleteOptions protocolLayerOptions;
protocolLayerOptions.Continuation = options.Continuation;
protocolLayerOptions.ContinuationToken = options.ContinuationToken;
protocolLayerOptions.LeaseIdOptional = options.AccessConditions.LeaseId;
protocolLayerOptions.IfMatch = options.AccessConditions.IfMatch;
protocolLayerOptions.IfNoneMatch = options.AccessConditions.IfNoneMatch;
@ -210,7 +210,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
{
DataLakeRestClient::Path::SetAccessControlRecursiveOptions protocolLayerOptions;
protocolLayerOptions.Mode = mode;
protocolLayerOptions.Continuation = options.Continuation;
protocolLayerOptions.ContinuationToken = options.ContinuationToken;
protocolLayerOptions.MaxRecords = options.MaxRecords;
protocolLayerOptions.ForceFlag = options.ForceFlag;
protocolLayerOptions.Acl = Acl::SerializeAcls(acls);

View File

@ -250,7 +250,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
{
DataLakeRestClient::FileSystem::ListPathsOptions protocolLayerOptions;
protocolLayerOptions.Upn = options.UserPrincipalName;
protocolLayerOptions.Continuation = options.Continuation;
protocolLayerOptions.ContinuationToken = options.ContinuationToken;
protocolLayerOptions.MaxResults = options.MaxResults;
protocolLayerOptions.Directory = options.Directory;
protocolLayerOptions.RecursiveRequired = recursive;

View File

@ -267,7 +267,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
Azure::Core::Response<DeletePathResult> PathClient::Delete(const DeletePathOptions& options) const
{
DataLakeRestClient::Path::DeleteOptions protocolLayerOptions;
protocolLayerOptions.Continuation = options.Continuation;
protocolLayerOptions.ContinuationToken = options.ContinuationToken;
protocolLayerOptions.LeaseIdOptional = options.AccessConditions.LeaseId;
protocolLayerOptions.IfMatch = options.AccessConditions.IfMatch;
protocolLayerOptions.IfNoneMatch = options.AccessConditions.IfNoneMatch;

View File

@ -175,12 +175,12 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
Blobs::ListContainersSegmentOptions blobOptions;
blobOptions.Context = options.Context;
blobOptions.Prefix = options.Prefix;
blobOptions.ContinuationToken = options.Continuation;
blobOptions.ContinuationToken = options.ContinuationToken;
blobOptions.MaxResults = options.MaxResults;
auto result = m_blobServiceClient.ListBlobContainersSegment(blobOptions);
auto response = ListFileSystemsSegmentResult();
response.Continuation
= result->ContinuationToken.empty() ? response.Continuation : result->ContinuationToken;
response.ContinuationToken
= result->ContinuationToken.empty() ? response.ContinuationToken : result->ContinuationToken;
response.Filesystems = FileSystemsFromContainerItems(result->Items);
return Azure::Core::Response<ListFileSystemsSegmentResult>(
std::move(response), result.ExtractRawResponse());

View File

@ -63,10 +63,10 @@ namespace Azure { namespace Storage { namespace Test {
{
auto response = m_fileSystemClient->ListPaths(recursive, options);
result.insert(result.end(), response->Paths.begin(), response->Paths.end());
if (response->Continuation.HasValue())
if (response->ContinuationToken.HasValue())
{
continuation = response->Continuation.GetValue();
options.Continuation = continuation;
continuation = response->ContinuationToken.GetValue();
options.ContinuationToken = continuation;
}
else
{

View File

@ -65,10 +65,10 @@ namespace Azure { namespace Storage { namespace Test {
{
auto response = m_dataLakeServiceClient->ListFileSystemsSegement(options);
result.insert(result.end(), response->Filesystems.begin(), response->Filesystems.end());
if (response->Continuation.HasValue())
if (response->ContinuationToken.HasValue())
{
continuation = response->Continuation.GetValue();
options.Continuation = continuation;
continuation = response->ContinuationToken.GetValue();
options.ContinuationToken = continuation;
}
} while (!continuation.empty());
return result;

View File

@ -5,10 +5,6 @@
### New Features
* Service version is now 2020-02-10.
* CreateFromConnectionString now accepts unencoded file and directory name.
* Added support for getting range list with previous snapshot. `GetFileRangeListResult` now returns `std::vector<FileRange> Ranges` and `std::vector<FileRange> ClearRanges` instead of `std::vector<Range> RangeList`.
* Added support for SMB Multi-Channel setting for `ServiceClient::GetProperties` and `ServiceClient::SetProperties`. This is only available for Storage account with Premium File access.
- Standard account user has to remove the returned SMB Multi-Channel setting before set, otherwise service would return failure.
* Added support for leasing a share:
- ShareClient::AcquireLease
- ShareClient::ReleaseLease
@ -22,6 +18,9 @@
* Added support for getting range list with previous snapshot. `GetFileRangeListResult` now returns `std::vector<FileRange> Ranges` and `std::vector<FileRange> ClearRanges` instead of `std::vector<Range> RangeList`.
* Added support for SMB Multi-Channel setting for `ServiceClient::GetProperties` and `ServiceClient::SetProperties`. This is only available for Storage account with Premium File access.
- Standard account user has to remove the returned SMB Multi-Channel setting before set, otherwise service would return failure.
* `Marker` is renamed to `ContinuationToken` in options.
* `NextMarker` is renamed to `ContinuationToken` in returned result objects.
* `Marker` is renamed to `PreviousContinuationToken` in returned result objects.
## 1.0.0-beta.2 (2020-09-09)

View File

@ -28,7 +28,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
constexpr static const char* c_DefaultServiceApiVersion = "2020-02-10";
constexpr static const char* c_QueryCopyId = "copyid";
constexpr static const char* c_QueryListSharesInclude = "include";
constexpr static const char* c_QueryMarker = "marker";
constexpr static const char* c_QueryContinuationToken = "marker";
constexpr static const char* c_QueryMaxResults = "maxresults";
constexpr static const char* c_QueryPrefix = "prefix";
constexpr static const char* c_QueryPrevShareSnapshot = "prevsharesnapshot";
@ -99,11 +99,11 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
constexpr static const char* c_HeaderFileParentId = "x-ms-file-parent-id";
constexpr static const char* c_HeaderIsServerEncrypted = "x-ms-server-encrypted";
constexpr static const char* c_HeaderContentType = "content-type";
constexpr static const char* c_HeaderMarker = "x-ms-marker";
constexpr static const char* c_HeaderContinuationToken = "x-ms-marker";
constexpr static const char* c_HeaderNumberOfHandlesClosed = "x-ms-number-of-handles-closed";
constexpr static const char* c_HeaderNumberOfHandlesFailedToClose
= "x-ms-number-of-handles-failed";
constexpr static const char* c_HeaderFileContentLength = "x-ms-content-length";
constexpr static const char* c_HeaderXMsContentLength = "x-ms-content-length";
constexpr static const char* c_HeaderContentRange = "content-range";
constexpr static const char* c_HeaderTransactionalContentMd5 = "content-md5";
constexpr static const char* c_HeaderContentEncoding = "content-encoding";
@ -117,6 +117,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
constexpr static const char* c_HeaderCopyProgress = "x-ms-copy-progress";
constexpr static const char* c_HeaderCopyStatus = "x-ms-copy-status";
constexpr static const char* c_HeaderFileType = "x-ms-type";
constexpr static const char* c_HeaderXMsRange = "x-ms-range";
constexpr static const char* c_HeaderFileRangeWrite = "x-ms-write";
constexpr static const char* c_HeaderFileRangeWriteTypeDefault = "update";
constexpr static const char* c_HeaderXMsContentCrc64 = "x-ms-content-crc64";
@ -494,17 +495,17 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
std::string ShareSnapshot;
std::string DirectoryPath;
std::string Prefix;
std::string Marker;
std::string PreviousContinuationToken;
int32_t MaxResults = int32_t();
FilesAndDirectoriesListSegment Segment;
std::string NextMarker;
std::string ContinuationToken;
};
// An enumeration of handles.
struct ListHandlesResponse
{
std::vector<HandleItem> HandleList;
std::string NextMarker;
std::string ContinuationToken;
};
// Properties of a share.
@ -542,10 +543,10 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
{
std::string ServiceEndpoint;
std::string Prefix;
std::string Marker;
std::string PreviousContinuationToken;
int32_t MaxResults = int32_t();
std::vector<ShareItem> ShareItems;
std::string NextMarker;
std::string ContinuationToken;
};
// The retention policy.
@ -798,10 +799,10 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
{
std::string ServiceEndpoint;
std::string Prefix;
std::string Marker;
std::string PreviousContinuationToken;
int32_t MaxResults = int32_t();
std::vector<ShareItem> ShareItems;
std::string NextMarker;
std::string ContinuationToken;
};
struct ShareCreateResult
@ -983,23 +984,23 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
std::string ShareSnapshot;
std::string DirectoryPath;
std::string Prefix;
std::string Marker;
std::string PreviousContinuationToken;
int32_t MaxResults = int32_t();
FilesAndDirectoriesListSegment Segment;
std::string NextMarker;
std::string ContinuationToken;
FileShareHttpHeaders HttpHeaders;
};
struct DirectoryListHandlesResult
{
std::vector<HandleItem> HandleList;
std::string NextMarker;
std::string ContinuationToken;
FileShareHttpHeaders HttpHeaders;
};
struct DirectoryForceCloseHandlesResult
{
Azure::Core::Nullable<std::string> marker;
Azure::Core::Nullable<std::string> ContinuationToken;
int32_t numberOfHandlesClosed = int32_t();
int32_t numberOfHandlesFailedToClose = int32_t();
};
@ -1166,13 +1167,13 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
struct FileListHandlesResult
{
std::vector<HandleItem> HandleList;
std::string NextMarker;
std::string ContinuationToken;
FileShareHttpHeaders HttpHeaders;
};
struct FileForceCloseHandlesResult
{
Azure::Core::Nullable<std::string> marker;
Azure::Core::Nullable<std::string> ContinuationToken;
int32_t numberOfHandlesClosed = int32_t();
int32_t numberOfHandlesFailedToClose = int32_t();
};
@ -1260,11 +1261,12 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
Azure::Core::Nullable<std::string> Prefix; // Filters the results to return only entries
// whose name begins with the specified prefix.
Azure::Core::Nullable<std::string>
Marker; // A string value that identifies the portion of the list to be returned with
// the next list operation. The operation returns a marker value within the
// response body if the list returned was not complete. The marker value may
// then be used in a subsequent call to request the next set of list items. The
// marker value is opaque to the client.
ContinuationToken; // A string value that identifies the portion of the list to be
// returned with the next list operation. The operation returns a
// marker value within the response body if the list returned was not
// complete. The marker value may then be used in a subsequent call
// to request the next set of list items. The marker value is opaque
// to the client.
Azure::Core::Nullable<int32_t>
MaxResults; // Specifies the maximum number of entries to return. If the request does
// not specify maxresults, or specifies a value greater than 5,000, the
@ -1296,12 +1298,12 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
Storage::Details::UrlEncodeQueryParameter(
listSharesSegmentOptions.Prefix.GetValue()));
}
if (listSharesSegmentOptions.Marker.HasValue())
if (listSharesSegmentOptions.ContinuationToken.HasValue())
{
request.GetUrl().AppendQueryParameter(
Details::c_QueryMarker,
Details::c_QueryContinuationToken,
Storage::Details::UrlEncodeQueryParameter(
listSharesSegmentOptions.Marker.GetValue()));
listSharesSegmentOptions.ContinuationToken.GetValue()));
}
if (listSharesSegmentOptions.MaxResults.HasValue())
{
@ -2513,9 +2515,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
else if (node.Type == XmlNodeType::Text)
{
if (path.size() == 2 && path[0] == XmlTagName::c_EnumerationResults
&& path[1] == XmlTagName::c_Marker)
&& path[1] == XmlTagName::c_NextMarker)
{
result.Marker = node.Value;
result.ContinuationToken = node.Value;
}
else if (
path.size() == 2 && path[0] == XmlTagName::c_EnumerationResults
@ -2523,18 +2525,18 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
{
result.MaxResults = std::stoi(node.Value);
}
else if (
path.size() == 2 && path[0] == XmlTagName::c_EnumerationResults
&& path[1] == XmlTagName::c_NextMarker)
{
result.NextMarker = node.Value;
}
else if (
path.size() == 2 && path[0] == XmlTagName::c_EnumerationResults
&& path[1] == XmlTagName::c_Prefix)
{
result.Prefix = node.Value;
}
else if (
path.size() == 2 && path[0] == XmlTagName::c_EnumerationResults
&& path[1] == XmlTagName::c_Marker)
{
result.PreviousContinuationToken = node.Value;
}
}
else if (node.Type == XmlNodeType::Attribute)
{
@ -2554,10 +2556,10 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
ServiceListSharesSegmentResult result;
result.ServiceEndpoint = std::move(object.ServiceEndpoint);
result.Prefix = std::move(object.Prefix);
result.Marker = std::move(object.Marker);
result.PreviousContinuationToken = std::move(object.PreviousContinuationToken);
result.MaxResults = object.MaxResults;
result.ShareItems = std::move(object.ShareItems);
result.NextMarker = std::move(object.NextMarker);
result.ContinuationToken = std::move(object.ContinuationToken);
return result;
}
@ -4484,11 +4486,12 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
ShareSnapshot; // The snapshot parameter is an opaque DateTime value that, when present,
// specifies the share snapshot to query.
Azure::Core::Nullable<std::string>
Marker; // A string value that identifies the portion of the list to be returned with
// the next list operation. The operation returns a marker value within the
// response body if the list returned was not complete. The marker value may
// then be used in a subsequent call to request the next set of list items. The
// marker value is opaque to the client.
ContinuationToken; // A string value that identifies the portion of the list to be
// returned with the next list operation. The operation returns a
// marker value within the response body if the list returned was not
// complete. The marker value may then be used in a subsequent call
// to request the next set of list items. The marker value is opaque
// to the client.
Azure::Core::Nullable<int32_t>
MaxResults; // Specifies the maximum number of entries to return. If the request does
// not specify maxresults, or specifies a value greater than 5,000, the
@ -4526,12 +4529,12 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
Storage::Details::UrlEncodeQueryParameter(
listFilesAndDirectoriesSegmentOptions.ShareSnapshot.GetValue()));
}
if (listFilesAndDirectoriesSegmentOptions.Marker.HasValue())
if (listFilesAndDirectoriesSegmentOptions.ContinuationToken.HasValue())
{
request.GetUrl().AppendQueryParameter(
Details::c_QueryMarker,
Details::c_QueryContinuationToken,
Storage::Details::UrlEncodeQueryParameter(
listFilesAndDirectoriesSegmentOptions.Marker.GetValue()));
listFilesAndDirectoriesSegmentOptions.ContinuationToken.GetValue()));
}
if (listFilesAndDirectoriesSegmentOptions.MaxResults.HasValue())
{
@ -4555,11 +4558,12 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
struct ListHandlesOptions
{
Azure::Core::Nullable<std::string>
Marker; // A string value that identifies the portion of the list to be returned with
// the next list operation. The operation returns a marker value within the
// response body if the list returned was not complete. The marker value may
// then be used in a subsequent call to request the next set of list items. The
// marker value is opaque to the client.
ContinuationToken; // A string value that identifies the portion of the list to be
// returned with the next list operation. The operation returns a
// marker value within the response body if the list returned was not
// complete. The marker value may then be used in a subsequent call
// to request the next set of list items. The marker value is opaque
// to the client.
Azure::Core::Nullable<int32_t>
MaxResults; // Specifies the maximum number of entries to return. If the request does
// not specify maxresults, or specifies a value greater than 5,000, the
@ -4587,11 +4591,12 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
{
Azure::Core::Http::Request request(Azure::Core::Http::HttpMethod::Get, url);
request.GetUrl().AppendQueryParameter(Details::c_QueryComp, "listhandles");
if (listHandlesOptions.Marker.HasValue())
if (listHandlesOptions.ContinuationToken.HasValue())
{
request.GetUrl().AppendQueryParameter(
Details::c_QueryMarker,
Storage::Details::UrlEncodeQueryParameter(listHandlesOptions.Marker.GetValue()));
Details::c_QueryContinuationToken,
Storage::Details::UrlEncodeQueryParameter(
listHandlesOptions.ContinuationToken.GetValue()));
}
if (listHandlesOptions.MaxResults.HasValue())
{
@ -4631,11 +4636,12 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
// href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting
// Timeouts for File Service Operations.</a>
Azure::Core::Nullable<std::string>
Marker; // A string value that identifies the portion of the list to be returned with
// the next list operation. The operation returns a marker value within the
// response body if the list returned was not complete. The marker value may
// then be used in a subsequent call to request the next set of list items. The
// marker value is opaque to the client.
ContinuationToken; // A string value that identifies the portion of the list to be
// returned with the next list operation. The operation returns a
// marker value within the response body if the list returned was not
// complete. The marker value may then be used in a subsequent call
// to request the next set of list items. The marker value is opaque
// to the client.
Azure::Core::Nullable<std::string>
ShareSnapshot; // The snapshot parameter is an opaque DateTime value that, when present,
// specifies the share snapshot to query.
@ -4665,12 +4671,12 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
Storage::Details::UrlEncodeQueryParameter(
std::to_string(forceCloseHandlesOptions.Timeout.GetValue())));
}
if (forceCloseHandlesOptions.Marker.HasValue())
if (forceCloseHandlesOptions.ContinuationToken.HasValue())
{
request.GetUrl().AppendQueryParameter(
Details::c_QueryMarker,
Details::c_QueryContinuationToken,
Storage::Details::UrlEncodeQueryParameter(
forceCloseHandlesOptions.Marker.GetValue()));
forceCloseHandlesOptions.ContinuationToken.GetValue()));
}
if (forceCloseHandlesOptions.ShareSnapshot.HasValue())
{
@ -5159,9 +5165,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
else if (node.Type == XmlNodeType::Text)
{
if (path.size() == 2 && path[0] == XmlTagName::c_EnumerationResults
&& path[1] == XmlTagName::c_Marker)
&& path[1] == XmlTagName::c_NextMarker)
{
result.Marker = node.Value;
result.ContinuationToken = node.Value;
}
else if (
path.size() == 2 && path[0] == XmlTagName::c_EnumerationResults
@ -5169,18 +5175,18 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
{
result.MaxResults = std::stoi(node.Value);
}
else if (
path.size() == 2 && path[0] == XmlTagName::c_EnumerationResults
&& path[1] == XmlTagName::c_NextMarker)
{
result.NextMarker = node.Value;
}
else if (
path.size() == 2 && path[0] == XmlTagName::c_EnumerationResults
&& path[1] == XmlTagName::c_Prefix)
{
result.Prefix = node.Value;
}
else if (
path.size() == 2 && path[0] == XmlTagName::c_EnumerationResults
&& path[1] == XmlTagName::c_Marker)
{
result.PreviousContinuationToken = node.Value;
}
}
else if (node.Type == XmlNodeType::Attribute)
{
@ -5222,10 +5228,10 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
result.ShareSnapshot = std::move(object.ShareSnapshot);
result.DirectoryPath = std::move(object.DirectoryPath);
result.Prefix = std::move(object.Prefix);
result.Marker = std::move(object.Marker);
result.PreviousContinuationToken = std::move(object.PreviousContinuationToken);
result.MaxResults = object.MaxResults;
result.Segment = std::move(object.Segment);
result.NextMarker = std::move(object.NextMarker);
result.ContinuationToken = std::move(object.ContinuationToken);
return result;
}
@ -5435,7 +5441,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
if (path.size() == 2 && path[0] == XmlTagName::c_EnumerationResults
&& path[1] == XmlTagName::c_NextMarker)
{
result.NextMarker = node.Value;
result.ContinuationToken = node.Value;
}
}
}
@ -5447,7 +5453,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
{
DirectoryListHandlesResult result;
result.HandleList = std::move(object.HandleList);
result.NextMarker = std::move(object.NextMarker);
result.ContinuationToken = std::move(object.ContinuationToken);
return result;
}
@ -5460,9 +5466,10 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
{
// Success.
DirectoryForceCloseHandlesResult result;
if (response.GetHeaders().find(Details::c_HeaderMarker) != response.GetHeaders().end())
if (response.GetHeaders().find(Details::c_HeaderContinuationToken)
!= response.GetHeaders().end())
{
result.marker = response.GetHeaders().at(Details::c_HeaderMarker);
result.ContinuationToken = response.GetHeaders().at(Details::c_HeaderContinuationToken);
}
result.numberOfHandlesClosed
= std::stoi(response.GetHeaders().at(Details::c_HeaderNumberOfHandlesClosed));
@ -5545,7 +5552,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
}
request.AddHeader(Details::c_HeaderVersion, createOptions.ApiVersionParameter);
request.AddHeader(
Details::c_HeaderFileContentLength, std::to_string(createOptions.XMsContentLength));
Details::c_HeaderXMsContentLength, std::to_string(createOptions.XMsContentLength));
request.AddHeader(Details::c_HeaderFileTypeConstant, "file");
if (createOptions.FileContentType.HasValue())
{
@ -5814,7 +5821,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
if (setHttpHeadersOptions.XMsContentLength.HasValue())
{
request.AddHeader(
Details::c_HeaderFileContentLength,
Details::c_HeaderXMsContentLength,
std::to_string(setHttpHeadersOptions.XMsContentLength.GetValue()));
}
if (setHttpHeadersOptions.FileContentType.HasValue())
@ -6187,7 +6194,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
Storage::Details::UrlEncodeQueryParameter(
std::to_string(uploadRangeOptions.Timeout.GetValue())));
}
request.AddHeader(Details::c_HeaderRange, uploadRangeOptions.XMsRange);
request.AddHeader(Details::c_HeaderXMsRange, uploadRangeOptions.XMsRange);
request.AddHeader(
Details::c_HeaderFileRangeWrite,
FileRangeWriteTypeToString(uploadRangeOptions.XMsWrite));
@ -6358,7 +6365,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
request.AddHeader(Details::c_HeaderVersion, getRangeListOptions.ApiVersionParameter);
if (getRangeListOptions.XMsRange.HasValue())
{
request.AddHeader(Details::c_HeaderRange, getRangeListOptions.XMsRange.GetValue());
request.AddHeader(Details::c_HeaderXMsRange, getRangeListOptions.XMsRange.GetValue());
}
if (getRangeListOptions.LeaseIdOptional.HasValue())
{
@ -6562,11 +6569,12 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
struct ListHandlesOptions
{
Azure::Core::Nullable<std::string>
Marker; // A string value that identifies the portion of the list to be returned with
// the next list operation. The operation returns a marker value within the
// response body if the list returned was not complete. The marker value may
// then be used in a subsequent call to request the next set of list items. The
// marker value is opaque to the client.
ContinuationToken; // A string value that identifies the portion of the list to be
// returned with the next list operation. The operation returns a
// marker value within the response body if the list returned was not
// complete. The marker value may then be used in a subsequent call
// to request the next set of list items. The marker value is opaque
// to the client.
Azure::Core::Nullable<int32_t>
MaxResults; // Specifies the maximum number of entries to return. If the request does
// not specify maxresults, or specifies a value greater than 5,000, the
@ -6591,11 +6599,12 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
{
Azure::Core::Http::Request request(Azure::Core::Http::HttpMethod::Get, url);
request.GetUrl().AppendQueryParameter(Details::c_QueryComp, "listhandles");
if (listHandlesOptions.Marker.HasValue())
if (listHandlesOptions.ContinuationToken.HasValue())
{
request.GetUrl().AppendQueryParameter(
Details::c_QueryMarker,
Storage::Details::UrlEncodeQueryParameter(listHandlesOptions.Marker.GetValue()));
Details::c_QueryContinuationToken,
Storage::Details::UrlEncodeQueryParameter(
listHandlesOptions.ContinuationToken.GetValue()));
}
if (listHandlesOptions.MaxResults.HasValue())
{
@ -6629,11 +6638,12 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
// href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting
// Timeouts for File Service Operations.</a>
Azure::Core::Nullable<std::string>
Marker; // A string value that identifies the portion of the list to be returned with
// the next list operation. The operation returns a marker value within the
// response body if the list returned was not complete. The marker value may
// then be used in a subsequent call to request the next set of list items. The
// marker value is opaque to the client.
ContinuationToken; // A string value that identifies the portion of the list to be
// returned with the next list operation. The operation returns a
// marker value within the response body if the list returned was not
// complete. The marker value may then be used in a subsequent call
// to request the next set of list items. The marker value is opaque
// to the client.
Azure::Core::Nullable<std::string>
ShareSnapshot; // The snapshot parameter is an opaque DateTime value that, when present,
// specifies the share snapshot to query.
@ -6660,12 +6670,12 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
Storage::Details::UrlEncodeQueryParameter(
std::to_string(forceCloseHandlesOptions.Timeout.GetValue())));
}
if (forceCloseHandlesOptions.Marker.HasValue())
if (forceCloseHandlesOptions.ContinuationToken.HasValue())
{
request.GetUrl().AppendQueryParameter(
Details::c_QueryMarker,
Details::c_QueryContinuationToken,
Storage::Details::UrlEncodeQueryParameter(
forceCloseHandlesOptions.Marker.GetValue()));
forceCloseHandlesOptions.ContinuationToken.GetValue()));
}
if (forceCloseHandlesOptions.ShareSnapshot.HasValue())
{
@ -7335,7 +7345,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
result.LastModified = response.GetHeaders().at(Details::c_HeaderLastModified);
result.ETag = response.GetHeaders().at(Details::c_HeaderETag);
result.FileContentLength
= std::stoll(response.GetHeaders().at(Details::c_HeaderFileContentLength));
= std::stoll(response.GetHeaders().at(Details::c_HeaderXMsContentLength));
return Azure::Core::Response<FileGetRangeListResult>(
std::move(result), std::move(responsePtr));
}
@ -7800,7 +7810,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
if (path.size() == 2 && path[0] == XmlTagName::c_EnumerationResults
&& path[1] == XmlTagName::c_NextMarker)
{
result.NextMarker = node.Value;
result.ContinuationToken = node.Value;
}
}
}
@ -7812,7 +7822,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
{
FileListHandlesResult result;
result.HandleList = std::move(object.HandleList);
result.NextMarker = std::move(object.NextMarker);
result.ContinuationToken = std::move(object.ContinuationToken);
return result;
}
@ -7825,9 +7835,10 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
{
// Success.
FileForceCloseHandlesResult result;
if (response.GetHeaders().find(Details::c_HeaderMarker) != response.GetHeaders().end())
if (response.GetHeaders().find(Details::c_HeaderContinuationToken)
!= response.GetHeaders().end())
{
result.marker = response.GetHeaders().at(Details::c_HeaderMarker);
result.ContinuationToken = response.GetHeaders().at(Details::c_HeaderContinuationToken);
}
result.numberOfHandlesClosed
= std::stoi(response.GetHeaders().at(Details::c_HeaderNumberOfHandlesClosed));

View File

@ -91,7 +91,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
* returned was not complete. The marker value may then be used in a subsequent call to request
* the next set of list items. The marker value is opaque to the client.
*/
Azure::Core::Nullable<std::string> Marker;
Azure::Core::Nullable<std::string> ContinuationToken;
/**
* @brief Specifies the maximum number of entries to return. If the request does not specify
@ -377,7 +377,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
* returned was not complete. The marker value may then be used in a subsequent call to request
* the next set of list items. The marker value is opaque to the client.
*/
Azure::Core::Nullable<std::string> Marker;
Azure::Core::Nullable<std::string> ContinuationToken;
/**
* @brief Specifies the maximum number of entries to return. If the request does not specify
@ -400,7 +400,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
* returned was not complete. The marker value may then be used in a subsequent call to request
* the next set of list items. The marker value is opaque to the client.
*/
Azure::Core::Nullable<std::string> Marker;
Azure::Core::Nullable<std::string> ContinuationToken;
/**
* @brief Specifies the maximum number of entries to return. If the request does not specify
@ -437,7 +437,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
* close was not complete. The marker value may then be used in a subsequent call to
* close the next handle. The marker value is opaque to the client.
*/
Azure::Core::Nullable<std::string> Marker;
Azure::Core::Nullable<std::string> ContinuationToken;
/**
* @brief Specifies operation should apply to the directory specified in the URI, its files, its
@ -750,7 +750,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
* returned was not complete. The marker value may then be used in a subsequent call to request
* the next set of list items. The marker value is opaque to the client.
*/
Azure::Core::Nullable<std::string> Marker;
Azure::Core::Nullable<std::string> ContinuationToken;
/**
* @brief Specifies the maximum number of entries to return. If the request does not specify
@ -781,7 +781,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
* close was not complete. The marker value may then be used in a subsequent call to
* close the next handle. The marker value is opaque to the client.
*/
Azure::Core::Nullable<std::string> Marker;
Azure::Core::Nullable<std::string> ContinuationToken;
};
/**

View File

@ -52,9 +52,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
std::string ShareSnapshot;
std::string DirectoryPath;
std::string Prefix;
std::string Marker;
std::string PreviousContinuationToken;
int32_t MaxResults = int32_t();
std::string NextMarker;
std::string ContinuationToken;
std::vector<DirectoryItem> DirectoryItems;
std::vector<FileItem> FileItems;
};
@ -62,7 +62,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
struct ListDirectoryHandlesSegmentResult
{
std::vector<HandleItem> HandleList;
std::string NextMarker;
std::string ContinuationToken;
};
struct FileShareSmbProperties

View File

@ -253,7 +253,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
{
auto protocolLayerOptions = ShareRestClient::Directory::ListFilesAndDirectoriesSegmentOptions();
protocolLayerOptions.Prefix = options.Prefix;
protocolLayerOptions.Marker = options.Marker;
protocolLayerOptions.ContinuationToken = options.ContinuationToken;
protocolLayerOptions.MaxResults = options.MaxResults;
auto result = ShareRestClient::Directory::ListFilesAndDirectoriesSegment(
m_shareUri, *m_pipeline, options.Context, protocolLayerOptions);
@ -263,9 +263,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
ret.ShareSnapshot = std::move(result->ShareSnapshot);
ret.DirectoryPath = std::move(result->DirectoryPath);
ret.Prefix = std::move(result->Prefix);
ret.Marker = std::move(result->Marker);
ret.PreviousContinuationToken = std::move(result->PreviousContinuationToken);
ret.MaxResults = result->MaxResults;
ret.NextMarker = std::move(result->NextMarker);
ret.ContinuationToken = std::move(result->ContinuationToken);
ret.DirectoryItems = std::move(result->Segment.DirectoryItems);
ret.FileItems = std::move(result->Segment.FileItems);

View File

@ -257,7 +257,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
{
auto protocolLayerOptions = ShareRestClient::Directory::ListFilesAndDirectoriesSegmentOptions();
protocolLayerOptions.Prefix = options.Prefix;
protocolLayerOptions.Marker = options.Marker;
protocolLayerOptions.ContinuationToken = options.ContinuationToken;
protocolLayerOptions.MaxResults = options.MaxResults;
auto result = ShareRestClient::Directory::ListFilesAndDirectoriesSegment(
m_shareDirectoryUri, *m_pipeline, options.Context, protocolLayerOptions);
@ -267,9 +267,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
ret.ShareSnapshot = std::move(result->ShareSnapshot);
ret.DirectoryPath = std::move(result->DirectoryPath);
ret.Prefix = std::move(result->Prefix);
ret.Marker = std::move(result->Marker);
ret.PreviousContinuationToken = std::move(result->PreviousContinuationToken);
ret.MaxResults = result->MaxResults;
ret.NextMarker = std::move(result->NextMarker);
ret.ContinuationToken = std::move(result->ContinuationToken);
ret.DirectoryItems = std::move(result->Segment.DirectoryItems);
ret.FileItems = std::move(result->Segment.FileItems);
@ -281,13 +281,13 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
const ListDirectoryHandlesSegmentOptions& options) const
{
auto protocolLayerOptions = ShareRestClient::Directory::ListHandlesOptions();
protocolLayerOptions.Marker = options.Marker;
protocolLayerOptions.ContinuationToken = options.ContinuationToken;
protocolLayerOptions.MaxResults = options.MaxResults;
protocolLayerOptions.Recursive = options.Recursive;
auto result = ShareRestClient::Directory::ListHandles(
m_shareDirectoryUri, *m_pipeline, options.Context, protocolLayerOptions);
ListDirectoryHandlesSegmentResult ret;
ret.NextMarker = std::move(result->NextMarker);
ret.ContinuationToken = std::move(result->ContinuationToken);
ret.HandleList = std::move(result->HandleList);
return Azure::Core::Response<ListDirectoryHandlesSegmentResult>(
@ -311,7 +311,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
{
auto protocolLayerOptions = ShareRestClient::Directory::ForceCloseHandlesOptions();
protocolLayerOptions.HandleId = c_FileAllHandles;
protocolLayerOptions.Marker = options.Marker;
protocolLayerOptions.ContinuationToken = options.ContinuationToken;
protocolLayerOptions.Recursive = options.Recursive;
return ShareRestClient::Directory::ForceCloseHandles(
m_shareDirectoryUri, *m_pipeline, options.Context, protocolLayerOptions);

View File

@ -485,12 +485,12 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
const ListFileHandlesSegmentOptions& options) const
{
auto protocolLayerOptions = ShareRestClient::File::ListHandlesOptions();
protocolLayerOptions.Marker = options.Marker;
protocolLayerOptions.ContinuationToken = options.ContinuationToken;
protocolLayerOptions.MaxResults = options.MaxResults;
auto result = ShareRestClient::File::ListHandles(
m_shareFileUri, *m_pipeline, options.Context, protocolLayerOptions);
ListFileHandlesSegmentResult ret;
ret.NextMarker = std::move(result->NextMarker);
ret.ContinuationToken = std::move(result->ContinuationToken);
ret.HandleList = std::move(result->HandleList);
return Azure::Core::Response<ListFileHandlesSegmentResult>(
@ -514,7 +514,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
{
auto protocolLayerOptions = ShareRestClient::File::ForceCloseHandlesOptions();
protocolLayerOptions.HandleId = c_FileAllHandles;
protocolLayerOptions.Marker = options.Marker;
protocolLayerOptions.ContinuationToken = options.ContinuationToken;
return ShareRestClient::File::ForceCloseHandles(
m_shareFileUri, *m_pipeline, options.Context, protocolLayerOptions);
}

View File

@ -120,7 +120,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
{
auto protocolLayerOptions = ShareRestClient::Service::ListSharesSegmentOptions();
protocolLayerOptions.ListSharesInclude = options.ListSharesInclude;
protocolLayerOptions.Marker = options.Marker;
protocolLayerOptions.ContinuationToken = options.ContinuationToken;
protocolLayerOptions.MaxResults = options.MaxResults;
protocolLayerOptions.Prefix = options.Prefix;
return ShareRestClient::Service::ListSharesSegment(

View File

@ -60,8 +60,8 @@ namespace Azure { namespace Storage { namespace Test {
directoryResult.insert(
directoryResult.end(), response->DirectoryItems.begin(), response->DirectoryItems.end());
fileResult.insert(fileResult.end(), response->FileItems.begin(), response->FileItems.end());
continuation = response->NextMarker;
options.Marker = continuation;
continuation = response->ContinuationToken;
options.ContinuationToken = continuation;
} while (!continuation.empty());
return std::
make_pair<std::vector<Files::Shares::FileItem>, std::vector<Files::Shares::DirectoryItem>>(
@ -349,7 +349,7 @@ namespace Azure { namespace Storage { namespace Test {
{
auto result = m_fileShareDirectoryClient->ListHandlesSegment();
EXPECT_TRUE(result->HandleList.empty());
EXPECT_TRUE(result->NextMarker.empty());
EXPECT_TRUE(result->ContinuationToken.empty());
EXPECT_NO_THROW(m_fileShareDirectoryClient->ForceCloseAllHandles());
}
}}} // namespace Azure::Storage::Test

View File

@ -210,7 +210,7 @@ namespace Azure { namespace Storage { namespace Test {
{
auto result = m_fileClient->ListHandlesSegment();
EXPECT_TRUE(result->HandleList.empty());
EXPECT_TRUE(result->NextMarker.empty());
EXPECT_TRUE(result->ContinuationToken.empty());
EXPECT_NO_THROW(m_fileClient->ForceCloseAllHandles());
}

View File

@ -67,8 +67,8 @@ namespace Azure { namespace Storage { namespace Test {
{
auto response = m_fileShareServiceClient->ListSharesSegment(options);
result.insert(result.end(), response->ShareItems.begin(), response->ShareItems.end());
continuation = response->NextMarker;
options.Marker = continuation;
continuation = response->ContinuationToken;
options.ContinuationToken = continuation;
} while (!continuation.empty());
return result;
}