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-securityhub/source/model/AwsCodeBuildProjectDetails.cpp

135 lines
2.5 KiB
C++

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/securityhub/model/AwsCodeBuildProjectDetails.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SecurityHub
{
namespace Model
{
AwsCodeBuildProjectDetails::AwsCodeBuildProjectDetails() :
m_encryptionKeyHasBeenSet(false),
m_environmentHasBeenSet(false),
m_nameHasBeenSet(false),
m_sourceHasBeenSet(false),
m_serviceRoleHasBeenSet(false),
m_vpcConfigHasBeenSet(false)
{
}
AwsCodeBuildProjectDetails::AwsCodeBuildProjectDetails(JsonView jsonValue) :
m_encryptionKeyHasBeenSet(false),
m_environmentHasBeenSet(false),
m_nameHasBeenSet(false),
m_sourceHasBeenSet(false),
m_serviceRoleHasBeenSet(false),
m_vpcConfigHasBeenSet(false)
{
*this = jsonValue;
}
AwsCodeBuildProjectDetails& AwsCodeBuildProjectDetails::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("EncryptionKey"))
{
m_encryptionKey = jsonValue.GetString("EncryptionKey");
m_encryptionKeyHasBeenSet = true;
}
if(jsonValue.ValueExists("Environment"))
{
m_environment = jsonValue.GetObject("Environment");
m_environmentHasBeenSet = true;
}
if(jsonValue.ValueExists("Name"))
{
m_name = jsonValue.GetString("Name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("Source"))
{
m_source = jsonValue.GetObject("Source");
m_sourceHasBeenSet = true;
}
if(jsonValue.ValueExists("ServiceRole"))
{
m_serviceRole = jsonValue.GetString("ServiceRole");
m_serviceRoleHasBeenSet = true;
}
if(jsonValue.ValueExists("VpcConfig"))
{
m_vpcConfig = jsonValue.GetObject("VpcConfig");
m_vpcConfigHasBeenSet = true;
}
return *this;
}
JsonValue AwsCodeBuildProjectDetails::Jsonize() const
{
JsonValue payload;
if(m_encryptionKeyHasBeenSet)
{
payload.WithString("EncryptionKey", m_encryptionKey);
}
if(m_environmentHasBeenSet)
{
payload.WithObject("Environment", m_environment.Jsonize());
}
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
if(m_sourceHasBeenSet)
{
payload.WithObject("Source", m_source.Jsonize());
}
if(m_serviceRoleHasBeenSet)
{
payload.WithString("ServiceRole", m_serviceRole);
}
if(m_vpcConfigHasBeenSet)
{
payload.WithObject("VpcConfig", m_vpcConfig.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace SecurityHub
} // namespace Aws