AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
TrafficRoutingConfig.h
1
6#pragma once
7#include <aws/codedeploy/CodeDeploy_EXPORTS.h>
8#include <aws/codedeploy/model/TimeBasedCanary.h>
9#include <aws/codedeploy/model/TimeBasedLinear.h>
10#include <aws/codedeploy/model/TrafficRoutingType.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Json {
17class JsonValue;
18class JsonView;
19} // namespace Json
20} // namespace Utils
21namespace CodeDeploy {
22namespace Model {
23
33 public:
34 AWS_CODEDEPLOY_API TrafficRoutingConfig() = default;
35 AWS_CODEDEPLOY_API TrafficRoutingConfig(Aws::Utils::Json::JsonView jsonValue);
37 AWS_CODEDEPLOY_API Aws::Utils::Json::JsonValue Jsonize() const;
38
40
44 inline TrafficRoutingType GetType() const { return m_type; }
45 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
46 inline void SetType(TrafficRoutingType value) {
47 m_typeHasBeenSet = true;
48 m_type = value;
49 }
51 SetType(value);
52 return *this;
53 }
55
57
63 inline const TimeBasedCanary& GetTimeBasedCanary() const { return m_timeBasedCanary; }
64 inline bool TimeBasedCanaryHasBeenSet() const { return m_timeBasedCanaryHasBeenSet; }
65 template <typename TimeBasedCanaryT = TimeBasedCanary>
66 void SetTimeBasedCanary(TimeBasedCanaryT&& value) {
67 m_timeBasedCanaryHasBeenSet = true;
68 m_timeBasedCanary = std::forward<TimeBasedCanaryT>(value);
69 }
70 template <typename TimeBasedCanaryT = TimeBasedCanary>
71 TrafficRoutingConfig& WithTimeBasedCanary(TimeBasedCanaryT&& value) {
72 SetTimeBasedCanary(std::forward<TimeBasedCanaryT>(value));
73 return *this;
74 }
76
78
84 inline const TimeBasedLinear& GetTimeBasedLinear() const { return m_timeBasedLinear; }
85 inline bool TimeBasedLinearHasBeenSet() const { return m_timeBasedLinearHasBeenSet; }
86 template <typename TimeBasedLinearT = TimeBasedLinear>
87 void SetTimeBasedLinear(TimeBasedLinearT&& value) {
88 m_timeBasedLinearHasBeenSet = true;
89 m_timeBasedLinear = std::forward<TimeBasedLinearT>(value);
90 }
91 template <typename TimeBasedLinearT = TimeBasedLinear>
92 TrafficRoutingConfig& WithTimeBasedLinear(TimeBasedLinearT&& value) {
93 SetTimeBasedLinear(std::forward<TimeBasedLinearT>(value));
94 return *this;
95 }
97 private:
99
100 TimeBasedCanary m_timeBasedCanary;
101
102 TimeBasedLinear m_timeBasedLinear;
103 bool m_typeHasBeenSet = false;
104 bool m_timeBasedCanaryHasBeenSet = false;
105 bool m_timeBasedLinearHasBeenSet = false;
106};
107
108} // namespace Model
109} // namespace CodeDeploy
110} // namespace Aws
AWS_CODEDEPLOY_API TrafficRoutingConfig(Aws::Utils::Json::JsonView jsonValue)
void SetTimeBasedLinear(TimeBasedLinearT &&value)
AWS_CODEDEPLOY_API TrafficRoutingConfig & operator=(Aws::Utils::Json::JsonView jsonValue)
const TimeBasedCanary & GetTimeBasedCanary() const
const TimeBasedLinear & GetTimeBasedLinear() const
AWS_CODEDEPLOY_API Aws::Utils::Json::JsonValue Jsonize() const
TrafficRoutingConfig & WithTimeBasedLinear(TimeBasedLinearT &&value)
TrafficRoutingConfig & WithTimeBasedCanary(TimeBasedCanaryT &&value)
AWS_CODEDEPLOY_API TrafficRoutingConfig()=default
TrafficRoutingConfig & WithType(TrafficRoutingType value)
void SetTimeBasedCanary(TimeBasedCanaryT &&value)
Aws::Utils::Json::JsonValue JsonValue