/** * 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 { ScalableTargetAction::ScalableTargetAction() : m_minCapacity(0), m_minCapacityHasBeenSet(false), m_maxCapacity(0), m_maxCapacityHasBeenSet(false) { } ScalableTargetAction::ScalableTargetAction(JsonView jsonValue) : m_minCapacity(0), m_minCapacityHasBeenSet(false), m_maxCapacity(0), m_maxCapacityHasBeenSet(false) { *this = jsonValue; } ScalableTargetAction& ScalableTargetAction::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("MinCapacity")) { m_minCapacity = jsonValue.GetInteger("MinCapacity"); m_minCapacityHasBeenSet = true; } if(jsonValue.ValueExists("MaxCapacity")) { m_maxCapacity = jsonValue.GetInteger("MaxCapacity"); m_maxCapacityHasBeenSet = true; } return *this; } JsonValue ScalableTargetAction::Jsonize() const { JsonValue payload; if(m_minCapacityHasBeenSet) { payload.WithInteger("MinCapacity", m_minCapacity); } if(m_maxCapacityHasBeenSet) { payload.WithInteger("MaxCapacity", m_maxCapacity); } return payload; } } // namespace Model } // namespace ApplicationAutoScaling } // namespace Aws