AWS SDK for C++

AWS SDK for C++ Version 1.11.743

Loading...
Searching...
No Matches
InstanceProfile.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/iam/IAM_EXPORTS.h>
12#include <aws/iam/model/Role.h>
13#include <aws/iam/model/Tag.h>
14
15#include <utility>
16
17namespace Aws {
18namespace Utils {
19namespace Xml {
20class XmlNode;
21} // namespace Xml
22} // namespace Utils
23namespace IAM {
24namespace Model {
25
41 public:
42 AWS_IAM_API InstanceProfile() = default;
43 AWS_IAM_API InstanceProfile(const Aws::Utils::Xml::XmlNode& xmlNode);
45
46 AWS_IAM_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
47 AWS_IAM_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
48
50
55 inline const Aws::String& GetPath() const { return m_path; }
56 inline bool PathHasBeenSet() const { return m_pathHasBeenSet; }
57 template <typename PathT = Aws::String>
58 void SetPath(PathT&& value) {
59 m_pathHasBeenSet = true;
60 m_path = std::forward<PathT>(value);
61 }
62 template <typename PathT = Aws::String>
63 InstanceProfile& WithPath(PathT&& value) {
64 SetPath(std::forward<PathT>(value));
65 return *this;
66 }
68
70
73 inline const Aws::String& GetInstanceProfileName() const { return m_instanceProfileName; }
74 inline bool InstanceProfileNameHasBeenSet() const { return m_instanceProfileNameHasBeenSet; }
75 template <typename InstanceProfileNameT = Aws::String>
76 void SetInstanceProfileName(InstanceProfileNameT&& value) {
77 m_instanceProfileNameHasBeenSet = true;
78 m_instanceProfileName = std::forward<InstanceProfileNameT>(value);
79 }
80 template <typename InstanceProfileNameT = Aws::String>
81 InstanceProfile& WithInstanceProfileName(InstanceProfileNameT&& value) {
82 SetInstanceProfileName(std::forward<InstanceProfileNameT>(value));
83 return *this;
84 }
86
88
94 inline const Aws::String& GetInstanceProfileId() const { return m_instanceProfileId; }
95 inline bool InstanceProfileIdHasBeenSet() const { return m_instanceProfileIdHasBeenSet; }
96 template <typename InstanceProfileIdT = Aws::String>
97 void SetInstanceProfileId(InstanceProfileIdT&& value) {
98 m_instanceProfileIdHasBeenSet = true;
99 m_instanceProfileId = std::forward<InstanceProfileIdT>(value);
100 }
101 template <typename InstanceProfileIdT = Aws::String>
102 InstanceProfile& WithInstanceProfileId(InstanceProfileIdT&& value) {
103 SetInstanceProfileId(std::forward<InstanceProfileIdT>(value));
104 return *this;
105 }
107
109
115 inline const Aws::String& GetArn() const { return m_arn; }
116 inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; }
117 template <typename ArnT = Aws::String>
118 void SetArn(ArnT&& value) {
119 m_arnHasBeenSet = true;
120 m_arn = std::forward<ArnT>(value);
121 }
122 template <typename ArnT = Aws::String>
123 InstanceProfile& WithArn(ArnT&& value) {
124 SetArn(std::forward<ArnT>(value));
125 return *this;
126 }
128
130
133 inline const Aws::Utils::DateTime& GetCreateDate() const { return m_createDate; }
134 inline bool CreateDateHasBeenSet() const { return m_createDateHasBeenSet; }
135 template <typename CreateDateT = Aws::Utils::DateTime>
136 void SetCreateDate(CreateDateT&& value) {
137 m_createDateHasBeenSet = true;
138 m_createDate = std::forward<CreateDateT>(value);
139 }
140 template <typename CreateDateT = Aws::Utils::DateTime>
141 InstanceProfile& WithCreateDate(CreateDateT&& value) {
142 SetCreateDate(std::forward<CreateDateT>(value));
143 return *this;
144 }
146
148
151 inline const Aws::Vector<Role>& GetRoles() const { return m_roles; }
152 inline bool RolesHasBeenSet() const { return m_rolesHasBeenSet; }
153 template <typename RolesT = Aws::Vector<Role>>
154 void SetRoles(RolesT&& value) {
155 m_rolesHasBeenSet = true;
156 m_roles = std::forward<RolesT>(value);
157 }
158 template <typename RolesT = Aws::Vector<Role>>
159 InstanceProfile& WithRoles(RolesT&& value) {
160 SetRoles(std::forward<RolesT>(value));
161 return *this;
162 }
163 template <typename RolesT = Role>
164 InstanceProfile& AddRoles(RolesT&& value) {
165 m_rolesHasBeenSet = true;
166 m_roles.emplace_back(std::forward<RolesT>(value));
167 return *this;
168 }
170
172
178 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
179 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
180 template <typename TagsT = Aws::Vector<Tag>>
181 void SetTags(TagsT&& value) {
182 m_tagsHasBeenSet = true;
183 m_tags = std::forward<TagsT>(value);
184 }
185 template <typename TagsT = Aws::Vector<Tag>>
186 InstanceProfile& WithTags(TagsT&& value) {
187 SetTags(std::forward<TagsT>(value));
188 return *this;
189 }
190 template <typename TagsT = Tag>
191 InstanceProfile& AddTags(TagsT&& value) {
192 m_tagsHasBeenSet = true;
193 m_tags.emplace_back(std::forward<TagsT>(value));
194 return *this;
195 }
197 private:
198 Aws::String m_path;
199
200 Aws::String m_instanceProfileName;
201
202 Aws::String m_instanceProfileId;
203
204 Aws::String m_arn;
205
206 Aws::Utils::DateTime m_createDate{};
207
208 Aws::Vector<Role> m_roles;
209
210 Aws::Vector<Tag> m_tags;
211 bool m_pathHasBeenSet = false;
212 bool m_instanceProfileNameHasBeenSet = false;
213 bool m_instanceProfileIdHasBeenSet = false;
214 bool m_arnHasBeenSet = false;
215 bool m_createDateHasBeenSet = false;
216 bool m_rolesHasBeenSet = false;
217 bool m_tagsHasBeenSet = false;
218};
219
220} // namespace Model
221} // namespace IAM
222} // namespace Aws
AWS_IAM_API InstanceProfile()=default
const Aws::Vector< Role > & GetRoles() const
AWS_IAM_API InstanceProfile & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
InstanceProfile & WithPath(PathT &&value)
const Aws::String & GetPath() const
const Aws::String & GetInstanceProfileName() const
InstanceProfile & AddTags(TagsT &&value)
InstanceProfile & WithInstanceProfileId(InstanceProfileIdT &&value)
AWS_IAM_API InstanceProfile(const Aws::Utils::Xml::XmlNode &xmlNode)
InstanceProfile & WithRoles(RolesT &&value)
const Aws::String & GetInstanceProfileId() const
InstanceProfile & WithArn(ArnT &&value)
InstanceProfile & AddRoles(RolesT &&value)
const Aws::String & GetArn() const
InstanceProfile & WithCreateDate(CreateDateT &&value)
void SetCreateDate(CreateDateT &&value)
const Aws::Vector< Tag > & GetTags() const
AWS_IAM_API void OutputToStream(Aws::OStream &oStream, const char *location) const
void SetInstanceProfileName(InstanceProfileNameT &&value)
void SetInstanceProfileId(InstanceProfileIdT &&value)
InstanceProfile & WithTags(TagsT &&value)
const Aws::Utils::DateTime & GetCreateDate() const
InstanceProfile & WithInstanceProfileName(InstanceProfileNameT &&value)
AWS_IAM_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
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