90 lines
1.6 KiB
C++
90 lines
1.6 KiB
C++
|
|
/**
|
|||
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|||
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
#include <aws/mediapackage/model/S3Destination.h>
|
|||
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|||
|
|
|
|||
|
|
#include <utility>
|
|||
|
|
|
|||
|
|
using namespace Aws::Utils::Json;
|
|||
|
|
using namespace Aws::Utils;
|
|||
|
|
|
|||
|
|
namespace Aws
|
|||
|
|
{
|
|||
|
|
namespace MediaPackage
|
|||
|
|
{
|
|||
|
|
namespace Model
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
S3Destination::S3Destination() :
|
|||
|
|
m_bucketNameHasBeenSet(false),
|
|||
|
|
m_manifestKeyHasBeenSet(false),
|
|||
|
|
m_roleArnHasBeenSet(false)
|
|||
|
|
{
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
S3Destination::S3Destination(JsonView jsonValue) :
|
|||
|
|
m_bucketNameHasBeenSet(false),
|
|||
|
|
m_manifestKeyHasBeenSet(false),
|
|||
|
|
m_roleArnHasBeenSet(false)
|
|||
|
|
{
|
|||
|
|
*this = jsonValue;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
S3Destination& S3Destination::operator =(JsonView jsonValue)
|
|||
|
|
{
|
|||
|
|
if(jsonValue.ValueExists("bucketName"))
|
|||
|
|
{
|
|||
|
|
m_bucketName = jsonValue.GetString("bucketName");
|
|||
|
|
|
|||
|
|
m_bucketNameHasBeenSet = true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(jsonValue.ValueExists("manifestKey"))
|
|||
|
|
{
|
|||
|
|
m_manifestKey = jsonValue.GetString("manifestKey");
|
|||
|
|
|
|||
|
|
m_manifestKeyHasBeenSet = true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(jsonValue.ValueExists("roleArn"))
|
|||
|
|
{
|
|||
|
|
m_roleArn = jsonValue.GetString("roleArn");
|
|||
|
|
|
|||
|
|
m_roleArnHasBeenSet = true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return *this;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
JsonValue S3Destination::Jsonize() const
|
|||
|
|
{
|
|||
|
|
JsonValue payload;
|
|||
|
|
|
|||
|
|
if(m_bucketNameHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithString("bucketName", m_bucketName);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(m_manifestKeyHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithString("manifestKey", m_manifestKey);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(m_roleArnHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithString("roleArn", m_roleArn);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return payload;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
} // namespace Model
|
|||
|
|
} // namespace MediaPackage
|
|||
|
|
} // namespace Aws
|