Rename some return types and options (#1941)
* rename some return types and options * fix changelog * BodyStream reference in blob protocol layer * PathClient::GetAccessControlList returns PathAccessControlList * more changelog * changelog * move UndeleteBlobContainerResult to _detail
This commit is contained in:
parent
b88eb6d785
commit
a66592c99e
@ -10,25 +10,36 @@
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
- Changed the return type of `StartCopyFromUri` and `StartCopyIncremental` API from a `Response<T>` to the particular `Operation<T>` type called `StartCopyBlobOperation` directly.
|
||||
- Changed the return type of `StartCopyFromUri` and `StartCopyIncremental` API from a `Response<T>` to the particular `Operation<T>` type called `StartBlobCopyOperation` directly.
|
||||
- String conversion functions of extensible enums were renamed from `Get()` to `ToString()`.
|
||||
- Moved `SecondaryHostForRetryReads` out of retry options, now it's under `BlobClientOptions`.
|
||||
- Changed the return types of the following APIs:
|
||||
- `BlobServiceClient::DeleteBlobContainer` now returns `Azure::Core::Response<Models::DeleteBlobContainerResult>`.
|
||||
- `BlobServiceClient::DeleteBlobContainer` now returns `DeleteBlobContainerResult`.
|
||||
- `BlobServiceClient::GetUserDelegationKey` now returns `UserDelegationKey`.
|
||||
- `BlobServiceClient::GetProperties` now returns `BlobServiceProperties`.
|
||||
- `BlobServiceClient::GetAccountInfo` now returns `AccountInfo`.
|
||||
- `BlobServiceClient::GetStatistics` now returns `ServiceStatistics`.
|
||||
- `BlobContainerClient::DeleteBlob` now returns `Azure::Core::Response<Models::DeleteBlobResult>`.
|
||||
- `BlobContainerClient::DeleteBlob` now returns `DeleteBlobResult`.
|
||||
- `BlobContainerClient::GetProperties` now returns `BlobContainerProperties`.
|
||||
- `BlobContainerClient::GetAccessPolicy` now returns `BlobContainerAccessPolicy`.
|
||||
- `BlobClient::GetProperties` now returns `BlobProperties`.
|
||||
- `BlobClinet::GetTags` now returns `std::map<std::string, std::string>`.
|
||||
- Removed `PreviousShareSnapshot` from `GetShareFileRangeListOptions`, use `ShareFileClient::GetRangeListDiff` instead.
|
||||
- `BlobClient::AbortCopyFromUri` now returns `AbortBlobCopyFromUriResult`.
|
||||
- `PageBlobClient::UploadPages` now returns `UploadPagesResult`.
|
||||
- `PageBlobClient::UploadPagesFromUri` now returns `UploadPagesFromUriResult`.
|
||||
- `PageBlobClient::ClearPages` now returns `ClearPagesResult`.
|
||||
- `PageBlobClient::GetPageRanges`, `PageBlobClient::GetPageRangesDiff` and `PageBlobClient::GetManagedDiskPageRangesDiff` now return `GetPageRangesResult`.
|
||||
- Renamed some options:
|
||||
- Renamed `UploadPageBlobPagesOptions` to `UploadPagesOptions`.
|
||||
- Renamed `UploadPageBlobPagesFromUriOptions` to `UploadPagesFromUriOptions`.
|
||||
- Renamed `ClearPageBlobPagesOptions` to `ClearPagesOptions`.
|
||||
- Renamed `GetPageBlobPageRangesOptions` to `GetPageRangesOptions`.
|
||||
- Renamed `StartCopyBlobFromUriOptions` to `StartBlobCopyFromUriOptions`.
|
||||
- Renamed `StartCopyPageBlobIncrementalOptions` to `StartBlobCopyIncrementalOptions`.
|
||||
- Removed `Blob` from the name of lease options and return types, like `AcquireBlobLeaseOptions` was renamed to `AcquireLeaseOptions`.
|
||||
- Removed `Blob` prefix from the name of structs `BlobGeoReplication`, `BlobLeaseStatus`, `BlobLeaseState`, `BlobLeaseDurationType`, `BlobAnalyticsLogging`, `BlobMetrics`, `BlobCorsRule`, `BlobRetentionPolicy`, `BlobStaticWebsite`, `BlobArchiveStatus` and `BlobGeoReplictionStatus`.
|
||||
- Removed `RequestId` from return types.
|
||||
- Changed `BodyStream` parameter in upload functions from pointer to reference.
|
||||
- Changed `BodyStream` parameter of `UploadBlob`, `Upload`, `UploadPages` and `AppendBlock`functions from pointer to reference.
|
||||
|
||||
## 12.0.0-beta.8 (2021-02-12)
|
||||
|
||||
|
||||
@ -206,11 +206,11 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
* no authentication is required to perform the copy operation.
|
||||
* @param options Optional parameters to execute this function.
|
||||
* @param context Context for cancelling long running operations.
|
||||
* @return A StartCopyBlobOperation describing the state of the copy operation.
|
||||
* @return A StartBlobCopyOperation describing the state of the copy operation.
|
||||
*/
|
||||
StartCopyBlobOperation StartCopyFromUri(
|
||||
StartBlobCopyOperation StartCopyFromUri(
|
||||
const std::string& sourceUri,
|
||||
const StartCopyBlobFromUriOptions& options = StartCopyBlobFromUriOptions(),
|
||||
const StartBlobCopyFromUriOptions& options = StartBlobCopyFromUriOptions(),
|
||||
const Azure::Core::Context& context = Azure::Core::Context()) const;
|
||||
|
||||
/**
|
||||
@ -220,11 +220,11 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
* @param copyId ID of the copy operation to abort.
|
||||
* @param options Optional parameters to execute this function.
|
||||
* @param context Context for cancelling long running operations.
|
||||
* @return A AbortCopyBlobFromUriResult on successfully aborting.
|
||||
* @return A AbortBlobCopyFromUriResult on successfully aborting.
|
||||
*/
|
||||
Azure::Response<Models::AbortCopyBlobFromUriResult> AbortCopyFromUri(
|
||||
Azure::Response<Models::AbortBlobCopyFromUriResult> AbortCopyFromUri(
|
||||
const std::string& copyId,
|
||||
const AbortCopyBlobFromUriOptions& options = AbortCopyBlobFromUriOptions(),
|
||||
const AbortBlobCopyFromUriOptions& options = AbortBlobCopyFromUriOptions(),
|
||||
const Azure::Core::Context& context = Azure::Core::Context()) const;
|
||||
|
||||
/**
|
||||
|
||||
@ -439,7 +439,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
/**
|
||||
* @brief Optional parameters for BlobClient::StartCopyFromUri.
|
||||
*/
|
||||
struct StartCopyBlobFromUriOptions
|
||||
struct StartBlobCopyFromUriOptions
|
||||
{
|
||||
/**
|
||||
* @brief Specifies user-defined name-value pairs associated with the blob. If no
|
||||
@ -481,7 +481,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
/**
|
||||
* @brief Optional parameters for BlobClient::AbortCopyFromUri.
|
||||
*/
|
||||
struct AbortCopyBlobFromUriOptions
|
||||
struct AbortBlobCopyFromUriOptions
|
||||
{
|
||||
/**
|
||||
* @brief Optional conditions that must be met to perform this operation.
|
||||
@ -947,7 +947,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
/**
|
||||
* @brief Optional parameters for PageBlobClient::UploadPages.
|
||||
*/
|
||||
struct UploadPageBlobPagesOptions
|
||||
struct UploadPagesOptions
|
||||
{
|
||||
/**
|
||||
* @brief Hash of the blob content. This hash is used to verify the integrity of
|
||||
@ -965,7 +965,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
/**
|
||||
* @brief Optional parameters for PageBlobClient::UploadPagesFromUri.
|
||||
*/
|
||||
struct UploadPageBlobPagesFromUriOptions
|
||||
struct UploadPagesFromUriOptions
|
||||
{
|
||||
/**
|
||||
* @brief Hash of the blob content. This hash is used to verify the integrity of
|
||||
@ -983,7 +983,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
/**
|
||||
* @brief Optional parameters for PageBlobClient::ClearPages.
|
||||
*/
|
||||
struct ClearPageBlobPagesOptions
|
||||
struct ClearPagesOptions
|
||||
{
|
||||
/**
|
||||
* @brief Optional conditions that must be met to perform this operation.
|
||||
@ -1005,7 +1005,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
/**
|
||||
* @brief Optional parameters for PageBlobClient::GetPageRanges.
|
||||
*/
|
||||
struct GetPageBlobPageRangesOptions
|
||||
struct GetPageRangesOptions
|
||||
{
|
||||
/**
|
||||
* @brief Optionally specifies the range of bytes over which to list ranges, inclusively. If
|
||||
@ -1022,7 +1022,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
/**
|
||||
* @brief Optional parameters for PageBlobClient::StartCopyIncremental.
|
||||
*/
|
||||
struct StartCopyPageBlobIncrementalOptions
|
||||
struct StartBlobCopyIncrementalOptions
|
||||
{
|
||||
/**
|
||||
* @brief Optional conditions that must be met to perform this operation.
|
||||
|
||||
@ -65,17 +65,17 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
|
||||
} // namespace Models
|
||||
|
||||
class StartCopyBlobOperation : public Azure::Core::Operation<Models::BlobProperties> {
|
||||
class StartBlobCopyOperation : public Azure::Core::Operation<Models::BlobProperties> {
|
||||
public:
|
||||
Models::BlobProperties Value() const override { return m_pollResult; }
|
||||
|
||||
StartCopyBlobOperation() = default;
|
||||
StartBlobCopyOperation() = default;
|
||||
|
||||
StartCopyBlobOperation(StartCopyBlobOperation&&) = default;
|
||||
StartBlobCopyOperation(StartBlobCopyOperation&&) = default;
|
||||
|
||||
StartCopyBlobOperation& operator=(StartCopyBlobOperation&&) = default;
|
||||
StartBlobCopyOperation& operator=(StartBlobCopyOperation&&) = default;
|
||||
|
||||
~StartCopyBlobOperation() override {}
|
||||
~StartBlobCopyOperation() override {}
|
||||
|
||||
private:
|
||||
std::string GetResumeToken() const override
|
||||
|
||||
@ -145,12 +145,12 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
* @param content A BodyStream containing the content of the pages to upload.
|
||||
* @param options Optional parameters to execute this function.
|
||||
* @param context Context for cancelling long running operations.
|
||||
* @return A UploadPageBlobPagesResult describing the state of the updated pages.
|
||||
* @return A UploadPagesResult describing the state of the updated pages.
|
||||
*/
|
||||
Azure::Response<Models::UploadPageBlobPagesResult> UploadPages(
|
||||
Azure::Response<Models::UploadPagesResult> UploadPages(
|
||||
int64_t offset,
|
||||
Azure::Core::IO::BodyStream& content,
|
||||
const UploadPageBlobPagesOptions& options = UploadPageBlobPagesOptions(),
|
||||
const UploadPagesOptions& options = UploadPagesOptions(),
|
||||
const Azure::Core::Context& context = Azure::Core::Context()) const;
|
||||
|
||||
/**
|
||||
@ -167,13 +167,13 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
* @param sourceRange Only upload the bytes of the blob in the sourceUri in the specified range.
|
||||
* @param options Optional parameters to execute this function.
|
||||
* @param context Context for cancelling long running operations.
|
||||
* @return A UploadPageBlobPagesFromUriResult describing the state of the updated pages.
|
||||
* @return A UploadPagesFromUriResult describing the state of the updated pages.
|
||||
*/
|
||||
Azure::Response<Models::UploadPageBlobPagesFromUriResult> UploadPagesFromUri(
|
||||
Azure::Response<Models::UploadPagesFromUriResult> UploadPagesFromUri(
|
||||
int64_t destinationOffset,
|
||||
std::string sourceUri,
|
||||
Azure::Core::Http::HttpRange sourceRange,
|
||||
const UploadPageBlobPagesFromUriOptions& options = UploadPageBlobPagesFromUriOptions(),
|
||||
const UploadPagesFromUriOptions& options = UploadPagesFromUriOptions(),
|
||||
const Azure::Core::Context& context = Azure::Core::Context()) const;
|
||||
|
||||
/**
|
||||
@ -181,16 +181,15 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
*
|
||||
* @param range Specifies the range of bytes to be cleared. Both the start and end of the range
|
||||
* must be specified. For a page clear operation, the page range can be up to the value of the
|
||||
* blob's full size. Given that pages must be aligned with 512-byte boundaries, the start of the
|
||||
* range must be a modulus of 512 and the end of the range must be a modulus of 512 <EFBFBD> 1.
|
||||
* Examples of valid byte ranges are 0-511, 512-1023, etc.
|
||||
* blob's full size. Given that pages must be aligned with 512-byte boundaries, the start and
|
||||
* length of the range must be a modulus of 512.
|
||||
* @param options Optional parameters to execute this function.
|
||||
* @param context Context for cancelling long running operations.
|
||||
* @return A ClearPageBlobPagesResult describing the state of the updated pages.
|
||||
* @return A ClearPagesResult describing the state of the updated pages.
|
||||
*/
|
||||
Azure::Response<Models::ClearPageBlobPagesResult> ClearPages(
|
||||
Azure::Response<Models::ClearPagesResult> ClearPages(
|
||||
Azure::Core::Http::HttpRange range,
|
||||
const ClearPageBlobPagesOptions& options = ClearPageBlobPagesOptions(),
|
||||
const ClearPagesOptions& options = ClearPagesOptions(),
|
||||
const Azure::Core::Context& context = Azure::Core::Context()) const;
|
||||
|
||||
/**
|
||||
@ -214,10 +213,10 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
*
|
||||
* @param options Optional parameters to execute this function.
|
||||
* @param context Context for cancelling long running operations.
|
||||
* @return A GetPageBlobPageRangesResult describing the valid page ranges for this blob.
|
||||
* @return A GetPageRangesResult describing the valid page ranges for this blob.
|
||||
*/
|
||||
Azure::Response<Models::GetPageBlobPageRangesResult> GetPageRanges(
|
||||
const GetPageBlobPageRangesOptions& options = GetPageBlobPageRangesOptions(),
|
||||
Azure::Response<Models::GetPageRangesResult> GetPageRanges(
|
||||
const GetPageRangesOptions& options = GetPageRangesOptions(),
|
||||
const Azure::Core::Context& context = Azure::Core::Context()) const;
|
||||
|
||||
/**
|
||||
@ -230,11 +229,11 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
* previousSnapshot is the older of the two.
|
||||
* @param options Optional parameters to execute this function.
|
||||
* @param context Context for cancelling long running operations.
|
||||
* @return A GetPageBlobPageRangesResult describing the valid page ranges for this blob.
|
||||
* @return A GetPageRangesResult describing the valid page ranges for this blob.
|
||||
*/
|
||||
Azure::Response<Models::GetPageBlobPageRangesResult> GetPageRangesDiff(
|
||||
Azure::Response<Models::GetPageRangesResult> GetPageRangesDiff(
|
||||
const std::string& previousSnapshot,
|
||||
const GetPageBlobPageRangesOptions& options = GetPageBlobPageRangesOptions(),
|
||||
const GetPageRangesOptions& options = GetPageRangesOptions(),
|
||||
const Azure::Core::Context& context = Azure::Core::Context()) const;
|
||||
|
||||
/**
|
||||
@ -249,11 +248,11 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
* two.
|
||||
* @param options Optional parameters to execute this function.
|
||||
* @param context Context for cancelling long running operations.
|
||||
* @return A GetPageBlobPageRangesResult describing the valid page ranges for this blob.
|
||||
* @return A GetPageRangesResult describing the valid page ranges for this blob.
|
||||
*/
|
||||
Azure::Response<Models::GetPageBlobPageRangesResult> GetManagedDiskPageRangesDiff(
|
||||
Azure::Response<Models::GetPageRangesResult> GetManagedDiskPageRangesDiff(
|
||||
const std::string& previousSnapshotUrl,
|
||||
const GetPageBlobPageRangesOptions& options = GetPageBlobPageRangesOptions(),
|
||||
const GetPageRangesOptions& options = GetPageRangesOptions(),
|
||||
const Azure::Core::Context& context = Azure::Core::Context()) const;
|
||||
|
||||
/**
|
||||
@ -266,11 +265,11 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
* source blob must either be public or must be authenticated via a shared access signature.
|
||||
* @param options Optional parameters to execute this function.
|
||||
* @param context Context for cancelling long running operations.
|
||||
* @return A StartCopyBlobOperation describing the state of the copy operation.
|
||||
* @return A StartBlobCopyOperation describing the state of the copy operation.
|
||||
*/
|
||||
StartCopyBlobOperation StartCopyIncremental(
|
||||
StartBlobCopyOperation StartCopyIncremental(
|
||||
const std::string& sourceUri,
|
||||
const StartCopyPageBlobIncrementalOptions& options = StartCopyPageBlobIncrementalOptions(),
|
||||
const StartBlobCopyIncrementalOptions& options = StartBlobCopyIncrementalOptions(),
|
||||
const Azure::Core::Context& context = Azure::Core::Context()) const;
|
||||
|
||||
private:
|
||||
|
||||
@ -35,9 +35,9 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
|
||||
namespace Models {
|
||||
|
||||
struct AbortCopyBlobFromUriResult
|
||||
struct AbortBlobCopyFromUriResult
|
||||
{
|
||||
}; // struct AbortCopyBlobFromUriResult
|
||||
}; // struct AbortBlobCopyFromUriResult
|
||||
|
||||
class AccessTier {
|
||||
public:
|
||||
@ -204,12 +204,12 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
}; // struct ChangeBlobLeaseResult
|
||||
} // namespace _detail
|
||||
|
||||
struct ClearPageBlobPagesResult
|
||||
struct ClearPagesResult
|
||||
{
|
||||
Azure::ETag ETag;
|
||||
Azure::DateTime LastModified;
|
||||
int64_t SequenceNumber = 0;
|
||||
}; // struct ClearPageBlobPagesResult
|
||||
}; // struct ClearPagesResult
|
||||
|
||||
class CopyStatus {
|
||||
public:
|
||||
@ -341,14 +341,14 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
std::map<std::string, std::string> Tags;
|
||||
}; // struct GetBlobTagsResult
|
||||
|
||||
struct GetPageBlobPageRangesResult
|
||||
struct GetPageRangesResult
|
||||
{
|
||||
Azure::ETag ETag;
|
||||
Azure::DateTime LastModified;
|
||||
int64_t BlobSize = 0;
|
||||
std::vector<Azure::Core::Http::HttpRange> PageRanges;
|
||||
std::vector<Azure::Core::Http::HttpRange> ClearRanges;
|
||||
}; // struct GetPageBlobPageRangesResult
|
||||
}; // struct GetPageRangesResult
|
||||
|
||||
class LeaseDurationType {
|
||||
public:
|
||||
@ -676,9 +676,11 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
}; // struct SubmitBlobBatchResult
|
||||
} // namespace _detail
|
||||
|
||||
struct UndeleteBlobContainerResult
|
||||
{
|
||||
}; // struct UndeleteBlobContainerResult
|
||||
namespace _detail {
|
||||
struct UndeleteBlobContainerResult
|
||||
{
|
||||
}; // struct UndeleteBlobContainerResult
|
||||
} // namespace _detail
|
||||
|
||||
struct UndeleteBlobResult
|
||||
{
|
||||
@ -787,25 +789,25 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
}; // struct ObjectReplicationRule
|
||||
|
||||
namespace _detail {
|
||||
struct StartCopyBlobFromUriResult
|
||||
struct StartBlobCopyFromUriResult
|
||||
{
|
||||
Azure::ETag ETag;
|
||||
Azure::DateTime LastModified;
|
||||
std::string CopyId;
|
||||
Models::CopyStatus CopyStatus;
|
||||
Azure::Nullable<std::string> VersionId;
|
||||
}; // struct StartCopyBlobFromUriResult
|
||||
}; // struct StartBlobCopyFromUriResult
|
||||
} // namespace _detail
|
||||
|
||||
namespace _detail {
|
||||
struct StartCopyPageBlobIncrementalResult
|
||||
struct StartBlobCopyIncrementalResult
|
||||
{
|
||||
Azure::ETag ETag;
|
||||
Azure::DateTime LastModified;
|
||||
std::string CopyId;
|
||||
Models::CopyStatus CopyStatus;
|
||||
Azure::Nullable<std::string> VersionId;
|
||||
}; // struct StartCopyPageBlobIncrementalResult
|
||||
}; // struct StartBlobCopyIncrementalResult
|
||||
} // namespace _detail
|
||||
|
||||
struct AppendBlockFromUriResult
|
||||
@ -910,7 +912,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
Azure::Nullable<ContentHash> TransactionalContentHash;
|
||||
}; // struct UploadBlockBlobResult
|
||||
|
||||
struct UploadPageBlobPagesFromUriResult
|
||||
struct UploadPagesFromUriResult
|
||||
{
|
||||
Azure::ETag ETag;
|
||||
Azure::DateTime LastModified;
|
||||
@ -919,9 +921,9 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
bool IsServerEncrypted = false;
|
||||
Azure::Nullable<std::vector<uint8_t>> EncryptionKeySha256;
|
||||
Azure::Nullable<std::string> EncryptionScope;
|
||||
}; // struct UploadPageBlobPagesFromUriResult
|
||||
}; // struct UploadPagesFromUriResult
|
||||
|
||||
struct UploadPageBlobPagesResult
|
||||
struct UploadPagesResult
|
||||
{
|
||||
Azure::ETag ETag;
|
||||
Azure::DateTime LastModified;
|
||||
@ -930,7 +932,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
bool IsServerEncrypted = false;
|
||||
Azure::Nullable<std::vector<uint8_t>> EncryptionKeySha256;
|
||||
Azure::Nullable<std::string> EncryptionScope;
|
||||
}; // struct UploadPageBlobPagesResult
|
||||
}; // struct UploadPagesResult
|
||||
|
||||
struct BlobItemDetails
|
||||
{
|
||||
@ -3053,7 +3055,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
std::string DeletedBlobContainerVersion;
|
||||
}; // struct UndeleteBlobContainerOptions
|
||||
|
||||
static Azure::Response<UndeleteBlobContainerResult> Undelete(
|
||||
static Azure::Response<Models::_detail::UndeleteBlobContainerResult> Undelete(
|
||||
Azure::Core::Http::_internal::HttpPipeline& pipeline,
|
||||
const Azure::Core::Url& url,
|
||||
const UndeleteBlobContainerOptions& options,
|
||||
@ -3074,7 +3076,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
request.SetHeader("x-ms-deleted-container-version", options.DeletedBlobContainerVersion);
|
||||
auto pHttpResponse = pipeline.Send(request, context);
|
||||
Azure::Core::Http::RawResponse& httpResponse = *pHttpResponse;
|
||||
UndeleteBlobContainerResult response;
|
||||
Models::_detail::UndeleteBlobContainerResult response;
|
||||
auto http_status_code
|
||||
= static_cast<std::underlying_type<Azure::Core::Http::HttpStatusCode>::type>(
|
||||
httpResponse.GetStatusCode());
|
||||
@ -3082,7 +3084,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
{
|
||||
throw StorageException::CreateFromResponse(std::move(pHttpResponse));
|
||||
}
|
||||
return Azure::Response<UndeleteBlobContainerResult>(
|
||||
return Azure::Response<Models::_detail::UndeleteBlobContainerResult>(
|
||||
std::move(response), std::move(pHttpResponse));
|
||||
}
|
||||
|
||||
@ -5762,7 +5764,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
return SetAccessTierCreateResponse(std::move(pHttpResponse), context);
|
||||
}
|
||||
|
||||
struct StartCopyBlobFromUriOptions
|
||||
struct StartBlobCopyFromUriOptions
|
||||
{
|
||||
Azure::Nullable<int32_t> Timeout;
|
||||
Storage::Metadata Metadata;
|
||||
@ -5782,12 +5784,12 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
Azure::ETag SourceIfNoneMatch;
|
||||
Azure::Nullable<std::string> SourceIfTags;
|
||||
Azure::Nullable<bool> ShouldSealDestination;
|
||||
}; // struct StartCopyBlobFromUriOptions
|
||||
}; // struct StartBlobCopyFromUriOptions
|
||||
|
||||
static Azure::Response<Models::_detail::StartCopyBlobFromUriResult> StartCopyFromUri(
|
||||
static Azure::Response<Models::_detail::StartBlobCopyFromUriResult> StartCopyFromUri(
|
||||
Azure::Core::Http::_internal::HttpPipeline& pipeline,
|
||||
const Azure::Core::Url& url,
|
||||
const StartCopyBlobFromUriOptions& options,
|
||||
const StartBlobCopyFromUriOptions& options,
|
||||
const Azure::Core::Context& context)
|
||||
{
|
||||
(void)options;
|
||||
@ -5879,7 +5881,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
}
|
||||
auto pHttpResponse = pipeline.Send(request, context);
|
||||
Azure::Core::Http::RawResponse& httpResponse = *pHttpResponse;
|
||||
Models::_detail::StartCopyBlobFromUriResult response;
|
||||
Models::_detail::StartBlobCopyFromUriResult response;
|
||||
auto http_status_code
|
||||
= static_cast<std::underlying_type<Azure::Core::Http::HttpStatusCode>::type>(
|
||||
httpResponse.GetStatusCode());
|
||||
@ -5897,21 +5899,21 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
{
|
||||
response.VersionId = x_ms_version_id__iterator->second;
|
||||
}
|
||||
return Azure::Response<Models::_detail::StartCopyBlobFromUriResult>(
|
||||
return Azure::Response<Models::_detail::StartBlobCopyFromUriResult>(
|
||||
std::move(response), std::move(pHttpResponse));
|
||||
}
|
||||
|
||||
struct AbortCopyBlobFromUriOptions
|
||||
struct AbortBlobCopyFromUriOptions
|
||||
{
|
||||
Azure::Nullable<int32_t> Timeout;
|
||||
std::string CopyId;
|
||||
Azure::Nullable<std::string> LeaseId;
|
||||
}; // struct AbortCopyBlobFromUriOptions
|
||||
}; // struct AbortBlobCopyFromUriOptions
|
||||
|
||||
static Azure::Response<AbortCopyBlobFromUriResult> AbortCopyFromUri(
|
||||
static Azure::Response<AbortBlobCopyFromUriResult> AbortCopyFromUri(
|
||||
Azure::Core::Http::_internal::HttpPipeline& pipeline,
|
||||
const Azure::Core::Url& url,
|
||||
const AbortCopyBlobFromUriOptions& options,
|
||||
const AbortBlobCopyFromUriOptions& options,
|
||||
const Azure::Core::Context& context)
|
||||
{
|
||||
(void)options;
|
||||
@ -5933,7 +5935,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
}
|
||||
auto pHttpResponse = pipeline.Send(request, context);
|
||||
Azure::Core::Http::RawResponse& httpResponse = *pHttpResponse;
|
||||
AbortCopyBlobFromUriResult response;
|
||||
AbortBlobCopyFromUriResult response;
|
||||
auto http_status_code
|
||||
= static_cast<std::underlying_type<Azure::Core::Http::HttpStatusCode>::type>(
|
||||
httpResponse.GetStatusCode());
|
||||
@ -5941,7 +5943,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
{
|
||||
throw StorageException::CreateFromResponse(std::move(pHttpResponse));
|
||||
}
|
||||
return Azure::Response<AbortCopyBlobFromUriResult>(
|
||||
return Azure::Response<AbortBlobCopyFromUriResult>(
|
||||
std::move(response), std::move(pHttpResponse));
|
||||
}
|
||||
|
||||
@ -6693,14 +6695,14 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
static Azure::Response<UploadBlockBlobResult> Upload(
|
||||
Azure::Core::Http::_internal::HttpPipeline& pipeline,
|
||||
const Azure::Core::Url& url,
|
||||
Azure::Core::IO::BodyStream* requestBody,
|
||||
Azure::Core::IO::BodyStream& requestBody,
|
||||
const UploadBlockBlobOptions& options,
|
||||
const Azure::Core::Context& context)
|
||||
{
|
||||
(void)options;
|
||||
auto request
|
||||
= Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Put, url, requestBody);
|
||||
request.SetHeader("Content-Length", std::to_string(requestBody->Length()));
|
||||
= Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Put, url, &requestBody);
|
||||
request.SetHeader("Content-Length", std::to_string(requestBody.Length()));
|
||||
request.SetHeader("x-ms-version", "2020-02-10");
|
||||
if (options.Timeout.HasValue())
|
||||
{
|
||||
@ -6879,14 +6881,14 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
static Azure::Response<StageBlockResult> StageBlock(
|
||||
Azure::Core::Http::_internal::HttpPipeline& pipeline,
|
||||
const Azure::Core::Url& url,
|
||||
Azure::Core::IO::BodyStream* requestBody,
|
||||
Azure::Core::IO::BodyStream& requestBody,
|
||||
const StageBlockOptions& options,
|
||||
const Azure::Core::Context& context)
|
||||
{
|
||||
(void)options;
|
||||
auto request
|
||||
= Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Put, url, requestBody);
|
||||
request.SetHeader("Content-Length", std::to_string(requestBody->Length()));
|
||||
= Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Put, url, &requestBody);
|
||||
request.SetHeader("Content-Length", std::to_string(requestBody.Length()));
|
||||
request.GetUrl().AppendQueryParameter("comp", "block");
|
||||
request.GetUrl().AppendQueryParameter(
|
||||
"blockid", _internal::UrlEncodeQueryParameter(options.BlockId));
|
||||
@ -7695,17 +7697,17 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
Azure::Nullable<std::string> IfTags;
|
||||
}; // struct UploadPageBlobPagesOptions
|
||||
|
||||
static Azure::Response<UploadPageBlobPagesResult> UploadPages(
|
||||
static Azure::Response<UploadPagesResult> UploadPages(
|
||||
Azure::Core::Http::_internal::HttpPipeline& pipeline,
|
||||
const Azure::Core::Url& url,
|
||||
Azure::Core::IO::BodyStream* requestBody,
|
||||
Azure::Core::IO::BodyStream& requestBody,
|
||||
const UploadPageBlobPagesOptions& options,
|
||||
const Azure::Core::Context& context)
|
||||
{
|
||||
(void)options;
|
||||
auto request
|
||||
= Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Put, url, requestBody);
|
||||
request.SetHeader("Content-Length", std::to_string(requestBody->Length()));
|
||||
= Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Put, url, &requestBody);
|
||||
request.SetHeader("Content-Length", std::to_string(requestBody.Length()));
|
||||
request.GetUrl().AppendQueryParameter("comp", "page");
|
||||
request.SetHeader("x-ms-version", "2020-02-10");
|
||||
if (options.Timeout.HasValue())
|
||||
@ -7808,7 +7810,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
}
|
||||
auto pHttpResponse = pipeline.Send(request, context);
|
||||
Azure::Core::Http::RawResponse& httpResponse = *pHttpResponse;
|
||||
UploadPageBlobPagesResult response;
|
||||
UploadPagesResult response;
|
||||
auto http_status_code
|
||||
= static_cast<std::underlying_type<Azure::Core::Http::HttpStatusCode>::type>(
|
||||
httpResponse.GetStatusCode());
|
||||
@ -7855,8 +7857,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
{
|
||||
response.EncryptionScope = x_ms_encryption_scope__iterator->second;
|
||||
}
|
||||
return Azure::Response<UploadPageBlobPagesResult>(
|
||||
std::move(response), std::move(pHttpResponse));
|
||||
return Azure::Response<UploadPagesResult>(std::move(response), std::move(pHttpResponse));
|
||||
}
|
||||
|
||||
struct UploadPageBlobPagesFromUriOptions
|
||||
@ -7881,7 +7882,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
Azure::Nullable<std::string> IfTags;
|
||||
}; // struct UploadPageBlobPagesFromUriOptions
|
||||
|
||||
static Azure::Response<UploadPageBlobPagesFromUriResult> UploadPagesFromUri(
|
||||
static Azure::Response<UploadPagesFromUriResult> UploadPagesFromUri(
|
||||
Azure::Core::Http::_internal::HttpPipeline& pipeline,
|
||||
const Azure::Core::Url& url,
|
||||
const UploadPageBlobPagesFromUriOptions& options,
|
||||
@ -8002,7 +8003,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
}
|
||||
auto pHttpResponse = pipeline.Send(request, context);
|
||||
Azure::Core::Http::RawResponse& httpResponse = *pHttpResponse;
|
||||
UploadPageBlobPagesFromUriResult response;
|
||||
UploadPagesFromUriResult response;
|
||||
auto http_status_code
|
||||
= static_cast<std::underlying_type<Azure::Core::Http::HttpStatusCode>::type>(
|
||||
httpResponse.GetStatusCode());
|
||||
@ -8049,7 +8050,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
{
|
||||
response.EncryptionScope = x_ms_encryption_scope__iterator->second;
|
||||
}
|
||||
return Azure::Response<UploadPageBlobPagesFromUriResult>(
|
||||
return Azure::Response<UploadPagesFromUriResult>(
|
||||
std::move(response), std::move(pHttpResponse));
|
||||
}
|
||||
|
||||
@ -8072,7 +8073,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
Azure::Nullable<std::string> IfTags;
|
||||
}; // struct ClearPageBlobPagesOptions
|
||||
|
||||
static Azure::Response<ClearPageBlobPagesResult> ClearPages(
|
||||
static Azure::Response<ClearPagesResult> ClearPages(
|
||||
Azure::Core::Http::_internal::HttpPipeline& pipeline,
|
||||
const Azure::Core::Url& url,
|
||||
const ClearPageBlobPagesOptions& options,
|
||||
@ -8166,7 +8167,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
}
|
||||
auto pHttpResponse = pipeline.Send(request, context);
|
||||
Azure::Core::Http::RawResponse& httpResponse = *pHttpResponse;
|
||||
ClearPageBlobPagesResult response;
|
||||
ClearPagesResult response;
|
||||
auto http_status_code
|
||||
= static_cast<std::underlying_type<Azure::Core::Http::HttpStatusCode>::type>(
|
||||
httpResponse.GetStatusCode());
|
||||
@ -8179,8 +8180,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
httpResponse.GetHeaders().at("last-modified"), Azure::DateTime::DateFormat::Rfc1123);
|
||||
response.SequenceNumber
|
||||
= std::stoll(httpResponse.GetHeaders().at("x-ms-blob-sequence-number"));
|
||||
return Azure::Response<ClearPageBlobPagesResult>(
|
||||
std::move(response), std::move(pHttpResponse));
|
||||
return Azure::Response<ClearPagesResult>(std::move(response), std::move(pHttpResponse));
|
||||
}
|
||||
|
||||
struct ResizePageBlobOptions
|
||||
@ -8318,7 +8318,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
Azure::Nullable<std::string> IfTags;
|
||||
}; // struct GetPageBlobPageRangesOptions
|
||||
|
||||
static Azure::Response<GetPageBlobPageRangesResult> GetPageRanges(
|
||||
static Azure::Response<GetPageRangesResult> GetPageRanges(
|
||||
Azure::Core::Http::_internal::HttpPipeline& pipeline,
|
||||
const Azure::Core::Url& url,
|
||||
const GetPageBlobPageRangesOptions& options,
|
||||
@ -8385,7 +8385,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
}
|
||||
auto pHttpResponse = pipeline.Send(request, context);
|
||||
Azure::Core::Http::RawResponse& httpResponse = *pHttpResponse;
|
||||
GetPageBlobPageRangesResult response;
|
||||
GetPageRangesResult response;
|
||||
auto http_status_code
|
||||
= static_cast<std::underlying_type<Azure::Core::Http::HttpStatusCode>::type>(
|
||||
httpResponse.GetStatusCode());
|
||||
@ -8397,17 +8397,17 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
const auto& httpResponseBody = httpResponse.GetBody();
|
||||
_internal::XmlReader reader(
|
||||
reinterpret_cast<const char*>(httpResponseBody.data()), httpResponseBody.size());
|
||||
response = GetPageBlobPageRangesResultFromXml(reader);
|
||||
response = GetPageRangesResultFromXml(reader);
|
||||
}
|
||||
response.ETag = Azure::ETag(httpResponse.GetHeaders().at("etag"));
|
||||
response.LastModified = Azure::DateTime::Parse(
|
||||
httpResponse.GetHeaders().at("last-modified"), Azure::DateTime::DateFormat::Rfc1123);
|
||||
response.BlobSize = std::stoll(httpResponse.GetHeaders().at("x-ms-blob-content-length"));
|
||||
return Azure::Response<GetPageBlobPageRangesResult>(
|
||||
return Azure::Response<GetPageRangesResult>(
|
||||
std::move(response), std::move(pHttpResponse));
|
||||
}
|
||||
|
||||
struct StartCopyPageBlobIncrementalOptions
|
||||
struct StartBlobCopyIncrementalOptions
|
||||
{
|
||||
Azure::Nullable<int32_t> Timeout;
|
||||
std::string CopySource;
|
||||
@ -8416,13 +8416,13 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
Azure::ETag IfMatch;
|
||||
Azure::ETag IfNoneMatch;
|
||||
Azure::Nullable<std::string> IfTags;
|
||||
}; // struct StartCopyPageBlobIncrementalOptions
|
||||
}; // struct StartBlobCopyIncrementalOptions
|
||||
|
||||
static Azure::Response<Models::_detail::StartCopyPageBlobIncrementalResult>
|
||||
static Azure::Response<Models::_detail::StartBlobCopyIncrementalResult>
|
||||
StartCopyIncremental(
|
||||
Azure::Core::Http::_internal::HttpPipeline& pipeline,
|
||||
const Azure::Core::Url& url,
|
||||
const StartCopyPageBlobIncrementalOptions& options,
|
||||
const StartBlobCopyIncrementalOptions& options,
|
||||
const Azure::Core::Context& context)
|
||||
{
|
||||
(void)options;
|
||||
@ -8463,7 +8463,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
}
|
||||
auto pHttpResponse = pipeline.Send(request, context);
|
||||
Azure::Core::Http::RawResponse& httpResponse = *pHttpResponse;
|
||||
Models::_detail::StartCopyPageBlobIncrementalResult response;
|
||||
Models::_detail::StartBlobCopyIncrementalResult response;
|
||||
auto http_status_code
|
||||
= static_cast<std::underlying_type<Azure::Core::Http::HttpStatusCode>::type>(
|
||||
httpResponse.GetStatusCode());
|
||||
@ -8481,15 +8481,14 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
{
|
||||
response.VersionId = x_ms_version_id__iterator->second;
|
||||
}
|
||||
return Azure::Response<Models::_detail::StartCopyPageBlobIncrementalResult>(
|
||||
return Azure::Response<Models::_detail::StartBlobCopyIncrementalResult>(
|
||||
std::move(response), std::move(pHttpResponse));
|
||||
}
|
||||
|
||||
private:
|
||||
static GetPageBlobPageRangesResult GetPageBlobPageRangesResultFromXml(
|
||||
_internal::XmlReader& reader)
|
||||
static GetPageRangesResult GetPageRangesResultFromXml(_internal::XmlReader& reader)
|
||||
{
|
||||
GetPageBlobPageRangesResult ret;
|
||||
GetPageRangesResult ret;
|
||||
enum class XmlTagName
|
||||
{
|
||||
k_PageList,
|
||||
@ -8833,14 +8832,14 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
static Azure::Response<AppendBlockResult> AppendBlock(
|
||||
Azure::Core::Http::_internal::HttpPipeline& pipeline,
|
||||
const Azure::Core::Url& url,
|
||||
Azure::Core::IO::BodyStream* requestBody,
|
||||
Azure::Core::IO::BodyStream& requestBody,
|
||||
const AppendBlockOptions& options,
|
||||
const Azure::Core::Context& context)
|
||||
{
|
||||
(void)options;
|
||||
auto request
|
||||
= Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Put, url, requestBody);
|
||||
request.SetHeader("Content-Length", std::to_string(requestBody->Length()));
|
||||
= Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Put, url, &requestBody);
|
||||
request.SetHeader("Content-Length", std::to_string(requestBody.Length()));
|
||||
request.GetUrl().AppendQueryParameter("comp", "appendblock");
|
||||
request.SetHeader("x-ms-version", "2020-02-10");
|
||||
if (options.Timeout.HasValue())
|
||||
@ -9249,14 +9248,14 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
static Azure::Response<Models::_detail::SubmitBlobBatchResult> SubmitBatch(
|
||||
Azure::Core::Http::_internal::HttpPipeline& pipeline,
|
||||
const Azure::Core::Url& url,
|
||||
Azure::Core::IO::BodyStream* requestBody,
|
||||
Azure::Core::IO::BodyStream& requestBody,
|
||||
const SubmitBlobBatchOptions& options,
|
||||
const Azure::Core::Context& context)
|
||||
{
|
||||
(void)options;
|
||||
auto request
|
||||
= Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Post, url, requestBody);
|
||||
request.SetHeader("Content-Length", std::to_string(requestBody->Length()));
|
||||
= Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Post, url, &requestBody);
|
||||
request.SetHeader("Content-Length", std::to_string(requestBody.Length()));
|
||||
request.GetUrl().AppendQueryParameter("comp", "batch");
|
||||
request.SetHeader("x-ms-version", "2020-02-10");
|
||||
if (options.Timeout.HasValue())
|
||||
|
||||
@ -143,7 +143,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
}
|
||||
protocolLayerOptions.EncryptionScope = m_encryptionScope;
|
||||
return _detail::BlobRestClient::AppendBlob::AppendBlock(
|
||||
*m_pipeline, m_blobUrl, &content, protocolLayerOptions, context);
|
||||
*m_pipeline, m_blobUrl, content, protocolLayerOptions, context);
|
||||
}
|
||||
|
||||
Azure::Response<Models::AppendBlockFromUriResult> AppendBlobClient::AppendBlockFromUri(
|
||||
|
||||
@ -534,12 +534,12 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
*m_pipeline, m_blobUrl, protocolLayerOptions, context);
|
||||
}
|
||||
|
||||
StartCopyBlobOperation BlobClient::StartCopyFromUri(
|
||||
StartBlobCopyOperation BlobClient::StartCopyFromUri(
|
||||
const std::string& sourceUri,
|
||||
const StartCopyBlobFromUriOptions& options,
|
||||
const StartBlobCopyFromUriOptions& options,
|
||||
const Azure::Core::Context& context) const
|
||||
{
|
||||
_detail::BlobRestClient::Blob::StartCopyBlobFromUriOptions protocolLayerOptions;
|
||||
_detail::BlobRestClient::Blob::StartBlobCopyFromUriOptions protocolLayerOptions;
|
||||
protocolLayerOptions.Metadata = options.Metadata;
|
||||
protocolLayerOptions.SourceUri = sourceUri;
|
||||
protocolLayerOptions.Tier = options.Tier;
|
||||
@ -560,18 +560,18 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
|
||||
auto response = _detail::BlobRestClient::Blob::StartCopyFromUri(
|
||||
*m_pipeline, m_blobUrl, protocolLayerOptions, context);
|
||||
StartCopyBlobOperation res;
|
||||
StartBlobCopyOperation res;
|
||||
res.m_rawResponse = response.ExtractRawResponse();
|
||||
res.m_blobClient = std::make_shared<BlobClient>(*this);
|
||||
return res;
|
||||
}
|
||||
|
||||
Azure::Response<Models::AbortCopyBlobFromUriResult> BlobClient::AbortCopyFromUri(
|
||||
Azure::Response<Models::AbortBlobCopyFromUriResult> BlobClient::AbortCopyFromUri(
|
||||
const std::string& copyId,
|
||||
const AbortCopyBlobFromUriOptions& options,
|
||||
const AbortBlobCopyFromUriOptions& options,
|
||||
const Azure::Core::Context& context) const
|
||||
{
|
||||
_detail::BlobRestClient::Blob::AbortCopyBlobFromUriOptions protocolLayerOptions;
|
||||
_detail::BlobRestClient::Blob::AbortBlobCopyFromUriOptions protocolLayerOptions;
|
||||
protocolLayerOptions.CopyId = copyId;
|
||||
protocolLayerOptions.LeaseId = options.AccessConditions.LeaseId;
|
||||
return _detail::BlobRestClient::Blob::AbortCopyFromUri(
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
|
||||
namespace Azure { namespace Storage { namespace Blobs {
|
||||
|
||||
std::unique_ptr<Azure::Core::Http::RawResponse> StartCopyBlobOperation::PollInternal(
|
||||
std::unique_ptr<Azure::Core::Http::RawResponse> StartBlobCopyOperation::PollInternal(
|
||||
Azure::Core::Context&)
|
||||
{
|
||||
|
||||
@ -32,7 +32,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
return response.ExtractRawResponse();
|
||||
}
|
||||
|
||||
Azure::Response<Models::BlobProperties> StartCopyBlobOperation::PollUntilDoneInternal(
|
||||
Azure::Response<Models::BlobProperties> StartBlobCopyOperation::PollUntilDoneInternal(
|
||||
std::chrono::milliseconds period,
|
||||
Azure::Core::Context& context)
|
||||
{
|
||||
|
||||
@ -101,7 +101,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
}
|
||||
protocolLayerOptions.EncryptionScope = m_encryptionScope;
|
||||
return _detail::BlobRestClient::BlockBlob::Upload(
|
||||
*m_pipeline, m_blobUrl, &content, protocolLayerOptions, context);
|
||||
*m_pipeline, m_blobUrl, content, protocolLayerOptions, context);
|
||||
}
|
||||
|
||||
Azure::Response<Models::UploadBlockBlobFromResult> BlockBlobClient::UploadFrom(
|
||||
@ -257,7 +257,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
}
|
||||
protocolLayerOptions.EncryptionScope = m_encryptionScope;
|
||||
return _detail::BlobRestClient::BlockBlob::StageBlock(
|
||||
*m_pipeline, m_blobUrl, &content, protocolLayerOptions, context);
|
||||
*m_pipeline, m_blobUrl, content, protocolLayerOptions, context);
|
||||
}
|
||||
|
||||
Azure::Response<Models::StageBlockFromUriResult> BlockBlobClient::StageBlockFromUri(
|
||||
|
||||
@ -128,10 +128,10 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
}
|
||||
}
|
||||
|
||||
Azure::Response<Models::UploadPageBlobPagesResult> PageBlobClient::UploadPages(
|
||||
Azure::Response<Models::UploadPagesResult> PageBlobClient::UploadPages(
|
||||
int64_t offset,
|
||||
Azure::Core::IO::BodyStream& content,
|
||||
const UploadPageBlobPagesOptions& options,
|
||||
const UploadPagesOptions& options,
|
||||
const Azure::Core::Context& context) const
|
||||
{
|
||||
_detail::BlobRestClient::PageBlob::UploadPageBlobPagesOptions protocolLayerOptions;
|
||||
@ -152,14 +152,14 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
}
|
||||
protocolLayerOptions.EncryptionScope = m_encryptionScope;
|
||||
return _detail::BlobRestClient::PageBlob::UploadPages(
|
||||
*m_pipeline, m_blobUrl, &content, protocolLayerOptions, context);
|
||||
*m_pipeline, m_blobUrl, content, protocolLayerOptions, context);
|
||||
}
|
||||
|
||||
Azure::Response<Models::UploadPageBlobPagesFromUriResult> PageBlobClient::UploadPagesFromUri(
|
||||
Azure::Response<Models::UploadPagesFromUriResult> PageBlobClient::UploadPagesFromUri(
|
||||
int64_t destinationOffset,
|
||||
std::string sourceUri,
|
||||
Azure::Core::Http::HttpRange sourceRange,
|
||||
const UploadPageBlobPagesFromUriOptions& options,
|
||||
const UploadPagesFromUriOptions& options,
|
||||
const Azure::Core::Context& context) const
|
||||
{
|
||||
_detail::BlobRestClient::PageBlob::UploadPageBlobPagesFromUriOptions protocolLayerOptions;
|
||||
@ -185,9 +185,9 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
*m_pipeline, m_blobUrl, protocolLayerOptions, context);
|
||||
}
|
||||
|
||||
Azure::Response<Models::ClearPageBlobPagesResult> PageBlobClient::ClearPages(
|
||||
Azure::Response<Models::ClearPagesResult> PageBlobClient::ClearPages(
|
||||
Azure::Core::Http::HttpRange range,
|
||||
const ClearPageBlobPagesOptions& options,
|
||||
const ClearPagesOptions& options,
|
||||
const Azure::Core::Context& context) const
|
||||
{
|
||||
_detail::BlobRestClient::PageBlob::ClearPageBlobPagesOptions protocolLayerOptions;
|
||||
@ -233,8 +233,8 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
*m_pipeline, m_blobUrl, protocolLayerOptions, context);
|
||||
}
|
||||
|
||||
Azure::Response<Models::GetPageBlobPageRangesResult> PageBlobClient::GetPageRanges(
|
||||
const GetPageBlobPageRangesOptions& options,
|
||||
Azure::Response<Models::GetPageRangesResult> PageBlobClient::GetPageRanges(
|
||||
const GetPageRangesOptions& options,
|
||||
const Azure::Core::Context& context) const
|
||||
{
|
||||
_detail::BlobRestClient::PageBlob::GetPageBlobPageRangesOptions protocolLayerOptions;
|
||||
@ -249,9 +249,9 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
*m_pipeline, m_blobUrl, protocolLayerOptions, _internal::WithReplicaStatus(context));
|
||||
}
|
||||
|
||||
Azure::Response<Models::GetPageBlobPageRangesResult> PageBlobClient::GetPageRangesDiff(
|
||||
Azure::Response<Models::GetPageRangesResult> PageBlobClient::GetPageRangesDiff(
|
||||
const std::string& previousSnapshot,
|
||||
const GetPageBlobPageRangesOptions& options,
|
||||
const GetPageRangesOptions& options,
|
||||
const Azure::Core::Context& context) const
|
||||
{
|
||||
_detail::BlobRestClient::PageBlob::GetPageBlobPageRangesOptions protocolLayerOptions;
|
||||
@ -267,9 +267,9 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
*m_pipeline, m_blobUrl, protocolLayerOptions, _internal::WithReplicaStatus(context));
|
||||
}
|
||||
|
||||
Azure::Response<Models::GetPageBlobPageRangesResult> PageBlobClient::GetManagedDiskPageRangesDiff(
|
||||
Azure::Response<Models::GetPageRangesResult> PageBlobClient::GetManagedDiskPageRangesDiff(
|
||||
const std::string& previousSnapshotUrl,
|
||||
const GetPageBlobPageRangesOptions& options,
|
||||
const GetPageRangesOptions& options,
|
||||
const Azure::Core::Context& context) const
|
||||
{
|
||||
_detail::BlobRestClient::PageBlob::GetPageBlobPageRangesOptions protocolLayerOptions;
|
||||
@ -285,12 +285,12 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
*m_pipeline, m_blobUrl, protocolLayerOptions, _internal::WithReplicaStatus(context));
|
||||
}
|
||||
|
||||
StartCopyBlobOperation PageBlobClient::StartCopyIncremental(
|
||||
StartBlobCopyOperation PageBlobClient::StartCopyIncremental(
|
||||
const std::string& sourceUri,
|
||||
const StartCopyPageBlobIncrementalOptions& options,
|
||||
const StartBlobCopyIncrementalOptions& options,
|
||||
const Azure::Core::Context& context) const
|
||||
{
|
||||
_detail::BlobRestClient::PageBlob::StartCopyPageBlobIncrementalOptions protocolLayerOptions;
|
||||
_detail::BlobRestClient::PageBlob::StartBlobCopyIncrementalOptions protocolLayerOptions;
|
||||
protocolLayerOptions.CopySource = sourceUri;
|
||||
protocolLayerOptions.IfModifiedSince = options.AccessConditions.IfModifiedSince;
|
||||
protocolLayerOptions.IfUnmodifiedSince = options.AccessConditions.IfUnmodifiedSince;
|
||||
@ -300,7 +300,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
|
||||
auto response = _detail::BlobRestClient::PageBlob::StartCopyIncremental(
|
||||
*m_pipeline, m_blobUrl, protocolLayerOptions, context);
|
||||
StartCopyBlobOperation res;
|
||||
StartBlobCopyOperation res;
|
||||
res.m_rawResponse = response.ExtractRawResponse();
|
||||
res.m_blobClient = std::make_shared<BlobClient>(*this);
|
||||
return res;
|
||||
|
||||
@ -215,7 +215,7 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
StandardStorageConnectionString(), m_containerName, RandomString());
|
||||
|
||||
{
|
||||
Blobs::StartCopyBlobFromUriOptions options;
|
||||
Blobs::StartBlobCopyFromUriOptions options;
|
||||
options.SourceAccessConditions.LeaseId = Blobs::BlobLeaseClient::CreateUniqueLeaseId();
|
||||
/*
|
||||
don't know why, the copy operation also succeeds even if the lease id doesn't match.
|
||||
@ -227,7 +227,7 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
}
|
||||
sourceLeaseClient.Break();
|
||||
{
|
||||
Blobs::StartCopyBlobFromUriOptions options;
|
||||
Blobs::StartBlobCopyFromUriOptions options;
|
||||
options.SourceAccessConditions.IfMatch = eTag;
|
||||
EXPECT_NO_THROW(destBlobClient.StartCopyFromUri(sourceBlobClient.GetUrl(), options));
|
||||
options.SourceAccessConditions.IfMatch = DummyETag;
|
||||
@ -235,7 +235,7 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
destBlobClient.StartCopyFromUri(sourceBlobClient.GetUrl(), options), StorageException);
|
||||
}
|
||||
{
|
||||
Blobs::StartCopyBlobFromUriOptions options;
|
||||
Blobs::StartBlobCopyFromUriOptions options;
|
||||
options.SourceAccessConditions.IfNoneMatch = DummyETag;
|
||||
EXPECT_NO_THROW(destBlobClient.StartCopyFromUri(sourceBlobClient.GetUrl(), options));
|
||||
options.SourceAccessConditions.IfNoneMatch = eTag;
|
||||
@ -243,7 +243,7 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
destBlobClient.StartCopyFromUri(sourceBlobClient.GetUrl(), options), StorageException);
|
||||
}
|
||||
{
|
||||
Blobs::StartCopyBlobFromUriOptions options;
|
||||
Blobs::StartBlobCopyFromUriOptions options;
|
||||
options.SourceAccessConditions.IfModifiedSince = timeBeforeStr;
|
||||
EXPECT_NO_THROW(destBlobClient.StartCopyFromUri(sourceBlobClient.GetUrl(), options));
|
||||
options.SourceAccessConditions.IfModifiedSince = timeAfterStr;
|
||||
@ -251,7 +251,7 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
destBlobClient.StartCopyFromUri(sourceBlobClient.GetUrl(), options), StorageException);
|
||||
}
|
||||
{
|
||||
Blobs::StartCopyBlobFromUriOptions options;
|
||||
Blobs::StartBlobCopyFromUriOptions options;
|
||||
options.SourceAccessConditions.IfUnmodifiedSince = timeAfterStr;
|
||||
EXPECT_NO_THROW(destBlobClient.StartCopyFromUri(sourceBlobClient.GetUrl(), options));
|
||||
options.SourceAccessConditions.IfUnmodifiedSince = timeBeforeStr;
|
||||
@ -327,7 +327,7 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
|
||||
auto blobClient2 = m_blobContainerClient->GetAppendBlobClient(RandomString());
|
||||
|
||||
Blobs::StartCopyBlobFromUriOptions copyOptions;
|
||||
Blobs::StartBlobCopyFromUriOptions copyOptions;
|
||||
copyOptions.ShouldSealDestination = false;
|
||||
auto copyResult = blobClient2.StartCopyFromUri(blobClient.GetUrl() + GetSas(), copyOptions);
|
||||
getPropertiesResult = copyResult.PollUntilDone(std::chrono::seconds(1));
|
||||
|
||||
@ -872,7 +872,7 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
{
|
||||
std::string url = appendBlobClient.GetUrl() + GetSas();
|
||||
|
||||
Blobs::StartCopyBlobFromUriOptions options;
|
||||
Blobs::StartBlobCopyFromUriOptions options;
|
||||
auto blobClient2 = Azure::Storage::Blobs::AppendBlobClient::CreateFromConnectionString(
|
||||
StandardStorageConnectionString(), m_containerName, RandomString());
|
||||
options.SourceAccessConditions.TagConditions = failWhereExpression;
|
||||
@ -930,7 +930,7 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
}
|
||||
|
||||
{
|
||||
Blobs::UploadPageBlobPagesOptions options;
|
||||
Blobs::UploadPagesOptions options;
|
||||
options.AccessConditions.TagConditions = failWhereExpression;
|
||||
content.Rewind();
|
||||
EXPECT_THROW(pageBlobClient.UploadPages(0, content, options), StorageException);
|
||||
@ -941,7 +941,7 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
|
||||
{
|
||||
std::string url = pageBlobClient.GetUrl() + GetSas();
|
||||
Blobs::UploadPageBlobPagesFromUriOptions options;
|
||||
Blobs::UploadPagesFromUriOptions options;
|
||||
options.AccessConditions.TagConditions = failWhereExpression;
|
||||
EXPECT_THROW(
|
||||
pageBlobClient.UploadPagesFromUri(0, url, {0, contentSize}, options), StorageException);
|
||||
@ -950,7 +950,7 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
}
|
||||
|
||||
{
|
||||
Blobs::ClearPageBlobPagesOptions options;
|
||||
Blobs::ClearPagesOptions options;
|
||||
options.AccessConditions.TagConditions = failWhereExpression;
|
||||
EXPECT_THROW(pageBlobClient.ClearPages({0, contentSize}, options), StorageException);
|
||||
options.AccessConditions.TagConditions = successWhereExpression;
|
||||
@ -966,7 +966,7 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
}
|
||||
|
||||
{
|
||||
Blobs::GetPageBlobPageRangesOptions options;
|
||||
Blobs::GetPageRangesOptions options;
|
||||
options.AccessConditions.TagConditions = failWhereExpression;
|
||||
EXPECT_THROW(pageBlobClient.GetPageRanges(options), StorageException);
|
||||
options.AccessConditions.TagConditions = successWhereExpression;
|
||||
|
||||
@ -105,7 +105,7 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
EXPECT_EQ(static_cast<uint64_t>(pageRanges.PageRanges[0].Offset), 3_KB);
|
||||
EXPECT_EQ(static_cast<uint64_t>(pageRanges.PageRanges[0].Length.GetValue()), 3_KB);
|
||||
|
||||
Azure::Storage::Blobs::GetPageBlobPageRangesOptions options;
|
||||
Azure::Storage::Blobs::GetPageRangesOptions options;
|
||||
options.Range = Core::Http::HttpRange();
|
||||
options.Range.GetValue().Offset = 4_KB;
|
||||
options.Range.GetValue().Length = 1_KB;
|
||||
@ -238,7 +238,7 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
pageBlobClient.Create(blobContent.size(), m_blobUploadOptions);
|
||||
auto pageContent = Azure::Core::IO::MemoryBodyStream(blobContent.data(), blobContent.size());
|
||||
|
||||
Blobs::UploadPageBlobPagesOptions options;
|
||||
Blobs::UploadPagesOptions options;
|
||||
ContentHash hash;
|
||||
hash.Algorithm = HashAlgorithm::Md5;
|
||||
|
||||
@ -266,7 +266,7 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
pageBlobClient.Create(blobContent.size(), m_blobUploadOptions);
|
||||
auto pageContent = Azure::Core::IO::MemoryBodyStream(blobContent.data(), blobContent.size());
|
||||
|
||||
Blobs::UploadPageBlobPagesOptions options;
|
||||
Blobs::UploadPagesOptions options;
|
||||
ContentHash hash;
|
||||
hash.Algorithm = HashAlgorithm::Crc64;
|
||||
|
||||
|
||||
@ -16,11 +16,12 @@
|
||||
- `DataLakeServiceClient::GetUserDelegationKey` now returns `UserDelegationKey`.
|
||||
- `DataLakeFileSystemClient::GetProperties` now returns `FileSystemProperties`.
|
||||
- `DataLakeFileSystemClient::GetAccessPolicy` now returns `FileSystemAccessPolicy`.
|
||||
- `DataLakePathClient::GetProperties` now returns `PathProperties`.
|
||||
- `DataLakePathClient::GetProperties` now returns `PathProperties`.
|
||||
- `DataLakePathClient::GetAccessControlList` now returns `PathAccessControlList`.
|
||||
- Removed `GetUserDelegationKeyResult`.
|
||||
- Removed `DataLake` from the names of return types and option types.
|
||||
- Removed `RequestId` from the return types.
|
||||
- Changed `BodyStream` parameter in upload functions from pointer to reference.
|
||||
- Changed `BodyStream` parameter of `Append` function from pointer to reference.
|
||||
|
||||
## 12.0.0-beta.8 (2021-02-12)
|
||||
|
||||
|
||||
@ -201,7 +201,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
* access control list of the path.
|
||||
* @remark This request is sent to dfs endpoint.
|
||||
*/
|
||||
Azure::Response<Models::GetPathAccessControlListResult> GetAccessControlList(
|
||||
Azure::Response<Models::PathAccessControlList> GetAccessControlList(
|
||||
const GetPathAccessControlListOptions& options = GetPathAccessControlListOptions(),
|
||||
const Azure::Core::Context& context = Azure::Core::Context()) const;
|
||||
|
||||
|
||||
@ -166,10 +166,8 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { nam
|
||||
Azure::Nullable<bool> IsCurrentVersion;
|
||||
};
|
||||
|
||||
struct GetPathAccessControlListResult
|
||||
struct PathAccessControlList
|
||||
{
|
||||
Azure::ETag ETag;
|
||||
DateTime LastModified;
|
||||
std::string Owner;
|
||||
std::string Group;
|
||||
std::string Permissions;
|
||||
|
||||
@ -366,7 +366,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
return Azure::Response<Models::PathProperties>(std::move(ret), result.ExtractRawResponse());
|
||||
}
|
||||
|
||||
Azure::Response<Models::GetPathAccessControlListResult> DataLakePathClient::GetAccessControlList(
|
||||
Azure::Response<Models::PathAccessControlList> DataLakePathClient::GetAccessControlList(
|
||||
const GetPathAccessControlListOptions& options,
|
||||
const Azure::Core::Context& context) const
|
||||
{
|
||||
@ -384,9 +384,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
{
|
||||
acl = Models::Acl::DeserializeAcls(result->Acl.GetValue());
|
||||
}
|
||||
Models::GetPathAccessControlListResult ret;
|
||||
ret.ETag = std::move(result->ETag);
|
||||
ret.LastModified = std::move(result->LastModified);
|
||||
Models::PathAccessControlList ret;
|
||||
if (!acl.HasValue())
|
||||
{
|
||||
throw Azure::Core::RequestFailedException(
|
||||
@ -405,7 +403,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
{
|
||||
ret.Permissions = result->Permissions.GetValue();
|
||||
}
|
||||
return Azure::Response<Models::GetPathAccessControlListResult>(
|
||||
return Azure::Response<Models::PathAccessControlList>(
|
||||
std::move(ret), result.ExtractRawResponse());
|
||||
}
|
||||
|
||||
|
||||
@ -9,19 +9,22 @@
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
- Changed the return type of `StartCopy` API from a `Response<T>` to the particular `Operation<T>` type called `StartCopyShareFileOperation` directly.
|
||||
- Changed the return type of `StartCopy` API from a `Response<T>` to the particular `Operation<T>` type called `StartFileCopyOperation` directly.
|
||||
- String conversion functions of extensible enums were renamed from `Get()` to `ToString()`.
|
||||
- Changed the return types of the following APIs:
|
||||
- `ShareClient::GetAccessPolicy` now returns `ShareAccessPolicy`.
|
||||
- `ShareClient::GetPermission` now returns `Azure::Response<std::string>`.
|
||||
- `ShareClient::GetPermission` now returns `std::string`.
|
||||
- `ShareClient::AbortCopy` now returns `AbortFileCopyResult`.
|
||||
- Renamed `GetShareStatisticsResult` to `ShareStatistics`.
|
||||
- Renamed `GetSharePropertiesResult` to `ShareProperties`.
|
||||
- Renamed `GetShareDirectoryPropertiesResult` to `DirectoryProperties`.
|
||||
- Renamed `GetShareFilePropertiesResult` to `FileProperties`
|
||||
- Renamed `GetServicePropertiesResult` to `FileServiceProperties`.
|
||||
- Removed `Share` from the names of return types and option types.
|
||||
- Renamed `AbortCopyFileOptions` to `AbortFileCopyOptions`.
|
||||
- Removed `RequestId` from the return types.
|
||||
- Changed `BodyStream` parameter in upload functions from pointer to reference.
|
||||
- Changed `BodyStream` parameter of `UploadRange` function from pointer to reference.
|
||||
- Removed `PreviousShareSnapshot` from `GetShareFileRangeListOptions`, use `ShareFileClient::GetRangeListDiff` instead.
|
||||
|
||||
## 12.0.0-beta.8 (2021-02-12)
|
||||
|
||||
|
||||
@ -197,11 +197,11 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
* snapshot can also be specified as a copy source.
|
||||
* @param options Optional parameters to copy the content of this file.
|
||||
* @param context Context for cancelling long running operations.
|
||||
* @return StartCopyFileOperation containing the copy related information.
|
||||
* @return StartFileCopyOperation containing the copy related information.
|
||||
*/
|
||||
StartCopyFileOperation StartCopy(
|
||||
StartFileCopyOperation StartCopy(
|
||||
std::string copySource,
|
||||
const StartCopyFileOptions& options = StartCopyFileOptions(),
|
||||
const StartFileCopyOptions& options = StartFileCopyOptions(),
|
||||
const Azure::Core::Context& context = Azure::Core::Context()) const;
|
||||
|
||||
/**
|
||||
@ -210,12 +210,12 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
* StartCopy operation.
|
||||
* @param options Optional parameters to abort copying the content of this file.
|
||||
* @param context Context for cancelling long running operations.
|
||||
* @return Azure::Response<Models::AbortCopyFileResult> containing the abort copy
|
||||
* @return Azure::Response<Models::AbortFileCopyResult> containing the abort copy
|
||||
* related information, current empty but preserved for future usage.
|
||||
*/
|
||||
Azure::Response<Models::AbortCopyFileResult> AbortCopy(
|
||||
Azure::Response<Models::AbortFileCopyResult> AbortCopy(
|
||||
std::string copyId,
|
||||
const AbortCopyFileOptions& options = AbortCopyFileOptions(),
|
||||
const AbortFileCopyOptions& options = AbortFileCopyOptions(),
|
||||
const Azure::Core::Context& context = Azure::Core::Context()) const;
|
||||
|
||||
/**
|
||||
|
||||
@ -352,7 +352,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
LeaseAccessConditions AccessConditions;
|
||||
};
|
||||
|
||||
struct StartCopyFileOptions
|
||||
struct StartFileCopyOptions
|
||||
{
|
||||
/**
|
||||
* @brief A name-value pair to associate with a file storage object.
|
||||
@ -394,7 +394,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
LeaseAccessConditions AccessConditions;
|
||||
};
|
||||
|
||||
struct AbortCopyFileOptions
|
||||
struct AbortFileCopyOptions
|
||||
{
|
||||
/**
|
||||
* @brief The operation will only succeed if the access condition is met.
|
||||
|
||||
@ -133,8 +133,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
DownloadFileDetails Details;
|
||||
};
|
||||
|
||||
using StartCopyShareFileResult = _detail::FileStartCopyResult;
|
||||
using AbortCopyFileResult = _detail::FileAbortCopyResult;
|
||||
using AbortFileCopyResult = _detail::FileAbortCopyResult;
|
||||
using FileProperties = _detail::FileGetPropertiesResult;
|
||||
using SetFilePropertiesResult = _detail::FileSetHttpHeadersResult;
|
||||
using ResizeFileResult = _detail::FileSetHttpHeadersResult;
|
||||
@ -170,17 +169,17 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
|
||||
} // namespace Models
|
||||
|
||||
class StartCopyFileOperation : public Azure::Core::Operation<Models::FileProperties> {
|
||||
class StartFileCopyOperation : public Azure::Core::Operation<Models::FileProperties> {
|
||||
public:
|
||||
Models::FileProperties Value() const override { return m_pollResult; }
|
||||
|
||||
StartCopyFileOperation() = default;
|
||||
StartFileCopyOperation() = default;
|
||||
|
||||
StartCopyFileOperation(StartCopyFileOperation&&) = default;
|
||||
StartFileCopyOperation(StartFileCopyOperation&&) = default;
|
||||
|
||||
StartCopyFileOperation& operator=(StartCopyFileOperation&&) = default;
|
||||
StartFileCopyOperation& operator=(StartFileCopyOperation&&) = default;
|
||||
|
||||
~StartCopyFileOperation() override {}
|
||||
~StartFileCopyOperation() override {}
|
||||
|
||||
private:
|
||||
std::string GetResumeToken() const override
|
||||
|
||||
@ -311,9 +311,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
std::move(ret), downloadResponse.ExtractRawResponse());
|
||||
}
|
||||
|
||||
StartCopyFileOperation ShareFileClient::StartCopy(
|
||||
StartFileCopyOperation ShareFileClient::StartCopy(
|
||||
std::string copySource,
|
||||
const StartCopyFileOptions& options,
|
||||
const StartFileCopyOptions& options,
|
||||
const Azure::Core::Context& context) const
|
||||
{
|
||||
auto protocolLayerOptions = _detail::ShareRestClient::File::StartCopyOptions();
|
||||
@ -371,15 +371,15 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
auto response = _detail::ShareRestClient::File::StartCopy(
|
||||
m_shareFileUrl, *m_pipeline, context, protocolLayerOptions);
|
||||
|
||||
StartCopyFileOperation res;
|
||||
StartFileCopyOperation res;
|
||||
res.m_rawResponse = response.ExtractRawResponse();
|
||||
res.m_fileClient = std::make_shared<ShareFileClient>(*this);
|
||||
return res;
|
||||
}
|
||||
|
||||
Azure::Response<Models::AbortCopyFileResult> ShareFileClient::AbortCopy(
|
||||
Azure::Response<Models::AbortFileCopyResult> ShareFileClient::AbortCopy(
|
||||
std::string copyId,
|
||||
const AbortCopyFileOptions& options,
|
||||
const AbortFileCopyOptions& options,
|
||||
const Azure::Core::Context& context) const
|
||||
{
|
||||
auto protocolLayerOptions = _detail::ShareRestClient::File::AbortCopyOptions();
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
|
||||
namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
|
||||
std::unique_ptr<Azure::Core::Http::RawResponse> StartCopyFileOperation::PollInternal(
|
||||
std::unique_ptr<Azure::Core::Http::RawResponse> StartFileCopyOperation::PollInternal(
|
||||
Azure::Core::Context&)
|
||||
{
|
||||
|
||||
@ -34,7 +34,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
|
||||
return response.ExtractRawResponse();
|
||||
}
|
||||
|
||||
Azure::Response<Models::FileProperties> StartCopyFileOperation::PollUntilDoneInternal(
|
||||
Azure::Response<Models::FileProperties> StartFileCopyOperation::PollUntilDoneInternal(
|
||||
std::chrono::milliseconds period,
|
||||
Azure::Core::Context& context)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user