AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
Proposal.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSMap.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/managedblockchain/ManagedBlockchain_EXPORTS.h>
11#include <aws/managedblockchain/model/ProposalActions.h>
12#include <aws/managedblockchain/model/ProposalStatus.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Json {
19class JsonValue;
20class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace ManagedBlockchain {
24namespace Model {
25
32class Proposal {
33 public:
34 AWS_MANAGEDBLOCKCHAIN_API Proposal() = default;
35 AWS_MANAGEDBLOCKCHAIN_API Proposal(Aws::Utils::Json::JsonView jsonValue);
36 AWS_MANAGEDBLOCKCHAIN_API Proposal& operator=(Aws::Utils::Json::JsonView jsonValue);
37 AWS_MANAGEDBLOCKCHAIN_API Aws::Utils::Json::JsonValue Jsonize() const;
38
40
43 inline const Aws::String& GetProposalId() const { return m_proposalId; }
44 inline bool ProposalIdHasBeenSet() const { return m_proposalIdHasBeenSet; }
45 template <typename ProposalIdT = Aws::String>
46 void SetProposalId(ProposalIdT&& value) {
47 m_proposalIdHasBeenSet = true;
48 m_proposalId = std::forward<ProposalIdT>(value);
49 }
50 template <typename ProposalIdT = Aws::String>
51 Proposal& WithProposalId(ProposalIdT&& value) {
52 SetProposalId(std::forward<ProposalIdT>(value));
53 return *this;
54 }
56
58
61 inline const Aws::String& GetNetworkId() const { return m_networkId; }
62 inline bool NetworkIdHasBeenSet() const { return m_networkIdHasBeenSet; }
63 template <typename NetworkIdT = Aws::String>
64 void SetNetworkId(NetworkIdT&& value) {
65 m_networkIdHasBeenSet = true;
66 m_networkId = std::forward<NetworkIdT>(value);
67 }
68 template <typename NetworkIdT = Aws::String>
69 Proposal& WithNetworkId(NetworkIdT&& value) {
70 SetNetworkId(std::forward<NetworkIdT>(value));
71 return *this;
72 }
74
76
79 inline const Aws::String& GetDescription() const { return m_description; }
80 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
81 template <typename DescriptionT = Aws::String>
82 void SetDescription(DescriptionT&& value) {
83 m_descriptionHasBeenSet = true;
84 m_description = std::forward<DescriptionT>(value);
85 }
86 template <typename DescriptionT = Aws::String>
87 Proposal& WithDescription(DescriptionT&& value) {
88 SetDescription(std::forward<DescriptionT>(value));
89 return *this;
90 }
92
94
98 inline const ProposalActions& GetActions() const { return m_actions; }
99 inline bool ActionsHasBeenSet() const { return m_actionsHasBeenSet; }
100 template <typename ActionsT = ProposalActions>
101 void SetActions(ActionsT&& value) {
102 m_actionsHasBeenSet = true;
103 m_actions = std::forward<ActionsT>(value);
104 }
105 template <typename ActionsT = ProposalActions>
106 Proposal& WithActions(ActionsT&& value) {
107 SetActions(std::forward<ActionsT>(value));
108 return *this;
109 }
111
113
116 inline const Aws::String& GetProposedByMemberId() const { return m_proposedByMemberId; }
117 inline bool ProposedByMemberIdHasBeenSet() const { return m_proposedByMemberIdHasBeenSet; }
118 template <typename ProposedByMemberIdT = Aws::String>
119 void SetProposedByMemberId(ProposedByMemberIdT&& value) {
120 m_proposedByMemberIdHasBeenSet = true;
121 m_proposedByMemberId = std::forward<ProposedByMemberIdT>(value);
122 }
123 template <typename ProposedByMemberIdT = Aws::String>
124 Proposal& WithProposedByMemberId(ProposedByMemberIdT&& value) {
125 SetProposedByMemberId(std::forward<ProposedByMemberIdT>(value));
126 return *this;
127 }
129
131
134 inline const Aws::String& GetProposedByMemberName() const { return m_proposedByMemberName; }
135 inline bool ProposedByMemberNameHasBeenSet() const { return m_proposedByMemberNameHasBeenSet; }
136 template <typename ProposedByMemberNameT = Aws::String>
137 void SetProposedByMemberName(ProposedByMemberNameT&& value) {
138 m_proposedByMemberNameHasBeenSet = true;
139 m_proposedByMemberName = std::forward<ProposedByMemberNameT>(value);
140 }
141 template <typename ProposedByMemberNameT = Aws::String>
142 Proposal& WithProposedByMemberName(ProposedByMemberNameT&& value) {
143 SetProposedByMemberName(std::forward<ProposedByMemberNameT>(value));
144 return *this;
145 }
147
149
168 inline ProposalStatus GetStatus() const { return m_status; }
169 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
170 inline void SetStatus(ProposalStatus value) {
171 m_statusHasBeenSet = true;
172 m_status = value;
173 }
175 SetStatus(value);
176 return *this;
177 }
179
181
184 inline const Aws::Utils::DateTime& GetCreationDate() const { return m_creationDate; }
185 inline bool CreationDateHasBeenSet() const { return m_creationDateHasBeenSet; }
186 template <typename CreationDateT = Aws::Utils::DateTime>
187 void SetCreationDate(CreationDateT&& value) {
188 m_creationDateHasBeenSet = true;
189 m_creationDate = std::forward<CreationDateT>(value);
190 }
191 template <typename CreationDateT = Aws::Utils::DateTime>
192 Proposal& WithCreationDate(CreationDateT&& value) {
193 SetCreationDate(std::forward<CreationDateT>(value));
194 return *this;
195 }
197
199
207 inline const Aws::Utils::DateTime& GetExpirationDate() const { return m_expirationDate; }
208 inline bool ExpirationDateHasBeenSet() const { return m_expirationDateHasBeenSet; }
209 template <typename ExpirationDateT = Aws::Utils::DateTime>
210 void SetExpirationDate(ExpirationDateT&& value) {
211 m_expirationDateHasBeenSet = true;
212 m_expirationDate = std::forward<ExpirationDateT>(value);
213 }
214 template <typename ExpirationDateT = Aws::Utils::DateTime>
215 Proposal& WithExpirationDate(ExpirationDateT&& value) {
216 SetExpirationDate(std::forward<ExpirationDateT>(value));
217 return *this;
218 }
220
222
226 inline int GetYesVoteCount() const { return m_yesVoteCount; }
227 inline bool YesVoteCountHasBeenSet() const { return m_yesVoteCountHasBeenSet; }
228 inline void SetYesVoteCount(int value) {
229 m_yesVoteCountHasBeenSet = true;
230 m_yesVoteCount = value;
231 }
232 inline Proposal& WithYesVoteCount(int value) {
233 SetYesVoteCount(value);
234 return *this;
235 }
237
239
243 inline int GetNoVoteCount() const { return m_noVoteCount; }
244 inline bool NoVoteCountHasBeenSet() const { return m_noVoteCountHasBeenSet; }
245 inline void SetNoVoteCount(int value) {
246 m_noVoteCountHasBeenSet = true;
247 m_noVoteCount = value;
248 }
249 inline Proposal& WithNoVoteCount(int value) {
250 SetNoVoteCount(value);
251 return *this;
252 }
254
256
261 inline int GetOutstandingVoteCount() const { return m_outstandingVoteCount; }
262 inline bool OutstandingVoteCountHasBeenSet() const { return m_outstandingVoteCountHasBeenSet; }
263 inline void SetOutstandingVoteCount(int value) {
264 m_outstandingVoteCountHasBeenSet = true;
265 m_outstandingVoteCount = value;
266 }
269 return *this;
270 }
272
274
284 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
285 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
286 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
287 void SetTags(TagsT&& value) {
288 m_tagsHasBeenSet = true;
289 m_tags = std::forward<TagsT>(value);
290 }
291 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
292 Proposal& WithTags(TagsT&& value) {
293 SetTags(std::forward<TagsT>(value));
294 return *this;
295 }
296 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
297 Proposal& AddTags(TagsKeyT&& key, TagsValueT&& value) {
298 m_tagsHasBeenSet = true;
299 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
300 return *this;
301 }
303
305
312 inline const Aws::String& GetArn() const { return m_arn; }
313 inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; }
314 template <typename ArnT = Aws::String>
315 void SetArn(ArnT&& value) {
316 m_arnHasBeenSet = true;
317 m_arn = std::forward<ArnT>(value);
318 }
319 template <typename ArnT = Aws::String>
320 Proposal& WithArn(ArnT&& value) {
321 SetArn(std::forward<ArnT>(value));
322 return *this;
323 }
325 private:
326 Aws::String m_proposalId;
327
328 Aws::String m_networkId;
329
330 Aws::String m_description;
331
332 ProposalActions m_actions;
333
334 Aws::String m_proposedByMemberId;
335
336 Aws::String m_proposedByMemberName;
337
339
340 Aws::Utils::DateTime m_creationDate{};
341
342 Aws::Utils::DateTime m_expirationDate{};
343
344 int m_yesVoteCount{0};
345
346 int m_noVoteCount{0};
347
348 int m_outstandingVoteCount{0};
349
351
352 Aws::String m_arn;
353 bool m_proposalIdHasBeenSet = false;
354 bool m_networkIdHasBeenSet = false;
355 bool m_descriptionHasBeenSet = false;
356 bool m_actionsHasBeenSet = false;
357 bool m_proposedByMemberIdHasBeenSet = false;
358 bool m_proposedByMemberNameHasBeenSet = false;
359 bool m_statusHasBeenSet = false;
360 bool m_creationDateHasBeenSet = false;
361 bool m_expirationDateHasBeenSet = false;
362 bool m_yesVoteCountHasBeenSet = false;
363 bool m_noVoteCountHasBeenSet = false;
364 bool m_outstandingVoteCountHasBeenSet = false;
365 bool m_tagsHasBeenSet = false;
366 bool m_arnHasBeenSet = false;
367};
368
369} // namespace Model
370} // namespace ManagedBlockchain
371} // namespace Aws
const Aws::String & GetProposalId() const
Definition Proposal.h:43
Proposal & WithNoVoteCount(int value)
Definition Proposal.h:249
const Aws::String & GetDescription() const
Definition Proposal.h:79
const Aws::String & GetNetworkId() const
Definition Proposal.h:61
void SetCreationDate(CreationDateT &&value)
Definition Proposal.h:187
Proposal & AddTags(TagsKeyT &&key, TagsValueT &&value)
Definition Proposal.h:297
const Aws::String & GetProposedByMemberName() const
Definition Proposal.h:134
void SetExpirationDate(ExpirationDateT &&value)
Definition Proposal.h:210
Proposal & WithCreationDate(CreationDateT &&value)
Definition Proposal.h:192
Proposal & WithYesVoteCount(int value)
Definition Proposal.h:232
Proposal & WithArn(ArnT &&value)
Definition Proposal.h:320
Proposal & WithProposedByMemberId(ProposedByMemberIdT &&value)
Definition Proposal.h:124
const Aws::String & GetProposedByMemberId() const
Definition Proposal.h:116
void SetActions(ActionsT &&value)
Definition Proposal.h:101
const Aws::Utils::DateTime & GetCreationDate() const
Definition Proposal.h:184
const Aws::String & GetArn() const
Definition Proposal.h:312
ProposalStatus GetStatus() const
Definition Proposal.h:168
void SetDescription(DescriptionT &&value)
Definition Proposal.h:82
const ProposalActions & GetActions() const
Definition Proposal.h:98
Proposal & WithProposalId(ProposalIdT &&value)
Definition Proposal.h:51
AWS_MANAGEDBLOCKCHAIN_API Proposal(Aws::Utils::Json::JsonView jsonValue)
AWS_MANAGEDBLOCKCHAIN_API Proposal()=default
Proposal & WithTags(TagsT &&value)
Definition Proposal.h:292
void SetProposalId(ProposalIdT &&value)
Definition Proposal.h:46
Proposal & WithStatus(ProposalStatus value)
Definition Proposal.h:174
Proposal & WithNetworkId(NetworkIdT &&value)
Definition Proposal.h:69
void SetProposedByMemberName(ProposedByMemberNameT &&value)
Definition Proposal.h:137
Proposal & WithActions(ActionsT &&value)
Definition Proposal.h:106
void SetNetworkId(NetworkIdT &&value)
Definition Proposal.h:64
const Aws::Utils::DateTime & GetExpirationDate() const
Definition Proposal.h:207
Proposal & WithOutstandingVoteCount(int value)
Definition Proposal.h:267
AWS_MANAGEDBLOCKCHAIN_API Proposal & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetProposedByMemberId(ProposedByMemberIdT &&value)
Definition Proposal.h:119
AWS_MANAGEDBLOCKCHAIN_API Aws::Utils::Json::JsonValue Jsonize() const
void SetStatus(ProposalStatus value)
Definition Proposal.h:170
Proposal & WithExpirationDate(ExpirationDateT &&value)
Definition Proposal.h:215
Proposal & WithProposedByMemberName(ProposedByMemberNameT &&value)
Definition Proposal.h:142
Proposal & WithDescription(DescriptionT &&value)
Definition Proposal.h:87
const Aws::Map< Aws::String, Aws::String > & GetTags() const
Definition Proposal.h:284
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
Aws::Utils::Json::JsonValue JsonValue