AWS SDK for C++  1.8.7
AWS SDK for C++
Policy.h
Go to the documentation of this file.
1 
6 #pragma once
7 #include <aws/iam/IAM_EXPORTS.h>
11 #include <utility>
12 
13 namespace Aws
14 {
15 namespace Utils
16 {
17 namespace Xml
18 {
19  class XmlNode;
20 } // namespace Xml
21 } // namespace Utils
22 namespace IAM
23 {
24 namespace Model
25 {
26 
39  {
40  public:
41  Policy();
42  Policy(const Aws::Utils::Xml::XmlNode& xmlNode);
43  Policy& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
44 
45  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
46  void OutputToStream(Aws::OStream& oStream, const char* location) const;
47 
48 
52  inline const Aws::String& GetPolicyName() const{ return m_policyName; }
53 
57  inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; }
58 
62  inline void SetPolicyName(const Aws::String& value) { m_policyNameHasBeenSet = true; m_policyName = value; }
63 
67  inline void SetPolicyName(Aws::String&& value) { m_policyNameHasBeenSet = true; m_policyName = std::move(value); }
68 
72  inline void SetPolicyName(const char* value) { m_policyNameHasBeenSet = true; m_policyName.assign(value); }
73 
77  inline Policy& WithPolicyName(const Aws::String& value) { SetPolicyName(value); return *this;}
78 
82  inline Policy& WithPolicyName(Aws::String&& value) { SetPolicyName(std::move(value)); return *this;}
83 
87  inline Policy& WithPolicyName(const char* value) { SetPolicyName(value); return *this;}
88 
89 
96  inline const Aws::String& GetPolicyId() const{ return m_policyId; }
97 
104  inline bool PolicyIdHasBeenSet() const { return m_policyIdHasBeenSet; }
105 
112  inline void SetPolicyId(const Aws::String& value) { m_policyIdHasBeenSet = true; m_policyId = value; }
113 
120  inline void SetPolicyId(Aws::String&& value) { m_policyIdHasBeenSet = true; m_policyId = std::move(value); }
121 
128  inline void SetPolicyId(const char* value) { m_policyIdHasBeenSet = true; m_policyId.assign(value); }
129 
136  inline Policy& WithPolicyId(const Aws::String& value) { SetPolicyId(value); return *this;}
137 
144  inline Policy& WithPolicyId(Aws::String&& value) { SetPolicyId(std::move(value)); return *this;}
145 
152  inline Policy& WithPolicyId(const char* value) { SetPolicyId(value); return *this;}
153 
154 
155 
156  inline const Aws::String& GetArn() const{ return m_arn; }
157 
158 
159  inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; }
160 
161 
162  inline void SetArn(const Aws::String& value) { m_arnHasBeenSet = true; m_arn = value; }
163 
164 
165  inline void SetArn(Aws::String&& value) { m_arnHasBeenSet = true; m_arn = std::move(value); }
166 
167 
168  inline void SetArn(const char* value) { m_arnHasBeenSet = true; m_arn.assign(value); }
169 
170 
171  inline Policy& WithArn(const Aws::String& value) { SetArn(value); return *this;}
172 
173 
174  inline Policy& WithArn(Aws::String&& value) { SetArn(std::move(value)); return *this;}
175 
176 
177  inline Policy& WithArn(const char* value) { SetArn(value); return *this;}
178 
179 
185  inline const Aws::String& GetPath() const{ return m_path; }
186 
192  inline bool PathHasBeenSet() const { return m_pathHasBeenSet; }
193 
199  inline void SetPath(const Aws::String& value) { m_pathHasBeenSet = true; m_path = value; }
200 
206  inline void SetPath(Aws::String&& value) { m_pathHasBeenSet = true; m_path = std::move(value); }
207 
213  inline void SetPath(const char* value) { m_pathHasBeenSet = true; m_path.assign(value); }
214 
220  inline Policy& WithPath(const Aws::String& value) { SetPath(value); return *this;}
221 
227  inline Policy& WithPath(Aws::String&& value) { SetPath(std::move(value)); return *this;}
228 
234  inline Policy& WithPath(const char* value) { SetPath(value); return *this;}
235 
236 
241  inline const Aws::String& GetDefaultVersionId() const{ return m_defaultVersionId; }
242 
247  inline bool DefaultVersionIdHasBeenSet() const { return m_defaultVersionIdHasBeenSet; }
248 
253  inline void SetDefaultVersionId(const Aws::String& value) { m_defaultVersionIdHasBeenSet = true; m_defaultVersionId = value; }
254 
259  inline void SetDefaultVersionId(Aws::String&& value) { m_defaultVersionIdHasBeenSet = true; m_defaultVersionId = std::move(value); }
260 
265  inline void SetDefaultVersionId(const char* value) { m_defaultVersionIdHasBeenSet = true; m_defaultVersionId.assign(value); }
266 
271  inline Policy& WithDefaultVersionId(const Aws::String& value) { SetDefaultVersionId(value); return *this;}
272 
277  inline Policy& WithDefaultVersionId(Aws::String&& value) { SetDefaultVersionId(std::move(value)); return *this;}
278 
283  inline Policy& WithDefaultVersionId(const char* value) { SetDefaultVersionId(value); return *this;}
284 
285 
290  inline int GetAttachmentCount() const{ return m_attachmentCount; }
291 
296  inline bool AttachmentCountHasBeenSet() const { return m_attachmentCountHasBeenSet; }
297 
302  inline void SetAttachmentCount(int value) { m_attachmentCountHasBeenSet = true; m_attachmentCount = value; }
303 
308  inline Policy& WithAttachmentCount(int value) { SetAttachmentCount(value); return *this;}
309 
310 
318  inline int GetPermissionsBoundaryUsageCount() const{ return m_permissionsBoundaryUsageCount; }
319 
327  inline bool PermissionsBoundaryUsageCountHasBeenSet() const { return m_permissionsBoundaryUsageCountHasBeenSet; }
328 
336  inline void SetPermissionsBoundaryUsageCount(int value) { m_permissionsBoundaryUsageCountHasBeenSet = true; m_permissionsBoundaryUsageCount = value; }
337 
345  inline Policy& WithPermissionsBoundaryUsageCount(int value) { SetPermissionsBoundaryUsageCount(value); return *this;}
346 
347 
352  inline bool GetIsAttachable() const{ return m_isAttachable; }
353 
358  inline bool IsAttachableHasBeenSet() const { return m_isAttachableHasBeenSet; }
359 
364  inline void SetIsAttachable(bool value) { m_isAttachableHasBeenSet = true; m_isAttachable = value; }
365 
370  inline Policy& WithIsAttachable(bool value) { SetIsAttachable(value); return *this;}
371 
372 
378  inline const Aws::String& GetDescription() const{ return m_description; }
379 
385  inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
386 
392  inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }
393 
399  inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); }
400 
406  inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }
407 
413  inline Policy& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}
414 
420  inline Policy& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;}
421 
427  inline Policy& WithDescription(const char* value) { SetDescription(value); return *this;}
428 
429 
434  inline const Aws::Utils::DateTime& GetCreateDate() const{ return m_createDate; }
435 
440  inline bool CreateDateHasBeenSet() const { return m_createDateHasBeenSet; }
441 
446  inline void SetCreateDate(const Aws::Utils::DateTime& value) { m_createDateHasBeenSet = true; m_createDate = value; }
447 
452  inline void SetCreateDate(Aws::Utils::DateTime&& value) { m_createDateHasBeenSet = true; m_createDate = std::move(value); }
453 
458  inline Policy& WithCreateDate(const Aws::Utils::DateTime& value) { SetCreateDate(value); return *this;}
459 
464  inline Policy& WithCreateDate(Aws::Utils::DateTime&& value) { SetCreateDate(std::move(value)); return *this;}
465 
466 
474  inline const Aws::Utils::DateTime& GetUpdateDate() const{ return m_updateDate; }
475 
483  inline bool UpdateDateHasBeenSet() const { return m_updateDateHasBeenSet; }
484 
492  inline void SetUpdateDate(const Aws::Utils::DateTime& value) { m_updateDateHasBeenSet = true; m_updateDate = value; }
493 
501  inline void SetUpdateDate(Aws::Utils::DateTime&& value) { m_updateDateHasBeenSet = true; m_updateDate = std::move(value); }
502 
510  inline Policy& WithUpdateDate(const Aws::Utils::DateTime& value) { SetUpdateDate(value); return *this;}
511 
519  inline Policy& WithUpdateDate(Aws::Utils::DateTime&& value) { SetUpdateDate(std::move(value)); return *this;}
520 
521  private:
522 
523  Aws::String m_policyName;
524  bool m_policyNameHasBeenSet;
525 
526  Aws::String m_policyId;
527  bool m_policyIdHasBeenSet;
528 
529  Aws::String m_arn;
530  bool m_arnHasBeenSet;
531 
532  Aws::String m_path;
533  bool m_pathHasBeenSet;
534 
535  Aws::String m_defaultVersionId;
536  bool m_defaultVersionIdHasBeenSet;
537 
538  int m_attachmentCount;
539  bool m_attachmentCountHasBeenSet;
540 
541  int m_permissionsBoundaryUsageCount;
542  bool m_permissionsBoundaryUsageCountHasBeenSet;
543 
544  bool m_isAttachable;
545  bool m_isAttachableHasBeenSet;
546 
547  Aws::String m_description;
548  bool m_descriptionHasBeenSet;
549 
550  Aws::Utils::DateTime m_createDate;
551  bool m_createDateHasBeenSet;
552 
553  Aws::Utils::DateTime m_updateDate;
554  bool m_updateDateHasBeenSet;
555  };
556 
557 } // namespace Model
558 } // namespace IAM
559 } // namespace Aws
void SetPolicyName(const Aws::String &value)
Definition: Policy.h:62
bool ArnHasBeenSet() const
Definition: Policy.h:159
void SetPolicyName(const char *value)
Definition: Policy.h:72
Policy & WithCreateDate(const Aws::Utils::DateTime &value)
Definition: Policy.h:458
Policy & WithArn(const char *value)
Definition: Policy.h:177
bool UpdateDateHasBeenSet() const
Definition: Policy.h:483
Policy & WithDescription(const char *value)
Definition: Policy.h:427
bool AttachmentCountHasBeenSet() const
Definition: Policy.h:296
Policy & WithPolicyName(const Aws::String &value)
Definition: Policy.h:77
void SetPermissionsBoundaryUsageCount(int value)
Definition: Policy.h:336
Policy & WithPath(const char *value)
Definition: Policy.h:234
void SetDescription(const Aws::String &value)
Definition: Policy.h:392
Policy & WithDescription(const Aws::String &value)
Definition: Policy.h:413
Policy & WithPermissionsBoundaryUsageCount(int value)
Definition: Policy.h:345
bool PathHasBeenSet() const
Definition: Policy.h:192
bool DescriptionHasBeenSet() const
Definition: Policy.h:385
bool PermissionsBoundaryUsageCountHasBeenSet() const
Definition: Policy.h:327
void SetUpdateDate(Aws::Utils::DateTime &&value)
Definition: Policy.h:501
void SetArn(Aws::String &&value)
Definition: Policy.h:165
bool PolicyNameHasBeenSet() const
Definition: Policy.h:57
Policy & WithPolicyId(const Aws::String &value)
Definition: Policy.h:136
Policy & WithArn(Aws::String &&value)
Definition: Policy.h:174
const Aws::Utils::DateTime & GetCreateDate() const
Definition: Policy.h:434
Policy & WithDefaultVersionId(const Aws::String &value)
Definition: Policy.h:271
void SetUpdateDate(const Aws::Utils::DateTime &value)
Definition: Policy.h:492
Policy & WithDefaultVersionId(Aws::String &&value)
Definition: Policy.h:277
void SetDefaultVersionId(const Aws::String &value)
Definition: Policy.h:253
int index
Definition: cJSON.h:171
Policy & WithAttachmentCount(int value)
Definition: Policy.h:308
Policy & WithDefaultVersionId(const char *value)
Definition: Policy.h:283
bool GetIsAttachable() const
Definition: Policy.h:352
Policy & WithUpdateDate(Aws::Utils::DateTime &&value)
Definition: Policy.h:519
Policy & WithCreateDate(Aws::Utils::DateTime &&value)
Definition: Policy.h:464
Policy & WithIsAttachable(bool value)
Definition: Policy.h:370
const Aws::String & GetDescription() const
Definition: Policy.h:378
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:21
void SetIsAttachable(bool value)
Definition: Policy.h:364
void SetPath(const Aws::String &value)
Definition: Policy.h:199
const Aws::String & GetPolicyId() const
Definition: Policy.h:96
Policy & WithPolicyName(Aws::String &&value)
Definition: Policy.h:82
void SetPolicyId(const char *value)
Definition: Policy.h:128
void SetPath(Aws::String &&value)
Definition: Policy.h:206
Policy & WithPolicyName(const char *value)
Definition: Policy.h:87
void SetDefaultVersionId(Aws::String &&value)
Definition: Policy.h:259
bool PolicyIdHasBeenSet() const
Definition: Policy.h:104
void SetDescription(Aws::String &&value)
Definition: Policy.h:399
bool DefaultVersionIdHasBeenSet() const
Definition: Policy.h:247
void SetArn(const char *value)
Definition: Policy.h:168
void SetPolicyId(const Aws::String &value)
Definition: Policy.h:112
void SetPolicyId(Aws::String &&value)
Definition: Policy.h:120
Policy & WithPath(const Aws::String &value)
Definition: Policy.h:220
Policy & WithArn(const Aws::String &value)
Definition: Policy.h:171
const Aws::String & GetPath() const
Definition: Policy.h:185
void SetCreateDate(Aws::Utils::DateTime &&value)
Definition: Policy.h:452
Policy & WithPath(Aws::String &&value)
Definition: Policy.h:227
void SetCreateDate(const Aws::Utils::DateTime &value)
Definition: Policy.h:446
bool IsAttachableHasBeenSet() const
Definition: Policy.h:358
Policy & WithUpdateDate(const Aws::Utils::DateTime &value)
Definition: Policy.h:510
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
void SetPath(const char *value)
Definition: Policy.h:213
int GetAttachmentCount() const
Definition: Policy.h:290
void SetAttachmentCount(int value)
Definition: Policy.h:302
bool CreateDateHasBeenSet() const
Definition: Policy.h:440
const Aws::Utils::DateTime & GetUpdateDate() const
Definition: Policy.h:474
const Aws::String & GetPolicyName() const
Definition: Policy.h:52
#define AWS_IAM_API
Definition: IAM_EXPORTS.h:28
void SetDefaultVersionId(const char *value)
Definition: Policy.h:265
void SetArn(const Aws::String &value)
Definition: Policy.h:162
Policy & WithPolicyId(const char *value)
Definition: Policy.h:152
Policy & WithPolicyId(Aws::String &&value)
Definition: Policy.h:144
void SetPolicyName(Aws::String &&value)
Definition: Policy.h:67
void SetDescription(const char *value)
Definition: Policy.h:406
int GetPermissionsBoundaryUsageCount() const
Definition: Policy.h:318
const Aws::String & GetArn() const
Definition: Policy.h:156
Policy & WithDescription(Aws::String &&value)
Definition: Policy.h:420
const Aws::String & GetDefaultVersionId() const
Definition: Policy.h:241