94 lines
2.1 KiB
C++
94 lines
2.1 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/sagemaker/model/NetworkConfig.h>
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|
|
|
#include <utility>
|
|
|
|
using namespace Aws::Utils::Json;
|
|
using namespace Aws::Utils;
|
|
|
|
namespace Aws
|
|
{
|
|
namespace SageMaker
|
|
{
|
|
namespace Model
|
|
{
|
|
|
|
NetworkConfig::NetworkConfig() :
|
|
m_enableInterContainerTrafficEncryption(false),
|
|
m_enableInterContainerTrafficEncryptionHasBeenSet(false),
|
|
m_enableNetworkIsolation(false),
|
|
m_enableNetworkIsolationHasBeenSet(false),
|
|
m_vpcConfigHasBeenSet(false)
|
|
{
|
|
}
|
|
|
|
NetworkConfig::NetworkConfig(JsonView jsonValue) :
|
|
m_enableInterContainerTrafficEncryption(false),
|
|
m_enableInterContainerTrafficEncryptionHasBeenSet(false),
|
|
m_enableNetworkIsolation(false),
|
|
m_enableNetworkIsolationHasBeenSet(false),
|
|
m_vpcConfigHasBeenSet(false)
|
|
{
|
|
*this = jsonValue;
|
|
}
|
|
|
|
NetworkConfig& NetworkConfig::operator =(JsonView jsonValue)
|
|
{
|
|
if(jsonValue.ValueExists("EnableInterContainerTrafficEncryption"))
|
|
{
|
|
m_enableInterContainerTrafficEncryption = jsonValue.GetBool("EnableInterContainerTrafficEncryption");
|
|
|
|
m_enableInterContainerTrafficEncryptionHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("EnableNetworkIsolation"))
|
|
{
|
|
m_enableNetworkIsolation = jsonValue.GetBool("EnableNetworkIsolation");
|
|
|
|
m_enableNetworkIsolationHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("VpcConfig"))
|
|
{
|
|
m_vpcConfig = jsonValue.GetObject("VpcConfig");
|
|
|
|
m_vpcConfigHasBeenSet = true;
|
|
}
|
|
|
|
return *this;
|
|
}
|
|
|
|
JsonValue NetworkConfig::Jsonize() const
|
|
{
|
|
JsonValue payload;
|
|
|
|
if(m_enableInterContainerTrafficEncryptionHasBeenSet)
|
|
{
|
|
payload.WithBool("EnableInterContainerTrafficEncryption", m_enableInterContainerTrafficEncryption);
|
|
|
|
}
|
|
|
|
if(m_enableNetworkIsolationHasBeenSet)
|
|
{
|
|
payload.WithBool("EnableNetworkIsolation", m_enableNetworkIsolation);
|
|
|
|
}
|
|
|
|
if(m_vpcConfigHasBeenSet)
|
|
{
|
|
payload.WithObject("VpcConfig", m_vpcConfig.Jsonize());
|
|
|
|
}
|
|
|
|
return payload;
|
|
}
|
|
|
|
} // namespace Model
|
|
} // namespace SageMaker
|
|
} // namespace Aws
|