Removed Nullable return value that never returns. (#747)
This commit is contained in:
parent
5d1a8f4cbc
commit
af71e0167d
@ -118,8 +118,8 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
|
||||
struct CreatePathResult
|
||||
{
|
||||
Azure::Core::Nullable<std::string> ETag;
|
||||
Azure::Core::Nullable<std::string> LastModified;
|
||||
std::string ETag;
|
||||
std::string LastModified;
|
||||
Azure::Core::Nullable<int64_t> ContentLength;
|
||||
};
|
||||
|
||||
@ -153,8 +153,6 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
|
||||
struct RenameFileResult
|
||||
{
|
||||
Azure::Core::Nullable<std::string> ETag;
|
||||
Azure::Core::Nullable<std::string> LastModified;
|
||||
};
|
||||
|
||||
struct DeleteFileResult
|
||||
@ -178,8 +176,6 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
|
||||
struct RenameDirectoryResult
|
||||
{
|
||||
Azure::Core::Nullable<std::string> ETag;
|
||||
Azure::Core::Nullable<std::string> LastModified;
|
||||
Azure::Core::Nullable<std::string> Continuation;
|
||||
};
|
||||
|
||||
|
||||
@ -709,8 +709,6 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
|
||||
struct FileSystemListPathsResult
|
||||
{
|
||||
Azure::Core::Nullable<std::string> ETag;
|
||||
Azure::Core::Nullable<std::string> LastModified;
|
||||
Azure::Core::Nullable<std::string> Continuation;
|
||||
std::vector<Path> Paths;
|
||||
|
||||
@ -848,9 +846,8 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
|
||||
struct PathAppendDataResult
|
||||
{
|
||||
Azure::Core::Nullable<std::string> ETag;
|
||||
Azure::Core::Nullable<std::string> ContentMD5;
|
||||
Azure::Core::Nullable<std::string> XMsContentCrc64;
|
||||
Azure::Core::Nullable<std::string> ContentCrc64;
|
||||
bool IsServerEncrypted = bool();
|
||||
};
|
||||
|
||||
@ -1392,15 +1389,6 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
? FileSystemListPathsResult()
|
||||
: FileSystemListPathsResult::FileSystemListPathsResultFromPathList(
|
||||
PathList::CreateFromJson(nlohmann::json::parse(bodyBuffer)));
|
||||
if (response.GetHeaders().find(Details::c_HeaderETag) != response.GetHeaders().end())
|
||||
{
|
||||
result.ETag = response.GetHeaders().at(Details::c_HeaderETag);
|
||||
}
|
||||
if (response.GetHeaders().find(Details::c_HeaderLastModified)
|
||||
!= response.GetHeaders().end())
|
||||
{
|
||||
result.LastModified = response.GetHeaders().at(Details::c_HeaderLastModified);
|
||||
}
|
||||
if (response.GetHeaders().find(Details::c_HeaderXMsContinuation)
|
||||
!= response.GetHeaders().end())
|
||||
{
|
||||
@ -3434,10 +3422,6 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
{
|
||||
// Append data to file control response.
|
||||
PathAppendDataResult result;
|
||||
if (response.GetHeaders().find(Details::c_HeaderETag) != response.GetHeaders().end())
|
||||
{
|
||||
result.ETag = response.GetHeaders().at(Details::c_HeaderETag);
|
||||
}
|
||||
if (response.GetHeaders().find(Details::c_HeaderContentMD5)
|
||||
!= response.GetHeaders().end())
|
||||
{
|
||||
@ -3446,7 +3430,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
if (response.GetHeaders().find(Details::c_HeaderXMsContentCrc64)
|
||||
!= response.GetHeaders().end())
|
||||
{
|
||||
result.XMsContentCrc64 = response.GetHeaders().at(Details::c_HeaderXMsContentCrc64);
|
||||
result.ContentCrc64 = response.GetHeaders().at(Details::c_HeaderXMsContentCrc64);
|
||||
}
|
||||
result.IsServerEncrypted
|
||||
= response.GetHeaders().at(Details::c_HeaderXMsRequestServerEncrypted) == "true";
|
||||
|
||||
@ -182,8 +182,6 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
destinationDfsUri, *m_pipeline, options.Context, protocolLayerOptions);
|
||||
// At this point, there is not more exception thrown, meaning the rename is successful.
|
||||
auto ret = RenameDirectoryResult();
|
||||
ret.ETag = std::move(result->ETag);
|
||||
ret.LastModified = std::move(result->LastModified);
|
||||
ret.Continuation = std::move(result->Continuation);
|
||||
return Azure::Core::Response<RenameDirectoryResult>(
|
||||
std::move(ret), result.ExtractRawResponse());
|
||||
|
||||
@ -278,8 +278,6 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
destinationDfsUri, *m_pipeline, options.Context, protocolLayerOptions);
|
||||
// At this point, there is not more exception thrown, meaning the rename is successful.
|
||||
auto ret = RenameFileResult();
|
||||
ret.ETag = std::move(result->ETag);
|
||||
ret.LastModified = std::move(result->LastModified);
|
||||
return Azure::Core::Response<RenameFileResult>(std::move(ret), result.ExtractRawResponse());
|
||||
}
|
||||
|
||||
|
||||
@ -259,8 +259,8 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
auto result = DataLakeRestClient::Path::Create(
|
||||
m_dfsUri, *m_pipeline, options.Context, protocolLayerOptions);
|
||||
auto ret = CreatePathResult();
|
||||
ret.ETag = std::move(result->ETag);
|
||||
ret.LastModified = std::move(result->LastModified);
|
||||
ret.ETag = std::move(result->ETag.GetValue());
|
||||
ret.LastModified = std::move(result->LastModified.GetValue());
|
||||
ret.ContentLength = std::move(result->ContentLength);
|
||||
return Azure::Core::Response<CreatePathResult>(std::move(ret), result.ExtractRawResponse());
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user