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

165 lines
5.2 KiB
C++

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/autoscaling-plans/AutoScalingPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/autoscaling-plans/model/PolicyType.h>
#include <aws/autoscaling-plans/model/TargetTrackingConfiguration.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace AutoScalingPlans
{
namespace Model
{
/**
* <p>Represents a scaling policy.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/autoscaling-plans-2018-01-06/ScalingPolicy">AWS
* API Reference</a></p>
*/
class AWS_AUTOSCALINGPLANS_API ScalingPolicy
{
public:
ScalingPolicy();
ScalingPolicy(Aws::Utils::Json::JsonView jsonValue);
ScalingPolicy& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The name of the scaling policy.</p>
*/
inline const Aws::String& GetPolicyName() const{ return m_policyName; }
/**
* <p>The name of the scaling policy.</p>
*/
inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; }
/**
* <p>The name of the scaling policy.</p>
*/
inline void SetPolicyName(const Aws::String& value) { m_policyNameHasBeenSet = true; m_policyName = value; }
/**
* <p>The name of the scaling policy.</p>
*/
inline void SetPolicyName(Aws::String&& value) { m_policyNameHasBeenSet = true; m_policyName = std::move(value); }
/**
* <p>The name of the scaling policy.</p>
*/
inline void SetPolicyName(const char* value) { m_policyNameHasBeenSet = true; m_policyName.assign(value); }
/**
* <p>The name of the scaling policy.</p>
*/
inline ScalingPolicy& WithPolicyName(const Aws::String& value) { SetPolicyName(value); return *this;}
/**
* <p>The name of the scaling policy.</p>
*/
inline ScalingPolicy& WithPolicyName(Aws::String&& value) { SetPolicyName(std::move(value)); return *this;}
/**
* <p>The name of the scaling policy.</p>
*/
inline ScalingPolicy& WithPolicyName(const char* value) { SetPolicyName(value); return *this;}
/**
* <p>The type of scaling policy.</p>
*/
inline const PolicyType& GetPolicyType() const{ return m_policyType; }
/**
* <p>The type of scaling policy.</p>
*/
inline bool PolicyTypeHasBeenSet() const { return m_policyTypeHasBeenSet; }
/**
* <p>The type of scaling policy.</p>
*/
inline void SetPolicyType(const PolicyType& value) { m_policyTypeHasBeenSet = true; m_policyType = value; }
/**
* <p>The type of scaling policy.</p>
*/
inline void SetPolicyType(PolicyType&& value) { m_policyTypeHasBeenSet = true; m_policyType = std::move(value); }
/**
* <p>The type of scaling policy.</p>
*/
inline ScalingPolicy& WithPolicyType(const PolicyType& value) { SetPolicyType(value); return *this;}
/**
* <p>The type of scaling policy.</p>
*/
inline ScalingPolicy& WithPolicyType(PolicyType&& value) { SetPolicyType(std::move(value)); return *this;}
/**
* <p>The target tracking scaling policy. Includes support for predefined or
* customized metrics.</p>
*/
inline const TargetTrackingConfiguration& GetTargetTrackingConfiguration() const{ return m_targetTrackingConfiguration; }
/**
* <p>The target tracking scaling policy. Includes support for predefined or
* customized metrics.</p>
*/
inline bool TargetTrackingConfigurationHasBeenSet() const { return m_targetTrackingConfigurationHasBeenSet; }
/**
* <p>The target tracking scaling policy. Includes support for predefined or
* customized metrics.</p>
*/
inline void SetTargetTrackingConfiguration(const TargetTrackingConfiguration& value) { m_targetTrackingConfigurationHasBeenSet = true; m_targetTrackingConfiguration = value; }
/**
* <p>The target tracking scaling policy. Includes support for predefined or
* customized metrics.</p>
*/
inline void SetTargetTrackingConfiguration(TargetTrackingConfiguration&& value) { m_targetTrackingConfigurationHasBeenSet = true; m_targetTrackingConfiguration = std::move(value); }
/**
* <p>The target tracking scaling policy. Includes support for predefined or
* customized metrics.</p>
*/
inline ScalingPolicy& WithTargetTrackingConfiguration(const TargetTrackingConfiguration& value) { SetTargetTrackingConfiguration(value); return *this;}
/**
* <p>The target tracking scaling policy. Includes support for predefined or
* customized metrics.</p>
*/
inline ScalingPolicy& WithTargetTrackingConfiguration(TargetTrackingConfiguration&& value) { SetTargetTrackingConfiguration(std::move(value)); return *this;}
private:
Aws::String m_policyName;
bool m_policyNameHasBeenSet;
PolicyType m_policyType;
bool m_policyTypeHasBeenSet;
TargetTrackingConfiguration m_targetTrackingConfiguration;
bool m_targetTrackingConfigurationHasBeenSet;
};
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws