This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
pxz-hos-client-cpp-module/support/aws-sdk-cpp-master/aws-cpp-sdk-application-autoscaling/source/model/PredefinedMetricSpecification.cpp

76 lines
1.7 KiB
C++
Raw Normal View History

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/application-autoscaling/model/PredefinedMetricSpecification.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace ApplicationAutoScaling
{
namespace Model
{
PredefinedMetricSpecification::PredefinedMetricSpecification() :
m_predefinedMetricType(MetricType::NOT_SET),
m_predefinedMetricTypeHasBeenSet(false),
m_resourceLabelHasBeenSet(false)
{
}
PredefinedMetricSpecification::PredefinedMetricSpecification(JsonView jsonValue) :
m_predefinedMetricType(MetricType::NOT_SET),
m_predefinedMetricTypeHasBeenSet(false),
m_resourceLabelHasBeenSet(false)
{
*this = jsonValue;
}
PredefinedMetricSpecification& PredefinedMetricSpecification::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("PredefinedMetricType"))
{
m_predefinedMetricType = MetricTypeMapper::GetMetricTypeForName(jsonValue.GetString("PredefinedMetricType"));
m_predefinedMetricTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("ResourceLabel"))
{
m_resourceLabel = jsonValue.GetString("ResourceLabel");
m_resourceLabelHasBeenSet = true;
}
return *this;
}
JsonValue PredefinedMetricSpecification::Jsonize() const
{
JsonValue payload;
if(m_predefinedMetricTypeHasBeenSet)
{
payload.WithString("PredefinedMetricType", MetricTypeMapper::GetNameForMetricType(m_predefinedMetricType));
}
if(m_resourceLabelHasBeenSet)
{
payload.WithString("ResourceLabel", m_resourceLabel);
}
return payload;
}
} // namespace Model
} // namespace ApplicationAutoScaling
} // namespace Aws