75 lines
1.3 KiB
C++
75 lines
1.3 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/service-quotas/model/ServiceInfo.h>
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|
|
|
#include <utility>
|
|
|
|
using namespace Aws::Utils::Json;
|
|
using namespace Aws::Utils;
|
|
|
|
namespace Aws
|
|
{
|
|
namespace ServiceQuotas
|
|
{
|
|
namespace Model
|
|
{
|
|
|
|
ServiceInfo::ServiceInfo() :
|
|
m_serviceCodeHasBeenSet(false),
|
|
m_serviceNameHasBeenSet(false)
|
|
{
|
|
}
|
|
|
|
ServiceInfo::ServiceInfo(JsonView jsonValue) :
|
|
m_serviceCodeHasBeenSet(false),
|
|
m_serviceNameHasBeenSet(false)
|
|
{
|
|
*this = jsonValue;
|
|
}
|
|
|
|
ServiceInfo& ServiceInfo::operator =(JsonView jsonValue)
|
|
{
|
|
if(jsonValue.ValueExists("ServiceCode"))
|
|
{
|
|
m_serviceCode = jsonValue.GetString("ServiceCode");
|
|
|
|
m_serviceCodeHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("ServiceName"))
|
|
{
|
|
m_serviceName = jsonValue.GetString("ServiceName");
|
|
|
|
m_serviceNameHasBeenSet = true;
|
|
}
|
|
|
|
return *this;
|
|
}
|
|
|
|
JsonValue ServiceInfo::Jsonize() const
|
|
{
|
|
JsonValue payload;
|
|
|
|
if(m_serviceCodeHasBeenSet)
|
|
{
|
|
payload.WithString("ServiceCode", m_serviceCode);
|
|
|
|
}
|
|
|
|
if(m_serviceNameHasBeenSet)
|
|
{
|
|
payload.WithString("ServiceName", m_serviceName);
|
|
|
|
}
|
|
|
|
return payload;
|
|
}
|
|
|
|
} // namespace Model
|
|
} // namespace ServiceQuotas
|
|
} // namespace Aws
|