90 lines
1.4 KiB
C++
90 lines
1.4 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/signer/model/S3Source.h>
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|
|
|
#include <utility>
|
|
|
|
using namespace Aws::Utils::Json;
|
|
using namespace Aws::Utils;
|
|
|
|
namespace Aws
|
|
{
|
|
namespace signer
|
|
{
|
|
namespace Model
|
|
{
|
|
|
|
S3Source::S3Source() :
|
|
m_bucketNameHasBeenSet(false),
|
|
m_keyHasBeenSet(false),
|
|
m_versionHasBeenSet(false)
|
|
{
|
|
}
|
|
|
|
S3Source::S3Source(JsonView jsonValue) :
|
|
m_bucketNameHasBeenSet(false),
|
|
m_keyHasBeenSet(false),
|
|
m_versionHasBeenSet(false)
|
|
{
|
|
*this = jsonValue;
|
|
}
|
|
|
|
S3Source& S3Source::operator =(JsonView jsonValue)
|
|
{
|
|
if(jsonValue.ValueExists("bucketName"))
|
|
{
|
|
m_bucketName = jsonValue.GetString("bucketName");
|
|
|
|
m_bucketNameHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("key"))
|
|
{
|
|
m_key = jsonValue.GetString("key");
|
|
|
|
m_keyHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("version"))
|
|
{
|
|
m_version = jsonValue.GetString("version");
|
|
|
|
m_versionHasBeenSet = true;
|
|
}
|
|
|
|
return *this;
|
|
}
|
|
|
|
JsonValue S3Source::Jsonize() const
|
|
{
|
|
JsonValue payload;
|
|
|
|
if(m_bucketNameHasBeenSet)
|
|
{
|
|
payload.WithString("bucketName", m_bucketName);
|
|
|
|
}
|
|
|
|
if(m_keyHasBeenSet)
|
|
{
|
|
payload.WithString("key", m_key);
|
|
|
|
}
|
|
|
|
if(m_versionHasBeenSet)
|
|
{
|
|
payload.WithString("version", m_version);
|
|
|
|
}
|
|
|
|
return payload;
|
|
}
|
|
|
|
} // namespace Model
|
|
} // namespace signer
|
|
} // namespace Aws
|