98 lines
1.8 KiB
C++
98 lines
1.8 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/ivs/model/StreamKeySummary.h>
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|
|
|
#include <utility>
|
|
|
|
using namespace Aws::Utils::Json;
|
|
using namespace Aws::Utils;
|
|
|
|
namespace Aws
|
|
{
|
|
namespace IVS
|
|
{
|
|
namespace Model
|
|
{
|
|
|
|
StreamKeySummary::StreamKeySummary() :
|
|
m_arnHasBeenSet(false),
|
|
m_channelArnHasBeenSet(false),
|
|
m_tagsHasBeenSet(false)
|
|
{
|
|
}
|
|
|
|
StreamKeySummary::StreamKeySummary(JsonView jsonValue) :
|
|
m_arnHasBeenSet(false),
|
|
m_channelArnHasBeenSet(false),
|
|
m_tagsHasBeenSet(false)
|
|
{
|
|
*this = jsonValue;
|
|
}
|
|
|
|
StreamKeySummary& StreamKeySummary::operator =(JsonView jsonValue)
|
|
{
|
|
if(jsonValue.ValueExists("arn"))
|
|
{
|
|
m_arn = jsonValue.GetString("arn");
|
|
|
|
m_arnHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("channelArn"))
|
|
{
|
|
m_channelArn = jsonValue.GetString("channelArn");
|
|
|
|
m_channelArnHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("tags"))
|
|
{
|
|
Aws::Map<Aws::String, JsonView> tagsJsonMap = jsonValue.GetObject("tags").GetAllObjects();
|
|
for(auto& tagsItem : tagsJsonMap)
|
|
{
|
|
m_tags[tagsItem.first] = tagsItem.second.AsString();
|
|
}
|
|
m_tagsHasBeenSet = true;
|
|
}
|
|
|
|
return *this;
|
|
}
|
|
|
|
JsonValue StreamKeySummary::Jsonize() const
|
|
{
|
|
JsonValue payload;
|
|
|
|
if(m_arnHasBeenSet)
|
|
{
|
|
payload.WithString("arn", m_arn);
|
|
|
|
}
|
|
|
|
if(m_channelArnHasBeenSet)
|
|
{
|
|
payload.WithString("channelArn", m_channelArn);
|
|
|
|
}
|
|
|
|
if(m_tagsHasBeenSet)
|
|
{
|
|
JsonValue tagsJsonMap;
|
|
for(auto& tagsItem : m_tags)
|
|
{
|
|
tagsJsonMap.WithString(tagsItem.first, tagsItem.second);
|
|
}
|
|
payload.WithObject("tags", std::move(tagsJsonMap));
|
|
|
|
}
|
|
|
|
return payload;
|
|
}
|
|
|
|
} // namespace Model
|
|
} // namespace IVS
|
|
} // namespace Aws
|