166 lines
3.7 KiB
C++
166 lines
3.7 KiB
C++
|
|
/**
|
|||
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|||
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
#include <aws/firehose/model/S3DestinationConfiguration.h>
|
|||
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|||
|
|
|
|||
|
|
#include <utility>
|
|||
|
|
|
|||
|
|
using namespace Aws::Utils::Json;
|
|||
|
|
using namespace Aws::Utils;
|
|||
|
|
|
|||
|
|
namespace Aws
|
|||
|
|
{
|
|||
|
|
namespace Firehose
|
|||
|
|
{
|
|||
|
|
namespace Model
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
S3DestinationConfiguration::S3DestinationConfiguration() :
|
|||
|
|
m_roleARNHasBeenSet(false),
|
|||
|
|
m_bucketARNHasBeenSet(false),
|
|||
|
|
m_prefixHasBeenSet(false),
|
|||
|
|
m_errorOutputPrefixHasBeenSet(false),
|
|||
|
|
m_bufferingHintsHasBeenSet(false),
|
|||
|
|
m_compressionFormat(CompressionFormat::NOT_SET),
|
|||
|
|
m_compressionFormatHasBeenSet(false),
|
|||
|
|
m_encryptionConfigurationHasBeenSet(false),
|
|||
|
|
m_cloudWatchLoggingOptionsHasBeenSet(false)
|
|||
|
|
{
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
S3DestinationConfiguration::S3DestinationConfiguration(JsonView jsonValue) :
|
|||
|
|
m_roleARNHasBeenSet(false),
|
|||
|
|
m_bucketARNHasBeenSet(false),
|
|||
|
|
m_prefixHasBeenSet(false),
|
|||
|
|
m_errorOutputPrefixHasBeenSet(false),
|
|||
|
|
m_bufferingHintsHasBeenSet(false),
|
|||
|
|
m_compressionFormat(CompressionFormat::NOT_SET),
|
|||
|
|
m_compressionFormatHasBeenSet(false),
|
|||
|
|
m_encryptionConfigurationHasBeenSet(false),
|
|||
|
|
m_cloudWatchLoggingOptionsHasBeenSet(false)
|
|||
|
|
{
|
|||
|
|
*this = jsonValue;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
S3DestinationConfiguration& S3DestinationConfiguration::operator =(JsonView jsonValue)
|
|||
|
|
{
|
|||
|
|
if(jsonValue.ValueExists("RoleARN"))
|
|||
|
|
{
|
|||
|
|
m_roleARN = jsonValue.GetString("RoleARN");
|
|||
|
|
|
|||
|
|
m_roleARNHasBeenSet = true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(jsonValue.ValueExists("BucketARN"))
|
|||
|
|
{
|
|||
|
|
m_bucketARN = jsonValue.GetString("BucketARN");
|
|||
|
|
|
|||
|
|
m_bucketARNHasBeenSet = true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(jsonValue.ValueExists("Prefix"))
|
|||
|
|
{
|
|||
|
|
m_prefix = jsonValue.GetString("Prefix");
|
|||
|
|
|
|||
|
|
m_prefixHasBeenSet = true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(jsonValue.ValueExists("ErrorOutputPrefix"))
|
|||
|
|
{
|
|||
|
|
m_errorOutputPrefix = jsonValue.GetString("ErrorOutputPrefix");
|
|||
|
|
|
|||
|
|
m_errorOutputPrefixHasBeenSet = true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(jsonValue.ValueExists("BufferingHints"))
|
|||
|
|
{
|
|||
|
|
m_bufferingHints = jsonValue.GetObject("BufferingHints");
|
|||
|
|
|
|||
|
|
m_bufferingHintsHasBeenSet = true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(jsonValue.ValueExists("CompressionFormat"))
|
|||
|
|
{
|
|||
|
|
m_compressionFormat = CompressionFormatMapper::GetCompressionFormatForName(jsonValue.GetString("CompressionFormat"));
|
|||
|
|
|
|||
|
|
m_compressionFormatHasBeenSet = true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(jsonValue.ValueExists("EncryptionConfiguration"))
|
|||
|
|
{
|
|||
|
|
m_encryptionConfiguration = jsonValue.GetObject("EncryptionConfiguration");
|
|||
|
|
|
|||
|
|
m_encryptionConfigurationHasBeenSet = true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(jsonValue.ValueExists("CloudWatchLoggingOptions"))
|
|||
|
|
{
|
|||
|
|
m_cloudWatchLoggingOptions = jsonValue.GetObject("CloudWatchLoggingOptions");
|
|||
|
|
|
|||
|
|
m_cloudWatchLoggingOptionsHasBeenSet = true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return *this;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
JsonValue S3DestinationConfiguration::Jsonize() const
|
|||
|
|
{
|
|||
|
|
JsonValue payload;
|
|||
|
|
|
|||
|
|
if(m_roleARNHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithString("RoleARN", m_roleARN);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(m_bucketARNHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithString("BucketARN", m_bucketARN);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(m_prefixHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithString("Prefix", m_prefix);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(m_errorOutputPrefixHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithString("ErrorOutputPrefix", m_errorOutputPrefix);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(m_bufferingHintsHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithObject("BufferingHints", m_bufferingHints.Jsonize());
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(m_compressionFormatHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithString("CompressionFormat", CompressionFormatMapper::GetNameForCompressionFormat(m_compressionFormat));
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(m_encryptionConfigurationHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithObject("EncryptionConfiguration", m_encryptionConfiguration.Jsonize());
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(m_cloudWatchLoggingOptionsHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithObject("CloudWatchLoggingOptions", m_cloudWatchLoggingOptions.Jsonize());
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return payload;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
} // namespace Model
|
|||
|
|
} // namespace Firehose
|
|||
|
|
} // namespace Aws
|