AWS SDK for C++

AWS SDK for C++ Version 1.11.683

Loading...
Searching...
No Matches
CreateResiliencyPolicyRequest.h
1
6#pragma once
7#include <aws/core/utils/UUID.h>
8#include <aws/core/utils/memory/stl/AWSMap.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/resiliencehub/ResilienceHubRequest.h>
11#include <aws/resiliencehub/ResilienceHub_EXPORTS.h>
12#include <aws/resiliencehub/model/DataLocationConstraint.h>
13#include <aws/resiliencehub/model/DisruptionType.h>
14#include <aws/resiliencehub/model/FailurePolicy.h>
15#include <aws/resiliencehub/model/ResiliencyPolicyTier.h>
16
17#include <utility>
18
19namespace Aws {
20namespace ResilienceHub {
21namespace Model {
22
26 public:
27 AWS_RESILIENCEHUB_API CreateResiliencyPolicyRequest() = default;
28
29 // Service request name is the Operation name which will send this request out,
30 // each operation should has unique request name, so that we can get operation's name from this request.
31 // Note: this is not true for response, multiple operations may have the same response name,
32 // so we can not get operation's name from response.
33 inline virtual const char* GetServiceRequestName() const override { return "CreateResiliencyPolicy"; }
34
35 AWS_RESILIENCEHUB_API Aws::String SerializePayload() const override;
36
38
43 inline const Aws::String& GetClientToken() const { return m_clientToken; }
44 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
45 template <typename ClientTokenT = Aws::String>
46 void SetClientToken(ClientTokenT&& value) {
47 m_clientTokenHasBeenSet = true;
48 m_clientToken = std::forward<ClientTokenT>(value);
49 }
50 template <typename ClientTokenT = Aws::String>
52 SetClientToken(std::forward<ClientTokenT>(value));
53 return *this;
54 }
56
58
62 inline DataLocationConstraint GetDataLocationConstraint() const { return m_dataLocationConstraint; }
63 inline bool DataLocationConstraintHasBeenSet() const { return m_dataLocationConstraintHasBeenSet; }
65 m_dataLocationConstraintHasBeenSet = true;
66 m_dataLocationConstraint = value;
67 }
70 return *this;
71 }
73
75
79 inline const Aws::Map<DisruptionType, FailurePolicy>& GetPolicy() const { return m_policy; }
80 inline bool PolicyHasBeenSet() const { return m_policyHasBeenSet; }
81 template <typename PolicyT = Aws::Map<DisruptionType, FailurePolicy>>
82 void SetPolicy(PolicyT&& value) {
83 m_policyHasBeenSet = true;
84 m_policy = std::forward<PolicyT>(value);
85 }
86 template <typename PolicyT = Aws::Map<DisruptionType, FailurePolicy>>
88 SetPolicy(std::forward<PolicyT>(value));
89 return *this;
90 }
92 m_policyHasBeenSet = true;
93 m_policy.emplace(key, value);
94 return *this;
95 }
97
99
102 inline const Aws::String& GetPolicyDescription() const { return m_policyDescription; }
103 inline bool PolicyDescriptionHasBeenSet() const { return m_policyDescriptionHasBeenSet; }
104 template <typename PolicyDescriptionT = Aws::String>
105 void SetPolicyDescription(PolicyDescriptionT&& value) {
106 m_policyDescriptionHasBeenSet = true;
107 m_policyDescription = std::forward<PolicyDescriptionT>(value);
108 }
109 template <typename PolicyDescriptionT = Aws::String>
111 SetPolicyDescription(std::forward<PolicyDescriptionT>(value));
112 return *this;
113 }
115
117
120 inline const Aws::String& GetPolicyName() const { return m_policyName; }
121 inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; }
122 template <typename PolicyNameT = Aws::String>
123 void SetPolicyName(PolicyNameT&& value) {
124 m_policyNameHasBeenSet = true;
125 m_policyName = std::forward<PolicyNameT>(value);
126 }
127 template <typename PolicyNameT = Aws::String>
129 SetPolicyName(std::forward<PolicyNameT>(value));
130 return *this;
131 }
133
135
139 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
140 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
141 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
142 void SetTags(TagsT&& value) {
143 m_tagsHasBeenSet = true;
144 m_tags = std::forward<TagsT>(value);
145 }
146 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
148 SetTags(std::forward<TagsT>(value));
149 return *this;
150 }
151 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
152 CreateResiliencyPolicyRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
153 m_tagsHasBeenSet = true;
154 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
155 return *this;
156 }
158
160
164 inline ResiliencyPolicyTier GetTier() const { return m_tier; }
165 inline bool TierHasBeenSet() const { return m_tierHasBeenSet; }
166 inline void SetTier(ResiliencyPolicyTier value) {
167 m_tierHasBeenSet = true;
168 m_tier = value;
169 }
171 SetTier(value);
172 return *this;
173 }
175 private:
177 bool m_clientTokenHasBeenSet = true;
178
180 bool m_dataLocationConstraintHasBeenSet = false;
181
183 bool m_policyHasBeenSet = false;
184
185 Aws::String m_policyDescription;
186 bool m_policyDescriptionHasBeenSet = false;
187
188 Aws::String m_policyName;
189 bool m_policyNameHasBeenSet = false;
190
192 bool m_tagsHasBeenSet = false;
193
195 bool m_tierHasBeenSet = false;
196};
197
198} // namespace Model
199} // namespace ResilienceHub
200} // namespace Aws
const Aws::Map< DisruptionType, FailurePolicy > & GetPolicy() const
CreateResiliencyPolicyRequest & WithClientToken(ClientTokenT &&value)
CreateResiliencyPolicyRequest & AddPolicy(DisruptionType key, FailurePolicy value)
AWS_RESILIENCEHUB_API CreateResiliencyPolicyRequest()=default
const Aws::Map< Aws::String, Aws::String > & GetTags() const
CreateResiliencyPolicyRequest & WithPolicy(PolicyT &&value)
CreateResiliencyPolicyRequest & AddTags(TagsKeyT &&key, TagsValueT &&value)
CreateResiliencyPolicyRequest & WithTier(ResiliencyPolicyTier value)
CreateResiliencyPolicyRequest & WithPolicyName(PolicyNameT &&value)
AWS_RESILIENCEHUB_API Aws::String SerializePayload() const override
CreateResiliencyPolicyRequest & WithDataLocationConstraint(DataLocationConstraint value)
CreateResiliencyPolicyRequest & WithPolicyDescription(PolicyDescriptionT &&value)
static Aws::Utils::UUID PseudoRandomUUID()
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String