120 lines
2.2 KiB
C++
120 lines
2.2 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/alexaforbusiness/model/GatewaySummary.h>
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|
|
|
#include <utility>
|
|
|
|
using namespace Aws::Utils::Json;
|
|
using namespace Aws::Utils;
|
|
|
|
namespace Aws
|
|
{
|
|
namespace AlexaForBusiness
|
|
{
|
|
namespace Model
|
|
{
|
|
|
|
GatewaySummary::GatewaySummary() :
|
|
m_arnHasBeenSet(false),
|
|
m_nameHasBeenSet(false),
|
|
m_descriptionHasBeenSet(false),
|
|
m_gatewayGroupArnHasBeenSet(false),
|
|
m_softwareVersionHasBeenSet(false)
|
|
{
|
|
}
|
|
|
|
GatewaySummary::GatewaySummary(JsonView jsonValue) :
|
|
m_arnHasBeenSet(false),
|
|
m_nameHasBeenSet(false),
|
|
m_descriptionHasBeenSet(false),
|
|
m_gatewayGroupArnHasBeenSet(false),
|
|
m_softwareVersionHasBeenSet(false)
|
|
{
|
|
*this = jsonValue;
|
|
}
|
|
|
|
GatewaySummary& GatewaySummary::operator =(JsonView jsonValue)
|
|
{
|
|
if(jsonValue.ValueExists("Arn"))
|
|
{
|
|
m_arn = jsonValue.GetString("Arn");
|
|
|
|
m_arnHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("Name"))
|
|
{
|
|
m_name = jsonValue.GetString("Name");
|
|
|
|
m_nameHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("Description"))
|
|
{
|
|
m_description = jsonValue.GetString("Description");
|
|
|
|
m_descriptionHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("GatewayGroupArn"))
|
|
{
|
|
m_gatewayGroupArn = jsonValue.GetString("GatewayGroupArn");
|
|
|
|
m_gatewayGroupArnHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("SoftwareVersion"))
|
|
{
|
|
m_softwareVersion = jsonValue.GetString("SoftwareVersion");
|
|
|
|
m_softwareVersionHasBeenSet = true;
|
|
}
|
|
|
|
return *this;
|
|
}
|
|
|
|
JsonValue GatewaySummary::Jsonize() const
|
|
{
|
|
JsonValue payload;
|
|
|
|
if(m_arnHasBeenSet)
|
|
{
|
|
payload.WithString("Arn", m_arn);
|
|
|
|
}
|
|
|
|
if(m_nameHasBeenSet)
|
|
{
|
|
payload.WithString("Name", m_name);
|
|
|
|
}
|
|
|
|
if(m_descriptionHasBeenSet)
|
|
{
|
|
payload.WithString("Description", m_description);
|
|
|
|
}
|
|
|
|
if(m_gatewayGroupArnHasBeenSet)
|
|
{
|
|
payload.WithString("GatewayGroupArn", m_gatewayGroupArn);
|
|
|
|
}
|
|
|
|
if(m_softwareVersionHasBeenSet)
|
|
{
|
|
payload.WithString("SoftwareVersion", m_softwareVersion);
|
|
|
|
}
|
|
|
|
return payload;
|
|
}
|
|
|
|
} // namespace Model
|
|
} // namespace AlexaForBusiness
|
|
} // namespace Aws
|