/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include 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