Resolve some casing issue (#534)

This commit is contained in:
Kan Tang 2020-08-26 12:09:06 +08:00 committed by GitHub
parent c5438d623b
commit 2c84e3f094
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 82 additions and 76 deletions

View File

@ -233,7 +233,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
/**
* @brief Specify the transactional md5 for the body, to be validated by the service.
*/
Azure::Core::Nullable<std::string> ContentMD5;
Azure::Core::Nullable<std::string> ContentMd5;
/**
* @brief Specify the lease access conditions.
@ -282,7 +282,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
* Properties" will not return this property unless it is explicitly set on that file
* again.
*/
Azure::Core::Nullable<std::string> ContentMD5;
Azure::Core::Nullable<std::string> ContentMd5;
/**
* @brief Specify the http headers for this path.
@ -518,7 +518,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
* when the range exceeds 4 MB in size, the service returns status code 400 (Bad
* Request).
*/
Azure::Core::Nullable<bool> RangeGetContentMD5;
Azure::Core::Nullable<bool> RangeGetContentMd5;
/**
* @brief Specify the access condition for the path.

View File

@ -134,13 +134,13 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
DataLakeHttpHeaders HttpHeaders;
Azure::Core::Nullable<int64_t> RangeOffset;
Azure::Core::Nullable<int64_t> RangeLength;
Azure::Core::Nullable<std::string> TransactionalMD5;
Azure::Core::Nullable<std::string> TransactionalMd5;
std::string ETag;
std::string LastModified;
Azure::Core::Nullable<std::string> LeaseDuration;
LeaseStateType LeaseState;
LeaseStatusType LeaseStatus;
Azure::Core::Nullable<std::string> ContentMD5;
LeaseStateType LeaseState = LeaseStateType::Unknown;
LeaseStatusType LeaseStatus = LeaseStatusType::Unknown;
Azure::Core::Nullable<std::string> ContentMd5;
std::map<std::string, std::string> Metadata;
};

View File

@ -66,8 +66,8 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
constexpr static const char* c_HeaderContentEncoding = "x-ms-content-encoding";
constexpr static const char* c_HeaderContentLanguage = "x-ms-content-language";
constexpr static const char* c_HeaderContentType = "x-ms-content-type";
constexpr static const char* c_HeaderTransactionalContentMD5 = "content-md5";
constexpr static const char* c_HeaderContentMD5 = "x-ms-content-md5";
constexpr static const char* c_HeaderTransactionalContentMd5 = "content-md5";
constexpr static const char* c_HeaderContentMd5 = "x-ms-content-md5";
constexpr static const char* c_HeaderUmask = "x-ms-umask";
constexpr static const char* c_HeaderPermissions = "x-ms-permissions";
constexpr static const char* c_HeaderRenameSource = "x-ms-rename-source";
@ -87,6 +87,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
constexpr static const char* c_HeaderXMsProperties = "x-ms-properties";
constexpr static const char* c_HeaderAcceptRanges = "accept-ranges";
constexpr static const char* c_HeaderContentRange = "content-range";
constexpr static const char* c_HeaderContentMD5 = "content-md5";
constexpr static const char* c_HeaderPathLeaseAction = "x-ms-lease-action";
constexpr static const char* c_HeaderXMsLeaseDuration = "x-ms-lease-duration";
constexpr static const char* c_HeaderXMsLeaseBreakPeriod = "x-ms-lease-break-period";
@ -679,7 +680,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
DataLakeHttpHeaders HttpHeaders;
int64_t ContentLength = int64_t();
Azure::Core::Nullable<std::string> ContentRange;
Azure::Core::Nullable<std::string> ContentMD5;
Azure::Core::Nullable<std::string> ContentMd5;
Azure::Core::Nullable<std::string> Properties;
Azure::Core::Nullable<std::string> Continuation;
int32_t DirectoriesSuccessful = int32_t();
@ -715,7 +716,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
DataLakeHttpHeaders HttpHeaders;
int64_t ContentLength = int64_t();
Azure::Core::Nullable<std::string> ContentRange;
Azure::Core::Nullable<std::string> TransactionalMD5;
Azure::Core::Nullable<std::string> TransactionalMd5;
std::string ETag;
std::string LastModified;
std::string ResourceType;
@ -723,7 +724,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
Azure::Core::Nullable<std::string> LeaseDuration;
LeaseStateType LeaseState = LeaseStateType::Unknown;
LeaseStatusType LeaseStatus = LeaseStatusType::Unknown;
Azure::Core::Nullable<std::string> ContentMD5;
Azure::Core::Nullable<std::string> ContentMd5;
};
struct PathGetPropertiesResult
@ -732,7 +733,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
DataLakeHttpHeaders HttpHeaders;
int64_t ContentLength = int64_t();
Azure::Core::Nullable<std::string> ContentRange;
Azure::Core::Nullable<std::string> ContentMD5;
Azure::Core::Nullable<std::string> ContentMd5;
std::string ETag;
std::string LastModified;
Azure::Core::Nullable<std::string> ResourceType;
@ -1610,7 +1611,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
ContentLength; // Required for "Append Data" and "Flush Data". Must be 0 for "Flush
// Data". Must be the length of the request content in bytes for "Append
// Data".
Azure::Core::Nullable<std::string> ContentMD5; // Specify the transactional md5 for the
Azure::Core::Nullable<std::string> ContentMd5; // Specify the transactional md5 for the
// body, to be validated by the service.
Azure::Core::Nullable<std::string>
LeaseIdOptional; // If specified, the operation only succeeds if the resource's lease is
@ -1722,9 +1723,9 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
Details::c_HeaderContentLength,
std::to_string(updateOptions.ContentLength.GetValue()));
}
if (updateOptions.ContentMD5.HasValue())
if (updateOptions.ContentMd5.HasValue())
{
request.AddHeader(Details::c_HeaderContentMD5, updateOptions.ContentMD5.GetValue());
request.AddHeader(Details::c_HeaderContentMd5, updateOptions.ContentMd5.GetValue());
}
if (updateOptions.LeaseIdOptional.HasValue())
{
@ -2427,7 +2428,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
ContentLength; // Required for "Append Data" and "Flush Data". Must be 0 for "Flush
// Data". Must be the length of the request content in bytes for "Append
// Data".
Azure::Core::Nullable<std::string> ContentMD5; // Specify the transactional md5 for the
Azure::Core::Nullable<std::string> ContentMd5; // Specify the transactional md5 for the
// body, to be validated by the service.
Azure::Core::Nullable<std::string>
LeaseIdOptional; // If specified, the operation only succeeds if the resource's lease is
@ -2500,9 +2501,9 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
Details::c_HeaderContentLength,
std::to_string(flushDataOptions.ContentLength.GetValue()));
}
if (flushDataOptions.ContentMD5.HasValue())
if (flushDataOptions.ContentMd5.HasValue())
{
request.AddHeader(Details::c_HeaderContentMD5, flushDataOptions.ContentMD5.GetValue());
request.AddHeader(Details::c_HeaderContentMd5, flushDataOptions.ContentMd5.GetValue());
}
if (flushDataOptions.LeaseIdOptional.HasValue())
{
@ -2582,7 +2583,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
// Data". Must be the length of the request content in bytes for "Append
// Data".
Azure::Core::Nullable<std::string>
TransactionalContentMD5; // Specify the transactional md5 for the body, to be validated
TransactionalContentMd5; // Specify the transactional md5 for the body, to be validated
// by the service.
Azure::Core::Nullable<std::string>
LeaseIdOptional; // If specified, the operation only succeeds if the resource's lease is
@ -2622,11 +2623,11 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
Details::c_HeaderContentLength,
std::to_string(appendDataOptions.ContentLength.GetValue()));
}
if (appendDataOptions.TransactionalContentMD5.HasValue())
if (appendDataOptions.TransactionalContentMd5.HasValue())
{
request.AddHeader(
Details::c_HeaderTransactionalContentMD5,
appendDataOptions.TransactionalContentMD5.GetValue());
Details::c_HeaderTransactionalContentMd5,
appendDataOptions.TransactionalContentMd5.GetValue());
}
if (appendDataOptions.LeaseIdOptional.HasValue())
{
@ -2735,9 +2736,10 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
{
result.HttpHeaders.ContentType = response.GetHeaders().at("content-type");
}
if (response.GetHeaders().find("content-md5") != response.GetHeaders().end())
if (response.GetHeaders().find(Details::c_HeaderContentMD5)
!= response.GetHeaders().end())
{
result.ContentMD5 = response.GetHeaders().at("content-md5");
result.ContentMd5 = response.GetHeaders().at(Details::c_HeaderContentMD5);
}
if (response.GetHeaders().find(Details::c_HeaderXMsProperties)
!= response.GetHeaders().end())
@ -2755,9 +2757,10 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
{
// The uploaded data was accepted.
PathUpdateResult result;
if (response.GetHeaders().find("content-md5") != response.GetHeaders().end())
if (response.GetHeaders().find(Details::c_HeaderContentMD5)
!= response.GetHeaders().end())
{
result.ContentMD5 = response.GetHeaders().at("content-md5");
result.ContentMd5 = response.GetHeaders().at(Details::c_HeaderContentMD5);
}
return Azure::Core::Response<PathUpdateResult>(std::move(result), std::move(responsePtr));
}
@ -2861,9 +2864,10 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
{
result.HttpHeaders.ContentType = response.GetHeaders().at("content-type");
}
if (response.GetHeaders().find("content-md5") != response.GetHeaders().end())
if (response.GetHeaders().find(Details::c_HeaderContentMD5)
!= response.GetHeaders().end())
{
result.ContentMD5 = response.GetHeaders().at("content-md5");
result.ContentMd5 = response.GetHeaders().at(Details::c_HeaderContentMD5);
}
result.ETag = response.GetHeaders().at(Details::c_HeaderETag);
result.LastModified = response.GetHeaders().at(Details::c_HeaderLastModified);
@ -2925,14 +2929,15 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
{
result.HttpHeaders.ContentType = response.GetHeaders().at("content-type");
}
if (response.GetHeaders().find("content-md5") != response.GetHeaders().end())
if (response.GetHeaders().find(Details::c_HeaderContentMD5)
!= response.GetHeaders().end())
{
result.TransactionalMD5 = response.GetHeaders().at("content-md5");
result.TransactionalMd5 = response.GetHeaders().at(Details::c_HeaderContentMD5);
}
if (response.GetHeaders().find(Details::c_HeaderXMsContentMd5)
!= response.GetHeaders().end())
{
result.ContentMD5 = response.GetHeaders().at(Details::c_HeaderXMsContentMd5);
result.ContentMd5 = response.GetHeaders().at(Details::c_HeaderXMsContentMd5);
}
result.ETag = response.GetHeaders().at(Details::c_HeaderETag);
result.LastModified = response.GetHeaders().at(Details::c_HeaderLastModified);
@ -3005,9 +3010,10 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
{
result.HttpHeaders.ContentType = response.GetHeaders().at("content-type");
}
if (response.GetHeaders().find("content-md5") != response.GetHeaders().end())
if (response.GetHeaders().find(Details::c_HeaderContentMD5)
!= response.GetHeaders().end())
{
result.ContentMD5 = response.GetHeaders().at("content-md5");
result.ContentMd5 = response.GetHeaders().at(Details::c_HeaderContentMD5);
}
result.ETag = response.GetHeaders().at(Details::c_HeaderETag);
result.LastModified = response.GetHeaders().at(Details::c_HeaderLastModified);

View File

@ -37,7 +37,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
constexpr static const char* c_HeaderVersion = "x-ms-version";
constexpr static const char* c_HeaderRequestId = "x-ms-client-request-id";
constexpr static const char* c_HeaderContentLength = "content-length";
constexpr static const char* c_HeaderContentMD5 = "content-md5";
constexpr static const char* c_HeaderContentMd5 = "content-md5";
constexpr static const char* c_HeaderCopyActionAbortConstant = "x-ms-copy-action";
constexpr static const char* c_HeaderCopySource = "x-ms-copy-source";
constexpr static const char* c_HeaderFilePermissionCopyMode = "x-ms-file-permission-copy-mode";
@ -53,14 +53,14 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
constexpr static const char* c_HeaderFileContentDisposition = "x-ms-content-disposition";
constexpr static const char* c_HeaderFileContentEncoding = "x-ms-content-encoding";
constexpr static const char* c_HeaderFileContentLanguage = "x-ms-content-language";
constexpr static const char* c_HeaderFileContentMD5 = "x-ms-content-md5";
constexpr static const char* c_HeaderFileContentMd5 = "x-ms-content-md5";
constexpr static const char* c_HeaderFileContentType = "x-ms-content-type";
constexpr static const char* c_HeaderFilePermission = "x-ms-file-permission";
constexpr static const char* c_HeaderFilePermissionKey = "x-ms-file-permission-key";
constexpr static const char* c_HeaderFileRangeWriteFromUrl = "x-ms-write";
constexpr static const char* c_HeaderFileRangeWriteFromUrlDefault = "update";
constexpr static const char* c_HeaderFileTypeConstant = "x-ms-type";
constexpr static const char* c_HeaderRangeGetContentMD5 = "x-ms-range-get-content-md5";
constexpr static const char* c_HeaderRangeGetContentMd5 = "x-ms-range-get-content-md5";
constexpr static const char* c_HeaderHandleId = "x-ms-handle-id";
constexpr static const char* c_HeaderDuration = "x-ms-lease-duration";
constexpr static const char* c_HeaderLeaseId = "x-ms-lease-id";
@ -935,7 +935,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
FileShareHttpHeaders HttpHeaders;
Azure::Core::Nullable<std::string> ContentRange;
std::string ETag;
std::string ContentMD5;
Azure::Core::Nullable<std::string> ContentMd5;
std::string AcceptRanges;
Azure::Core::Nullable<std::string> CopyCompletionTime;
Azure::Core::Nullable<std::string> CopyStatusDescription;
@ -943,7 +943,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
Azure::Core::Nullable<std::string> CopyProgress;
Azure::Core::Nullable<std::string> CopySource;
Azure::Core::Nullable<CopyStatusType> CopyStatus;
Azure::Core::Nullable<std::string> FileContentMD5;
Azure::Core::Nullable<std::string> FileContentMd5;
Azure::Core::Nullable<bool> IsServerEncrypted;
std::string FileAttributes;
std::string FileCreationTime;
@ -965,7 +965,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
int64_t ContentLength = int64_t();
FileShareHttpHeaders HttpHeaders;
std::string ETag;
Azure::Core::Nullable<std::string> ContentMD5;
Azure::Core::Nullable<std::string> ContentMd5;
Azure::Core::Nullable<std::string> CopyCompletionTime;
Azure::Core::Nullable<std::string> CopyStatusDescription;
Azure::Core::Nullable<std::string> CopyId;
@ -1040,7 +1040,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
{
std::string ETag;
std::string LastModified;
std::string ContentMD5;
std::string ContentMd5;
bool IsServerEncrypted = bool();
};
@ -4429,7 +4429,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
Azure::Core::Nullable<std::string>
FileCacheControl; // Sets the file's cache control. The File service stores this value
// but does not use or modify it.
Azure::Core::Nullable<std::string> FileContentMD5; // Sets the file's MD5 hash.
Azure::Core::Nullable<std::string> FileContentMd5; // Sets the file's MD5 hash.
Azure::Core::Nullable<std::string>
FileContentDisposition; // Sets the file's Content-Disposition header.
std::map<std::string, std::string>
@ -4493,10 +4493,10 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
request.AddHeader(
Details::c_HeaderFileCacheControl, createOptions.FileCacheControl.GetValue());
}
if (createOptions.FileContentMD5.HasValue())
if (createOptions.FileContentMd5.HasValue())
{
request.AddHeader(
Details::c_HeaderFileContentMD5, createOptions.FileContentMD5.GetValue());
Details::c_HeaderFileContentMd5, createOptions.FileContentMd5.GetValue());
}
if (createOptions.FileContentDisposition.HasValue())
{
@ -4550,7 +4550,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
Azure::Core::Nullable<std::string>
Range; // Return file data only from the specified byte range.
Azure::Core::Nullable<bool>
GetRangeContentMD5; // When this header is set to true and specified together with the
GetRangeContentMd5; // When this header is set to true and specified together with the
// Range header, the service returns the MD5 hash for the range, as
// long as the range is less than or equal to 4 MB in size.
Azure::Core::Nullable<std::string>
@ -4575,11 +4575,11 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
{
request.AddHeader(Details::c_HeaderRange, downloadOptions.Range.GetValue());
}
if (downloadOptions.GetRangeContentMD5.HasValue())
if (downloadOptions.GetRangeContentMd5.HasValue())
{
request.AddHeader(
Details::c_HeaderRangeGetContentMD5,
(downloadOptions.GetRangeContentMD5.GetValue() ? "true" : "false"));
Details::c_HeaderRangeGetContentMd5,
(downloadOptions.GetRangeContentMd5.GetValue() ? "true" : "false"));
}
if (downloadOptions.LeaseIdOptional.HasValue())
{
@ -4688,7 +4688,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
Azure::Core::Nullable<std::string>
FileCacheControl; // Sets the file's cache control. The File service stores this value
// but does not use or modify it.
Azure::Core::Nullable<std::string> FileContentMD5; // Sets the file's MD5 hash.
Azure::Core::Nullable<std::string> FileContentMd5; // Sets the file's MD5 hash.
Azure::Core::Nullable<std::string>
FileContentDisposition; // Sets the file's Content-Disposition header.
Azure::Core::Nullable<std::string>
@ -4756,10 +4756,10 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
request.AddHeader(
Details::c_HeaderFileCacheControl, setHttpHeadersOptions.FileCacheControl.GetValue());
}
if (setHttpHeadersOptions.FileContentMD5.HasValue())
if (setHttpHeadersOptions.FileContentMd5.HasValue())
{
request.AddHeader(
Details::c_HeaderFileContentMD5, setHttpHeadersOptions.FileContentMD5.GetValue());
Details::c_HeaderFileContentMd5, setHttpHeadersOptions.FileContentMd5.GetValue());
}
if (setHttpHeadersOptions.FileContentDisposition.HasValue())
{
@ -5068,7 +5068,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
// request body. When the x-ms-write header is set to
// clear, the value of this header must be set to zero.
Azure::Core::Nullable<std::string>
ContentMD5; // An MD5 hash of the content. This hash is used to verify the integrity of
ContentMd5; // An MD5 hash of the content. This hash is used to verify the integrity of
// the data during transport. When the Content-MD5 header is specified, the
// File service compares the hash of the content that has arrived with the
// header value that was sent. If the two hashes do not match, the operation
@ -5102,9 +5102,9 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
FileRangeWriteTypeToString(uploadRangeOptions.XMsWrite));
request.AddHeader(
Details::c_HeaderContentLength, std::to_string(uploadRangeOptions.ContentLength));
if (uploadRangeOptions.ContentMD5.HasValue())
if (uploadRangeOptions.ContentMd5.HasValue())
{
request.AddHeader(Details::c_HeaderContentMD5, uploadRangeOptions.ContentMD5.GetValue());
request.AddHeader(Details::c_HeaderContentMd5, uploadRangeOptions.ContentMd5.GetValue());
}
request.AddHeader(Details::c_HeaderVersion, uploadRangeOptions.ApiVersionParameter);
if (uploadRangeOptions.LeaseIdOptional.HasValue())
@ -5611,10 +5611,10 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
result.ContentRange = response.GetHeaders().at(Details::c_HeaderContentRange);
}
result.ETag = response.GetHeaders().at(Details::c_HeaderETag);
if (response.GetHeaders().find(Details::c_HeaderContentMD5)
if (response.GetHeaders().find(Details::c_HeaderContentMd5)
!= response.GetHeaders().end())
{
result.ContentMD5 = response.GetHeaders().at(Details::c_HeaderContentMD5);
result.ContentMd5 = response.GetHeaders().at(Details::c_HeaderContentMd5);
}
if (response.GetHeaders().find(Details::c_HeaderContentEncoding)
!= response.GetHeaders().end())
@ -5673,10 +5673,10 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
result.CopyStatus
= CopyStatusTypeFromString(response.GetHeaders().at(Details::c_HeaderCopyStatus));
}
if (response.GetHeaders().find(Details::c_HeaderFileContentMD5)
if (response.GetHeaders().find(Details::c_HeaderFileContentMd5)
!= response.GetHeaders().end())
{
result.FileContentMD5 = response.GetHeaders().at(Details::c_HeaderFileContentMD5);
result.FileContentMd5 = response.GetHeaders().at(Details::c_HeaderFileContentMd5);
}
if (response.GetHeaders().find(Details::c_HeaderIsServerEncrypted)
!= response.GetHeaders().end())
@ -5735,10 +5735,10 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
result.ContentRange = response.GetHeaders().at(Details::c_HeaderContentRange);
}
result.ETag = response.GetHeaders().at(Details::c_HeaderETag);
if (response.GetHeaders().find(Details::c_HeaderContentMD5)
if (response.GetHeaders().find(Details::c_HeaderContentMd5)
!= response.GetHeaders().end())
{
result.ContentMD5 = response.GetHeaders().at(Details::c_HeaderContentMD5);
result.ContentMd5 = response.GetHeaders().at(Details::c_HeaderContentMd5);
}
if (response.GetHeaders().find(Details::c_HeaderContentEncoding)
!= response.GetHeaders().end())
@ -5797,10 +5797,10 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
result.CopyStatus
= CopyStatusTypeFromString(response.GetHeaders().at(Details::c_HeaderCopyStatus));
}
if (response.GetHeaders().find(Details::c_HeaderFileContentMD5)
if (response.GetHeaders().find(Details::c_HeaderFileContentMd5)
!= response.GetHeaders().end())
{
result.FileContentMD5 = response.GetHeaders().at(Details::c_HeaderFileContentMD5);
result.FileContentMd5 = response.GetHeaders().at(Details::c_HeaderFileContentMd5);
}
if (response.GetHeaders().find(Details::c_HeaderIsServerEncrypted)
!= response.GetHeaders().end())
@ -5870,10 +5870,10 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
result.HttpHeaders.ContentType = response.GetHeaders().at(Details::c_HeaderContentType);
}
result.ETag = response.GetHeaders().at(Details::c_HeaderETag);
if (response.GetHeaders().find(Details::c_HeaderContentMD5)
if (response.GetHeaders().find(Details::c_HeaderContentMd5)
!= response.GetHeaders().end())
{
result.ContentMD5 = response.GetHeaders().at(Details::c_HeaderContentMD5);
result.ContentMd5 = response.GetHeaders().at(Details::c_HeaderContentMd5);
}
if (response.GetHeaders().find(Details::c_HeaderContentEncoding)
!= response.GetHeaders().end())
@ -6143,10 +6143,10 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
FileUploadRangeResult result;
result.ETag = response.GetHeaders().at(Details::c_HeaderETag);
result.LastModified = response.GetHeaders().at(Details::c_HeaderLastModified);
if (response.GetHeaders().find(Details::c_HeaderContentMD5)
if (response.GetHeaders().find(Details::c_HeaderContentMd5)
!= response.GetHeaders().end())
{
result.ContentMD5 = response.GetHeaders().at(Details::c_HeaderContentMD5);
result.ContentMd5 = response.GetHeaders().at(Details::c_HeaderContentMd5);
}
result.IsServerEncrypted
= response.GetHeaders().at(Details::c_HeaderRequestIsServerEncrypted) == "true";

View File

@ -379,7 +379,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
/**
* @brief Sets the file's MD5 hash.
*/
Azure::Core::Nullable<std::string> FileContentMD5;
Azure::Core::Nullable<std::string> FileContentMd5;
/**
* @brief A name-value pair to associate with a file storage object.
@ -428,7 +428,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
* the service returns the MD5 hash for the range, as long as the range is less than or equal to
* 4 MB in size.
*/
Azure::Core::Nullable<bool> GetRangeContentMD5;
Azure::Core::Nullable<bool> GetRangeContentMd5;
/**
* @brief The operation will only succeed if the access condition is met.
@ -519,7 +519,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
/**
* @brief Sets the file's MD5 hash.
*/
Azure::Core::Nullable<std::string> FileContentMD5;
Azure::Core::Nullable<std::string> FileContentMd5;
/**
* @brief This permission is the security descriptor for the file specified in the Security
@ -564,7 +564,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
* hash of the content that has arrived with the header value that was sent. If the two hashes
* do not match, the operation will fail with error code 400 (Bad Request).
*/
Azure::Core::Nullable<std::string> ContentMD5;
Azure::Core::Nullable<std::string> ContentMd5;
/**
* @brief The operation will only succeed if the access condition is met.

View File

@ -207,7 +207,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
DataLakeRestClient::Path::AppendDataOptions protocolLayerOptions;
protocolLayerOptions.Position = offset;
protocolLayerOptions.ContentLength = content->Length();
protocolLayerOptions.TransactionalContentMD5 = options.ContentMD5;
protocolLayerOptions.TransactionalContentMd5 = options.ContentMd5;
protocolLayerOptions.LeaseIdOptional = options.AccessConditions.LeaseId;
return DataLakeRestClient::Path::AppendData(
m_dfsUri.ToString(), *content, *m_pipeline, options.Context, protocolLayerOptions);
@ -222,7 +222,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
protocolLayerOptions.RetainUncommittedData = options.RetainUncommittedData;
protocolLayerOptions.Close = options.Close;
protocolLayerOptions.ContentLength = 0;
protocolLayerOptions.ContentMD5 = options.ContentMD5;
protocolLayerOptions.ContentMd5 = options.ContentMd5;
protocolLayerOptions.LeaseIdOptional = options.AccessConditions.LeaseId;
protocolLayerOptions.CacheControl = options.HttpHeaders.CacheControl;
protocolLayerOptions.ContentType = options.HttpHeaders.ContentType;
@ -312,7 +312,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
}
ret.RangeOffset = RangeOffset;
ret.RangeLength = RangeLength;
ret.TransactionalMD5 = std::move(result->ContentMd5);
ret.TransactionalMd5 = std::move(result->ContentMd5);
ret.ETag = std::move(result->ETag);
ret.LastModified = std::move(result->LastModified);
ret.LeaseDuration = std::move(result->LeaseDuration);

View File

@ -193,7 +193,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
{
protocolLayerOptions.FileContentDisposition = options.HttpHeaders.ContentDisposition;
}
protocolLayerOptions.FileContentMD5 = options.FileContentMD5;
protocolLayerOptions.FileContentMd5 = options.FileContentMd5;
protocolLayerOptions.LeaseIdOptional = options.AccessConditions.LeaseId;
return ShareRestClient::File::Create(
m_shareFileUri.ToString(), *m_pipeline, options.Context, protocolLayerOptions);
@ -225,7 +225,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
= std::string("bytes=") + std::to_string(options.Offset.GetValue()) + std::string("-");
}
}
protocolLayerOptions.GetRangeContentMD5 = options.GetRangeContentMD5;
protocolLayerOptions.GetRangeContentMd5 = options.GetRangeContentMd5;
protocolLayerOptions.LeaseIdOptional = options.AccessConditions.LeaseId;
auto downloadResponse = ShareRestClient::File::Download(
@ -401,7 +401,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
protocolLayerOptions.ContentLength = content->Length();
protocolLayerOptions.XMsRange = std::string("bytes=") + std::to_string(offset)
+ std::string("-") + std::to_string(offset + content->Length() - 1);
protocolLayerOptions.ContentMD5 = options.ContentMD5;
protocolLayerOptions.ContentMd5 = options.ContentMd5;
protocolLayerOptions.LeaseIdOptional = options.AccessConditions.LeaseId;
return ShareRestClient::File::UploadRange(
m_shareFileUri.ToString(), *content, *m_pipeline, options.Context, protocolLayerOptions);