This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
pxz-hos-client-cpp-module/support/aws-sdk-cpp-master/aws-cpp-sdk-frauddetector/source/model/Variable.cpp

182 lines
3.6 KiB
C++

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/frauddetector/model/Variable.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace FraudDetector
{
namespace Model
{
Variable::Variable() :
m_nameHasBeenSet(false),
m_dataType(DataType::NOT_SET),
m_dataTypeHasBeenSet(false),
m_dataSource(DataSource::NOT_SET),
m_dataSourceHasBeenSet(false),
m_defaultValueHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_variableTypeHasBeenSet(false),
m_lastUpdatedTimeHasBeenSet(false),
m_createdTimeHasBeenSet(false),
m_arnHasBeenSet(false)
{
}
Variable::Variable(JsonView jsonValue) :
m_nameHasBeenSet(false),
m_dataType(DataType::NOT_SET),
m_dataTypeHasBeenSet(false),
m_dataSource(DataSource::NOT_SET),
m_dataSourceHasBeenSet(false),
m_defaultValueHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_variableTypeHasBeenSet(false),
m_lastUpdatedTimeHasBeenSet(false),
m_createdTimeHasBeenSet(false),
m_arnHasBeenSet(false)
{
*this = jsonValue;
}
Variable& Variable::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("name"))
{
m_name = jsonValue.GetString("name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("dataType"))
{
m_dataType = DataTypeMapper::GetDataTypeForName(jsonValue.GetString("dataType"));
m_dataTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("dataSource"))
{
m_dataSource = DataSourceMapper::GetDataSourceForName(jsonValue.GetString("dataSource"));
m_dataSourceHasBeenSet = true;
}
if(jsonValue.ValueExists("defaultValue"))
{
m_defaultValue = jsonValue.GetString("defaultValue");
m_defaultValueHasBeenSet = true;
}
if(jsonValue.ValueExists("description"))
{
m_description = jsonValue.GetString("description");
m_descriptionHasBeenSet = true;
}
if(jsonValue.ValueExists("variableType"))
{
m_variableType = jsonValue.GetString("variableType");
m_variableTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("lastUpdatedTime"))
{
m_lastUpdatedTime = jsonValue.GetString("lastUpdatedTime");
m_lastUpdatedTimeHasBeenSet = true;
}
if(jsonValue.ValueExists("createdTime"))
{
m_createdTime = jsonValue.GetString("createdTime");
m_createdTimeHasBeenSet = true;
}
if(jsonValue.ValueExists("arn"))
{
m_arn = jsonValue.GetString("arn");
m_arnHasBeenSet = true;
}
return *this;
}
JsonValue Variable::Jsonize() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("name", m_name);
}
if(m_dataTypeHasBeenSet)
{
payload.WithString("dataType", DataTypeMapper::GetNameForDataType(m_dataType));
}
if(m_dataSourceHasBeenSet)
{
payload.WithString("dataSource", DataSourceMapper::GetNameForDataSource(m_dataSource));
}
if(m_defaultValueHasBeenSet)
{
payload.WithString("defaultValue", m_defaultValue);
}
if(m_descriptionHasBeenSet)
{
payload.WithString("description", m_description);
}
if(m_variableTypeHasBeenSet)
{
payload.WithString("variableType", m_variableType);
}
if(m_lastUpdatedTimeHasBeenSet)
{
payload.WithString("lastUpdatedTime", m_lastUpdatedTime);
}
if(m_createdTimeHasBeenSet)
{
payload.WithString("createdTime", m_createdTime);
}
if(m_arnHasBeenSet)
{
payload.WithString("arn", m_arn);
}
return payload;
}
} // namespace Model
} // namespace FraudDetector
} // namespace Aws