135 lines
2.4 KiB
C++
135 lines
2.4 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/firehose/model/SchemaConfiguration.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
|
|
{
|
|
|
|
SchemaConfiguration::SchemaConfiguration() :
|
|
m_roleARNHasBeenSet(false),
|
|
m_catalogIdHasBeenSet(false),
|
|
m_databaseNameHasBeenSet(false),
|
|
m_tableNameHasBeenSet(false),
|
|
m_regionHasBeenSet(false),
|
|
m_versionIdHasBeenSet(false)
|
|
{
|
|
}
|
|
|
|
SchemaConfiguration::SchemaConfiguration(JsonView jsonValue) :
|
|
m_roleARNHasBeenSet(false),
|
|
m_catalogIdHasBeenSet(false),
|
|
m_databaseNameHasBeenSet(false),
|
|
m_tableNameHasBeenSet(false),
|
|
m_regionHasBeenSet(false),
|
|
m_versionIdHasBeenSet(false)
|
|
{
|
|
*this = jsonValue;
|
|
}
|
|
|
|
SchemaConfiguration& SchemaConfiguration::operator =(JsonView jsonValue)
|
|
{
|
|
if(jsonValue.ValueExists("RoleARN"))
|
|
{
|
|
m_roleARN = jsonValue.GetString("RoleARN");
|
|
|
|
m_roleARNHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("CatalogId"))
|
|
{
|
|
m_catalogId = jsonValue.GetString("CatalogId");
|
|
|
|
m_catalogIdHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("DatabaseName"))
|
|
{
|
|
m_databaseName = jsonValue.GetString("DatabaseName");
|
|
|
|
m_databaseNameHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("TableName"))
|
|
{
|
|
m_tableName = jsonValue.GetString("TableName");
|
|
|
|
m_tableNameHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("Region"))
|
|
{
|
|
m_region = jsonValue.GetString("Region");
|
|
|
|
m_regionHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("VersionId"))
|
|
{
|
|
m_versionId = jsonValue.GetString("VersionId");
|
|
|
|
m_versionIdHasBeenSet = true;
|
|
}
|
|
|
|
return *this;
|
|
}
|
|
|
|
JsonValue SchemaConfiguration::Jsonize() const
|
|
{
|
|
JsonValue payload;
|
|
|
|
if(m_roleARNHasBeenSet)
|
|
{
|
|
payload.WithString("RoleARN", m_roleARN);
|
|
|
|
}
|
|
|
|
if(m_catalogIdHasBeenSet)
|
|
{
|
|
payload.WithString("CatalogId", m_catalogId);
|
|
|
|
}
|
|
|
|
if(m_databaseNameHasBeenSet)
|
|
{
|
|
payload.WithString("DatabaseName", m_databaseName);
|
|
|
|
}
|
|
|
|
if(m_tableNameHasBeenSet)
|
|
{
|
|
payload.WithString("TableName", m_tableName);
|
|
|
|
}
|
|
|
|
if(m_regionHasBeenSet)
|
|
{
|
|
payload.WithString("Region", m_region);
|
|
|
|
}
|
|
|
|
if(m_versionIdHasBeenSet)
|
|
{
|
|
payload.WithString("VersionId", m_versionId);
|
|
|
|
}
|
|
|
|
return payload;
|
|
}
|
|
|
|
} // namespace Model
|
|
} // namespace Firehose
|
|
} // namespace Aws
|