182 lines
3.6 KiB
C++
182 lines
3.6 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/mediaconnect/model/UpdateEncryption.h>
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|
|
|
#include <utility>
|
|
|
|
using namespace Aws::Utils::Json;
|
|
using namespace Aws::Utils;
|
|
|
|
namespace Aws
|
|
{
|
|
namespace MediaConnect
|
|
{
|
|
namespace Model
|
|
{
|
|
|
|
UpdateEncryption::UpdateEncryption() :
|
|
m_algorithm(Algorithm::NOT_SET),
|
|
m_algorithmHasBeenSet(false),
|
|
m_constantInitializationVectorHasBeenSet(false),
|
|
m_deviceIdHasBeenSet(false),
|
|
m_keyType(KeyType::NOT_SET),
|
|
m_keyTypeHasBeenSet(false),
|
|
m_regionHasBeenSet(false),
|
|
m_resourceIdHasBeenSet(false),
|
|
m_roleArnHasBeenSet(false),
|
|
m_secretArnHasBeenSet(false),
|
|
m_urlHasBeenSet(false)
|
|
{
|
|
}
|
|
|
|
UpdateEncryption::UpdateEncryption(JsonView jsonValue) :
|
|
m_algorithm(Algorithm::NOT_SET),
|
|
m_algorithmHasBeenSet(false),
|
|
m_constantInitializationVectorHasBeenSet(false),
|
|
m_deviceIdHasBeenSet(false),
|
|
m_keyType(KeyType::NOT_SET),
|
|
m_keyTypeHasBeenSet(false),
|
|
m_regionHasBeenSet(false),
|
|
m_resourceIdHasBeenSet(false),
|
|
m_roleArnHasBeenSet(false),
|
|
m_secretArnHasBeenSet(false),
|
|
m_urlHasBeenSet(false)
|
|
{
|
|
*this = jsonValue;
|
|
}
|
|
|
|
UpdateEncryption& UpdateEncryption::operator =(JsonView jsonValue)
|
|
{
|
|
if(jsonValue.ValueExists("algorithm"))
|
|
{
|
|
m_algorithm = AlgorithmMapper::GetAlgorithmForName(jsonValue.GetString("algorithm"));
|
|
|
|
m_algorithmHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("constantInitializationVector"))
|
|
{
|
|
m_constantInitializationVector = jsonValue.GetString("constantInitializationVector");
|
|
|
|
m_constantInitializationVectorHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("deviceId"))
|
|
{
|
|
m_deviceId = jsonValue.GetString("deviceId");
|
|
|
|
m_deviceIdHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("keyType"))
|
|
{
|
|
m_keyType = KeyTypeMapper::GetKeyTypeForName(jsonValue.GetString("keyType"));
|
|
|
|
m_keyTypeHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("region"))
|
|
{
|
|
m_region = jsonValue.GetString("region");
|
|
|
|
m_regionHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("resourceId"))
|
|
{
|
|
m_resourceId = jsonValue.GetString("resourceId");
|
|
|
|
m_resourceIdHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("roleArn"))
|
|
{
|
|
m_roleArn = jsonValue.GetString("roleArn");
|
|
|
|
m_roleArnHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("secretArn"))
|
|
{
|
|
m_secretArn = jsonValue.GetString("secretArn");
|
|
|
|
m_secretArnHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("url"))
|
|
{
|
|
m_url = jsonValue.GetString("url");
|
|
|
|
m_urlHasBeenSet = true;
|
|
}
|
|
|
|
return *this;
|
|
}
|
|
|
|
JsonValue UpdateEncryption::Jsonize() const
|
|
{
|
|
JsonValue payload;
|
|
|
|
if(m_algorithmHasBeenSet)
|
|
{
|
|
payload.WithString("algorithm", AlgorithmMapper::GetNameForAlgorithm(m_algorithm));
|
|
}
|
|
|
|
if(m_constantInitializationVectorHasBeenSet)
|
|
{
|
|
payload.WithString("constantInitializationVector", m_constantInitializationVector);
|
|
|
|
}
|
|
|
|
if(m_deviceIdHasBeenSet)
|
|
{
|
|
payload.WithString("deviceId", m_deviceId);
|
|
|
|
}
|
|
|
|
if(m_keyTypeHasBeenSet)
|
|
{
|
|
payload.WithString("keyType", KeyTypeMapper::GetNameForKeyType(m_keyType));
|
|
}
|
|
|
|
if(m_regionHasBeenSet)
|
|
{
|
|
payload.WithString("region", m_region);
|
|
|
|
}
|
|
|
|
if(m_resourceIdHasBeenSet)
|
|
{
|
|
payload.WithString("resourceId", m_resourceId);
|
|
|
|
}
|
|
|
|
if(m_roleArnHasBeenSet)
|
|
{
|
|
payload.WithString("roleArn", m_roleArn);
|
|
|
|
}
|
|
|
|
if(m_secretArnHasBeenSet)
|
|
{
|
|
payload.WithString("secretArn", m_secretArn);
|
|
|
|
}
|
|
|
|
if(m_urlHasBeenSet)
|
|
{
|
|
payload.WithString("url", m_url);
|
|
|
|
}
|
|
|
|
return payload;
|
|
}
|
|
|
|
} // namespace Model
|
|
} // namespace MediaConnect
|
|
} // namespace Aws
|