67 lines
1.5 KiB
C++
67 lines
1.5 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/datasync/model/DescribeLocationS3Result.h>
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|
#include <aws/core/AmazonWebServiceResult.h>
|
|
#include <aws/core/utils/StringUtils.h>
|
|
#include <aws/core/utils/UnreferencedParam.h>
|
|
|
|
#include <utility>
|
|
|
|
using namespace Aws::DataSync::Model;
|
|
using namespace Aws::Utils::Json;
|
|
using namespace Aws::Utils;
|
|
using namespace Aws;
|
|
|
|
DescribeLocationS3Result::DescribeLocationS3Result() :
|
|
m_s3StorageClass(S3StorageClass::NOT_SET)
|
|
{
|
|
}
|
|
|
|
DescribeLocationS3Result::DescribeLocationS3Result(const Aws::AmazonWebServiceResult<JsonValue>& result) :
|
|
m_s3StorageClass(S3StorageClass::NOT_SET)
|
|
{
|
|
*this = result;
|
|
}
|
|
|
|
DescribeLocationS3Result& DescribeLocationS3Result::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
|
|
{
|
|
JsonView jsonValue = result.GetPayload().View();
|
|
if(jsonValue.ValueExists("LocationArn"))
|
|
{
|
|
m_locationArn = jsonValue.GetString("LocationArn");
|
|
|
|
}
|
|
|
|
if(jsonValue.ValueExists("LocationUri"))
|
|
{
|
|
m_locationUri = jsonValue.GetString("LocationUri");
|
|
|
|
}
|
|
|
|
if(jsonValue.ValueExists("S3StorageClass"))
|
|
{
|
|
m_s3StorageClass = S3StorageClassMapper::GetS3StorageClassForName(jsonValue.GetString("S3StorageClass"));
|
|
|
|
}
|
|
|
|
if(jsonValue.ValueExists("S3Config"))
|
|
{
|
|
m_s3Config = jsonValue.GetObject("S3Config");
|
|
|
|
}
|
|
|
|
if(jsonValue.ValueExists("CreationTime"))
|
|
{
|
|
m_creationTime = jsonValue.GetDouble("CreationTime");
|
|
|
|
}
|
|
|
|
|
|
|
|
return *this;
|
|
}
|