AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
Policy.h
1
6#pragma once
7#include <aws/iam/IAM_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/DateTime.h>
11#include <aws/core/utils/memory/stl/AWSVector.h>
12#include <aws/iam/model/Tag.h>
13#include <utility>
14
15namespace Aws
16{
17namespace Utils
18{
19namespace Xml
20{
21 class XmlNode;
22} // namespace Xml
23} // namespace Utils
24namespace IAM
25{
26namespace Model
27{
28
40 class Policy
41 {
42 public:
43 AWS_IAM_API Policy();
44 AWS_IAM_API Policy(const Aws::Utils::Xml::XmlNode& xmlNode);
45 AWS_IAM_API Policy& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
46
47 AWS_IAM_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
48 AWS_IAM_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
49
50
52
55 inline const Aws::String& GetPolicyName() const{ return m_policyName; }
56 inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; }
57 inline void SetPolicyName(const Aws::String& value) { m_policyNameHasBeenSet = true; m_policyName = value; }
58 inline void SetPolicyName(Aws::String&& value) { m_policyNameHasBeenSet = true; m_policyName = std::move(value); }
59 inline void SetPolicyName(const char* value) { m_policyNameHasBeenSet = true; m_policyName.assign(value); }
60 inline Policy& WithPolicyName(const Aws::String& value) { SetPolicyName(value); return *this;}
61 inline Policy& WithPolicyName(Aws::String&& value) { SetPolicyName(std::move(value)); return *this;}
62 inline Policy& WithPolicyName(const char* value) { SetPolicyName(value); return *this;}
64
66
72 inline const Aws::String& GetPolicyId() const{ return m_policyId; }
73 inline bool PolicyIdHasBeenSet() const { return m_policyIdHasBeenSet; }
74 inline void SetPolicyId(const Aws::String& value) { m_policyIdHasBeenSet = true; m_policyId = value; }
75 inline void SetPolicyId(Aws::String&& value) { m_policyIdHasBeenSet = true; m_policyId = std::move(value); }
76 inline void SetPolicyId(const char* value) { m_policyIdHasBeenSet = true; m_policyId.assign(value); }
77 inline Policy& WithPolicyId(const Aws::String& value) { SetPolicyId(value); return *this;}
78 inline Policy& WithPolicyId(Aws::String&& value) { SetPolicyId(std::move(value)); return *this;}
79 inline Policy& WithPolicyId(const char* value) { SetPolicyId(value); return *this;}
81
83
84 inline const Aws::String& GetArn() const{ return m_arn; }
85 inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; }
86 inline void SetArn(const Aws::String& value) { m_arnHasBeenSet = true; m_arn = value; }
87 inline void SetArn(Aws::String&& value) { m_arnHasBeenSet = true; m_arn = std::move(value); }
88 inline void SetArn(const char* value) { m_arnHasBeenSet = true; m_arn.assign(value); }
89 inline Policy& WithArn(const Aws::String& value) { SetArn(value); return *this;}
90 inline Policy& WithArn(Aws::String&& value) { SetArn(std::move(value)); return *this;}
91 inline Policy& WithArn(const char* value) { SetArn(value); return *this;}
93
95
100 inline const Aws::String& GetPath() const{ return m_path; }
101 inline bool PathHasBeenSet() const { return m_pathHasBeenSet; }
102 inline void SetPath(const Aws::String& value) { m_pathHasBeenSet = true; m_path = value; }
103 inline void SetPath(Aws::String&& value) { m_pathHasBeenSet = true; m_path = std::move(value); }
104 inline void SetPath(const char* value) { m_pathHasBeenSet = true; m_path.assign(value); }
105 inline Policy& WithPath(const Aws::String& value) { SetPath(value); return *this;}
106 inline Policy& WithPath(Aws::String&& value) { SetPath(std::move(value)); return *this;}
107 inline Policy& WithPath(const char* value) { SetPath(value); return *this;}
109
111
115 inline const Aws::String& GetDefaultVersionId() const{ return m_defaultVersionId; }
116 inline bool DefaultVersionIdHasBeenSet() const { return m_defaultVersionIdHasBeenSet; }
117 inline void SetDefaultVersionId(const Aws::String& value) { m_defaultVersionIdHasBeenSet = true; m_defaultVersionId = value; }
118 inline void SetDefaultVersionId(Aws::String&& value) { m_defaultVersionIdHasBeenSet = true; m_defaultVersionId = std::move(value); }
119 inline void SetDefaultVersionId(const char* value) { m_defaultVersionIdHasBeenSet = true; m_defaultVersionId.assign(value); }
120 inline Policy& WithDefaultVersionId(const Aws::String& value) { SetDefaultVersionId(value); return *this;}
121 inline Policy& WithDefaultVersionId(Aws::String&& value) { SetDefaultVersionId(std::move(value)); return *this;}
122 inline Policy& WithDefaultVersionId(const char* value) { SetDefaultVersionId(value); return *this;}
124
126
130 inline int GetAttachmentCount() const{ return m_attachmentCount; }
131 inline bool AttachmentCountHasBeenSet() const { return m_attachmentCountHasBeenSet; }
132 inline void SetAttachmentCount(int value) { m_attachmentCountHasBeenSet = true; m_attachmentCount = value; }
133 inline Policy& WithAttachmentCount(int value) { SetAttachmentCount(value); return *this;}
135
137
144 inline int GetPermissionsBoundaryUsageCount() const{ return m_permissionsBoundaryUsageCount; }
145 inline bool PermissionsBoundaryUsageCountHasBeenSet() const { return m_permissionsBoundaryUsageCountHasBeenSet; }
146 inline void SetPermissionsBoundaryUsageCount(int value) { m_permissionsBoundaryUsageCountHasBeenSet = true; m_permissionsBoundaryUsageCount = value; }
149
151
155 inline bool GetIsAttachable() const{ return m_isAttachable; }
156 inline bool IsAttachableHasBeenSet() const { return m_isAttachableHasBeenSet; }
157 inline void SetIsAttachable(bool value) { m_isAttachableHasBeenSet = true; m_isAttachable = value; }
158 inline Policy& WithIsAttachable(bool value) { SetIsAttachable(value); return *this;}
160
162
167 inline const Aws::String& GetDescription() const{ return m_description; }
168 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
169 inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }
170 inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); }
171 inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }
172 inline Policy& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}
173 inline Policy& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;}
174 inline Policy& WithDescription(const char* value) { SetDescription(value); return *this;}
176
178
182 inline const Aws::Utils::DateTime& GetCreateDate() const{ return m_createDate; }
183 inline bool CreateDateHasBeenSet() const { return m_createDateHasBeenSet; }
184 inline void SetCreateDate(const Aws::Utils::DateTime& value) { m_createDateHasBeenSet = true; m_createDate = value; }
185 inline void SetCreateDate(Aws::Utils::DateTime&& value) { m_createDateHasBeenSet = true; m_createDate = std::move(value); }
186 inline Policy& WithCreateDate(const Aws::Utils::DateTime& value) { SetCreateDate(value); return *this;}
187 inline Policy& WithCreateDate(Aws::Utils::DateTime&& value) { SetCreateDate(std::move(value)); return *this;}
189
191
198 inline const Aws::Utils::DateTime& GetUpdateDate() const{ return m_updateDate; }
199 inline bool UpdateDateHasBeenSet() const { return m_updateDateHasBeenSet; }
200 inline void SetUpdateDate(const Aws::Utils::DateTime& value) { m_updateDateHasBeenSet = true; m_updateDate = value; }
201 inline void SetUpdateDate(Aws::Utils::DateTime&& value) { m_updateDateHasBeenSet = true; m_updateDate = std::move(value); }
202 inline Policy& WithUpdateDate(const Aws::Utils::DateTime& value) { SetUpdateDate(value); return *this;}
203 inline Policy& WithUpdateDate(Aws::Utils::DateTime&& value) { SetUpdateDate(std::move(value)); return *this;}
205
207
213 inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
214 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
215 inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
216 inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
217 inline Policy& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
218 inline Policy& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
219 inline Policy& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
220 inline Policy& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
222 private:
223
224 Aws::String m_policyName;
225 bool m_policyNameHasBeenSet = false;
226
227 Aws::String m_policyId;
228 bool m_policyIdHasBeenSet = false;
229
230 Aws::String m_arn;
231 bool m_arnHasBeenSet = false;
232
233 Aws::String m_path;
234 bool m_pathHasBeenSet = false;
235
236 Aws::String m_defaultVersionId;
237 bool m_defaultVersionIdHasBeenSet = false;
238
239 int m_attachmentCount;
240 bool m_attachmentCountHasBeenSet = false;
241
242 int m_permissionsBoundaryUsageCount;
243 bool m_permissionsBoundaryUsageCountHasBeenSet = false;
244
245 bool m_isAttachable;
246 bool m_isAttachableHasBeenSet = false;
247
248 Aws::String m_description;
249 bool m_descriptionHasBeenSet = false;
250
251 Aws::Utils::DateTime m_createDate;
252 bool m_createDateHasBeenSet = false;
253
254 Aws::Utils::DateTime m_updateDate;
255 bool m_updateDateHasBeenSet = false;
256
257 Aws::Vector<Tag> m_tags;
258 bool m_tagsHasBeenSet = false;
259 };
260
261} // namespace Model
262} // namespace IAM
263} // namespace Aws
Policy & WithArn(const Aws::String &value)
Definition Policy.h:89
void SetDefaultVersionId(const Aws::String &value)
Definition Policy.h:117
Policy & AddTags(const Tag &value)
Definition Policy.h:219
Policy & WithDescription(Aws::String &&value)
Definition Policy.h:173
Policy & WithPermissionsBoundaryUsageCount(int value)
Definition Policy.h:147
Policy & WithPolicyName(const Aws::String &value)
Definition Policy.h:60
Policy & WithTags(const Aws::Vector< Tag > &value)
Definition Policy.h:217
void SetPath(const char *value)
Definition Policy.h:104
int GetAttachmentCount() const
Definition Policy.h:130
Policy & WithDescription(const char *value)
Definition Policy.h:174
void SetPath(Aws::String &&value)
Definition Policy.h:103
AWS_IAM_API void OutputToStream(Aws::OStream &oStream, const char *location) const
const Aws::String & GetDefaultVersionId() const
Definition Policy.h:115
void SetPolicyName(const Aws::String &value)
Definition Policy.h:57
Policy & WithDefaultVersionId(Aws::String &&value)
Definition Policy.h:121
Policy & WithDescription(const Aws::String &value)
Definition Policy.h:172
Policy & WithIsAttachable(bool value)
Definition Policy.h:158
void SetTags(const Aws::Vector< Tag > &value)
Definition Policy.h:215
const Aws::String & GetPolicyName() const
Definition Policy.h:55
void SetCreateDate(Aws::Utils::DateTime &&value)
Definition Policy.h:185
Policy & AddTags(Tag &&value)
Definition Policy.h:220
bool PermissionsBoundaryUsageCountHasBeenSet() const
Definition Policy.h:145
void SetPolicyName(const char *value)
Definition Policy.h:59
Policy & WithPolicyName(const char *value)
Definition Policy.h:62
bool GetIsAttachable() const
Definition Policy.h:155
const Aws::Utils::DateTime & GetUpdateDate() const
Definition Policy.h:198
void SetPolicyName(Aws::String &&value)
Definition Policy.h:58
bool PolicyNameHasBeenSet() const
Definition Policy.h:56
Policy & WithTags(Aws::Vector< Tag > &&value)
Definition Policy.h:218
AWS_IAM_API Policy & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetPolicyId(const Aws::String &value)
Definition Policy.h:74
void SetDescription(Aws::String &&value)
Definition Policy.h:170
Policy & WithPolicyId(const Aws::String &value)
Definition Policy.h:77
Policy & WithArn(Aws::String &&value)
Definition Policy.h:90
bool PathHasBeenSet() const
Definition Policy.h:101
bool CreateDateHasBeenSet() const
Definition Policy.h:183
bool DefaultVersionIdHasBeenSet() const
Definition Policy.h:116
bool UpdateDateHasBeenSet() const
Definition Policy.h:199
Policy & WithCreateDate(const Aws::Utils::DateTime &value)
Definition Policy.h:186
void SetDefaultVersionId(const char *value)
Definition Policy.h:119
void SetArn(const char *value)
Definition Policy.h:88
Policy & WithUpdateDate(const Aws::Utils::DateTime &value)
Definition Policy.h:202
Policy & WithCreateDate(Aws::Utils::DateTime &&value)
Definition Policy.h:187
AWS_IAM_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
void SetAttachmentCount(int value)
Definition Policy.h:132
bool TagsHasBeenSet() const
Definition Policy.h:214
void SetPolicyId(Aws::String &&value)
Definition Policy.h:75
void SetTags(Aws::Vector< Tag > &&value)
Definition Policy.h:216
Policy & WithAttachmentCount(int value)
Definition Policy.h:133
void SetDefaultVersionId(Aws::String &&value)
Definition Policy.h:118
Policy & WithDefaultVersionId(const Aws::String &value)
Definition Policy.h:120
Policy & WithUpdateDate(Aws::Utils::DateTime &&value)
Definition Policy.h:203
AWS_IAM_API Policy(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetUpdateDate(const Aws::Utils::DateTime &value)
Definition Policy.h:200
Policy & WithPolicyId(const char *value)
Definition Policy.h:79
void SetPath(const Aws::String &value)
Definition Policy.h:102
Policy & WithPath(Aws::String &&value)
Definition Policy.h:106
Policy & WithPath(const Aws::String &value)
Definition Policy.h:105
bool ArnHasBeenSet() const
Definition Policy.h:85
void SetUpdateDate(Aws::Utils::DateTime &&value)
Definition Policy.h:201
void SetArn(Aws::String &&value)
Definition Policy.h:87
void SetPermissionsBoundaryUsageCount(int value)
Definition Policy.h:146
void SetPolicyId(const char *value)
Definition Policy.h:76
const Aws::Utils::DateTime & GetCreateDate() const
Definition Policy.h:182
Policy & WithDefaultVersionId(const char *value)
Definition Policy.h:122
bool DescriptionHasBeenSet() const
Definition Policy.h:168
void SetCreateDate(const Aws::Utils::DateTime &value)
Definition Policy.h:184
int GetPermissionsBoundaryUsageCount() const
Definition Policy.h:144
Policy & WithPath(const char *value)
Definition Policy.h:107
void SetDescription(const char *value)
Definition Policy.h:171
const Aws::String & GetDescription() const
Definition Policy.h:167
const Aws::String & GetPolicyId() const
Definition Policy.h:72
void SetArn(const Aws::String &value)
Definition Policy.h:86
void SetIsAttachable(bool value)
Definition Policy.h:157
bool PolicyIdHasBeenSet() const
Definition Policy.h:73
Policy & WithArn(const char *value)
Definition Policy.h:91
void SetDescription(const Aws::String &value)
Definition Policy.h:169
Policy & WithPolicyName(Aws::String &&value)
Definition Policy.h:61
const Aws::Vector< Tag > & GetTags() const
Definition Policy.h:213
bool AttachmentCountHasBeenSet() const
Definition Policy.h:131
Policy & WithPolicyId(Aws::String &&value)
Definition Policy.h:78
const Aws::String & GetArn() const
Definition Policy.h:84
const Aws::String & GetPath() const
Definition Policy.h:100
bool IsAttachableHasBeenSet() const
Definition Policy.h:156
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
std::basic_ostream< char, std::char_traits< char > > OStream