AWS SDK for C++

AWS SDK for C++ Version 1.11.942

Loading...
Searching...
No Matches
PlanViolation.h
1
6#pragma once
7#include <aws/amplifygen3/AmplifyGen3_EXPORTS.h>
8#include <aws/amplifygen3/model/AppLimit.h>
9#include <aws/amplifygen3/model/RegionLimit.h>
10#include <aws/amplifygen3/model/ViolationCode.h>
11#include <aws/amplifygen3/model/ViolationResource.h>
12#include <aws/core/utils/memory/stl/AWSString.h>
13#include <aws/core/utils/memory/stl/AWSVector.h>
14
15#include <utility>
16
17namespace Aws {
18namespace Utils {
19namespace Json {
20class JsonValue;
21class JsonView;
22} // namespace Json
23} // namespace Utils
24namespace AmplifyGen3 {
25namespace Model {
26
34 public:
35 AWS_AMPLIFYGEN3_API PlanViolation() = default;
36 AWS_AMPLIFYGEN3_API PlanViolation(Aws::Utils::Json::JsonView jsonValue);
37 AWS_AMPLIFYGEN3_API PlanViolation& operator=(Aws::Utils::Json::JsonView jsonValue);
38 AWS_AMPLIFYGEN3_API Aws::Utils::Json::JsonValue Jsonize() const;
39
41
44 inline ViolationCode GetCode() const { return m_code; }
45 inline bool CodeHasBeenSet() const { return m_codeHasBeenSet; }
46 inline void SetCode(ViolationCode value) {
47 m_codeHasBeenSet = true;
48 m_code = value;
49 }
51 SetCode(value);
52 return *this;
53 }
55
57
60 inline const Aws::String& GetMessage() const { return m_message; }
61 inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; }
62 template <typename MessageT = Aws::String>
63 void SetMessage(MessageT&& value) {
64 m_messageHasBeenSet = true;
65 m_message = std::forward<MessageT>(value);
66 }
67 template <typename MessageT = Aws::String>
68 PlanViolation& WithMessage(MessageT&& value) {
69 SetMessage(std::forward<MessageT>(value));
70 return *this;
71 }
73
75
79 inline const Aws::Vector<RegionLimit>& GetRegionLimits() const { return m_regionLimits; }
80 inline bool RegionLimitsHasBeenSet() const { return m_regionLimitsHasBeenSet; }
81 template <typename RegionLimitsT = Aws::Vector<RegionLimit>>
82 void SetRegionLimits(RegionLimitsT&& value) {
83 m_regionLimitsHasBeenSet = true;
84 m_regionLimits = std::forward<RegionLimitsT>(value);
85 }
86 template <typename RegionLimitsT = Aws::Vector<RegionLimit>>
87 PlanViolation& WithRegionLimits(RegionLimitsT&& value) {
88 SetRegionLimits(std::forward<RegionLimitsT>(value));
89 return *this;
90 }
91 template <typename RegionLimitsT = RegionLimit>
92 PlanViolation& AddRegionLimits(RegionLimitsT&& value) {
93 m_regionLimitsHasBeenSet = true;
94 m_regionLimits.emplace_back(std::forward<RegionLimitsT>(value));
95 return *this;
96 }
98
100
104 inline const Aws::Vector<AppLimit>& GetAppLimits() const { return m_appLimits; }
105 inline bool AppLimitsHasBeenSet() const { return m_appLimitsHasBeenSet; }
106 template <typename AppLimitsT = Aws::Vector<AppLimit>>
107 void SetAppLimits(AppLimitsT&& value) {
108 m_appLimitsHasBeenSet = true;
109 m_appLimits = std::forward<AppLimitsT>(value);
110 }
111 template <typename AppLimitsT = Aws::Vector<AppLimit>>
112 PlanViolation& WithAppLimits(AppLimitsT&& value) {
113 SetAppLimits(std::forward<AppLimitsT>(value));
114 return *this;
115 }
116 template <typename AppLimitsT = AppLimit>
117 PlanViolation& AddAppLimits(AppLimitsT&& value) {
118 m_appLimitsHasBeenSet = true;
119 m_appLimits.emplace_back(std::forward<AppLimitsT>(value));
120 return *this;
121 }
123
125
128 inline const Aws::Vector<ViolationResource>& GetResources() const { return m_resources; }
129 inline bool ResourcesHasBeenSet() const { return m_resourcesHasBeenSet; }
130 template <typename ResourcesT = Aws::Vector<ViolationResource>>
131 void SetResources(ResourcesT&& value) {
132 m_resourcesHasBeenSet = true;
133 m_resources = std::forward<ResourcesT>(value);
134 }
135 template <typename ResourcesT = Aws::Vector<ViolationResource>>
136 PlanViolation& WithResources(ResourcesT&& value) {
137 SetResources(std::forward<ResourcesT>(value));
138 return *this;
139 }
140 template <typename ResourcesT = ViolationResource>
141 PlanViolation& AddResources(ResourcesT&& value) {
142 m_resourcesHasBeenSet = true;
143 m_resources.emplace_back(std::forward<ResourcesT>(value));
144 return *this;
145 }
147 private:
149
150 Aws::String m_message;
151
152 Aws::Vector<RegionLimit> m_regionLimits;
153
154 Aws::Vector<AppLimit> m_appLimits;
155
157 bool m_codeHasBeenSet = false;
158 bool m_messageHasBeenSet = false;
159 bool m_regionLimitsHasBeenSet = false;
160 bool m_appLimitsHasBeenSet = false;
161 bool m_resourcesHasBeenSet = false;
162};
163
164} // namespace Model
165} // namespace AmplifyGen3
166} // namespace Aws
const Aws::Vector< ViolationResource > & GetResources() const
const Aws::Vector< AppLimit > & GetAppLimits() const
const Aws::String & GetMessage() const
PlanViolation & WithAppLimits(AppLimitsT &&value)
AWS_AMPLIFYGEN3_API PlanViolation(Aws::Utils::Json::JsonView jsonValue)
void SetResources(ResourcesT &&value)
PlanViolation & WithRegionLimits(RegionLimitsT &&value)
PlanViolation & AddResources(ResourcesT &&value)
PlanViolation & AddRegionLimits(RegionLimitsT &&value)
PlanViolation & WithMessage(MessageT &&value)
PlanViolation & AddAppLimits(AppLimitsT &&value)
const Aws::Vector< RegionLimit > & GetRegionLimits() const
PlanViolation & WithCode(ViolationCode value)
AWS_AMPLIFYGEN3_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_AMPLIFYGEN3_API PlanViolation()=default
void SetAppLimits(AppLimitsT &&value)
AWS_AMPLIFYGEN3_API PlanViolation & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetCode(ViolationCode value)
PlanViolation & WithResources(ResourcesT &&value)
void SetRegionLimits(RegionLimitsT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue