1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/codedeploy/CodeDeploy_EXPORTS.h> 8 9 namespace Aws 10 { 11 namespace Utils 12 { 13 namespace Json 14 { 15 class JsonValue; 16 class JsonView; 17 } // namespace Json 18 } // namespace Utils 19 namespace CodeDeploy 20 { 21 namespace Model 22 { 23 24 /** 25 * <p>A configuration that shifts traffic from one version of a Lambda function or 26 * ECS task set to another in equal increments, with an equal number of minutes 27 * between each increment. The original and target Lambda function versions or ECS 28 * task sets are specified in the deployment's AppSpec file.</p><p><h3>See 29 * Also:</h3> <a 30 * href="http://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/TimeBasedLinear">AWS 31 * API Reference</a></p> 32 */ 33 class AWS_CODEDEPLOY_API TimeBasedLinear 34 { 35 public: 36 TimeBasedLinear(); 37 TimeBasedLinear(Aws::Utils::Json::JsonView jsonValue); 38 TimeBasedLinear& operator=(Aws::Utils::Json::JsonView jsonValue); 39 Aws::Utils::Json::JsonValue Jsonize() const; 40 41 42 /** 43 * <p>The percentage of traffic that is shifted at the start of each increment of a 44 * <code>TimeBasedLinear</code> deployment.</p> 45 */ GetLinearPercentage()46 inline int GetLinearPercentage() const{ return m_linearPercentage; } 47 48 /** 49 * <p>The percentage of traffic that is shifted at the start of each increment of a 50 * <code>TimeBasedLinear</code> deployment.</p> 51 */ LinearPercentageHasBeenSet()52 inline bool LinearPercentageHasBeenSet() const { return m_linearPercentageHasBeenSet; } 53 54 /** 55 * <p>The percentage of traffic that is shifted at the start of each increment of a 56 * <code>TimeBasedLinear</code> deployment.</p> 57 */ SetLinearPercentage(int value)58 inline void SetLinearPercentage(int value) { m_linearPercentageHasBeenSet = true; m_linearPercentage = value; } 59 60 /** 61 * <p>The percentage of traffic that is shifted at the start of each increment of a 62 * <code>TimeBasedLinear</code> deployment.</p> 63 */ WithLinearPercentage(int value)64 inline TimeBasedLinear& WithLinearPercentage(int value) { SetLinearPercentage(value); return *this;} 65 66 67 /** 68 * <p>The number of minutes between each incremental traffic shift of a 69 * <code>TimeBasedLinear</code> deployment.</p> 70 */ GetLinearInterval()71 inline int GetLinearInterval() const{ return m_linearInterval; } 72 73 /** 74 * <p>The number of minutes between each incremental traffic shift of a 75 * <code>TimeBasedLinear</code> deployment.</p> 76 */ LinearIntervalHasBeenSet()77 inline bool LinearIntervalHasBeenSet() const { return m_linearIntervalHasBeenSet; } 78 79 /** 80 * <p>The number of minutes between each incremental traffic shift of a 81 * <code>TimeBasedLinear</code> deployment.</p> 82 */ SetLinearInterval(int value)83 inline void SetLinearInterval(int value) { m_linearIntervalHasBeenSet = true; m_linearInterval = value; } 84 85 /** 86 * <p>The number of minutes between each incremental traffic shift of a 87 * <code>TimeBasedLinear</code> deployment.</p> 88 */ WithLinearInterval(int value)89 inline TimeBasedLinear& WithLinearInterval(int value) { SetLinearInterval(value); return *this;} 90 91 private: 92 93 int m_linearPercentage; 94 bool m_linearPercentageHasBeenSet; 95 96 int m_linearInterval; 97 bool m_linearIntervalHasBeenSet; 98 }; 99 100 } // namespace Model 101 } // namespace CodeDeploy 102 } // namespace Aws 103