75 lines
1.4 KiB
C++
75 lines
1.4 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/guardduty/model/DestinationProperties.h>
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|
|
|
#include <utility>
|
|
|
|
using namespace Aws::Utils::Json;
|
|
using namespace Aws::Utils;
|
|
|
|
namespace Aws
|
|
{
|
|
namespace GuardDuty
|
|
{
|
|
namespace Model
|
|
{
|
|
|
|
DestinationProperties::DestinationProperties() :
|
|
m_destinationArnHasBeenSet(false),
|
|
m_kmsKeyArnHasBeenSet(false)
|
|
{
|
|
}
|
|
|
|
DestinationProperties::DestinationProperties(JsonView jsonValue) :
|
|
m_destinationArnHasBeenSet(false),
|
|
m_kmsKeyArnHasBeenSet(false)
|
|
{
|
|
*this = jsonValue;
|
|
}
|
|
|
|
DestinationProperties& DestinationProperties::operator =(JsonView jsonValue)
|
|
{
|
|
if(jsonValue.ValueExists("destinationArn"))
|
|
{
|
|
m_destinationArn = jsonValue.GetString("destinationArn");
|
|
|
|
m_destinationArnHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("kmsKeyArn"))
|
|
{
|
|
m_kmsKeyArn = jsonValue.GetString("kmsKeyArn");
|
|
|
|
m_kmsKeyArnHasBeenSet = true;
|
|
}
|
|
|
|
return *this;
|
|
}
|
|
|
|
JsonValue DestinationProperties::Jsonize() const
|
|
{
|
|
JsonValue payload;
|
|
|
|
if(m_destinationArnHasBeenSet)
|
|
{
|
|
payload.WithString("destinationArn", m_destinationArn);
|
|
|
|
}
|
|
|
|
if(m_kmsKeyArnHasBeenSet)
|
|
{
|
|
payload.WithString("kmsKeyArn", m_kmsKeyArn);
|
|
|
|
}
|
|
|
|
return payload;
|
|
}
|
|
|
|
} // namespace Model
|
|
} // namespace GuardDuty
|
|
} // namespace Aws
|