AWS SDK for C++  0.14.3
AWS SDK for C++
InstanceProfile.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
16 #include <aws/iam/IAM_EXPORTS.h>
21 #include <aws/iam/model/Role.h>
22 
23 namespace Aws
24 {
25 namespace Utils
26 {
27 namespace Xml
28 {
29  class XmlNode;
30 } // namespace Xml
31 } // namespace Utils
32 namespace IAM
33 {
34 namespace Model
35 {
36 
45  {
46  public:
49  InstanceProfile& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
50 
51  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
52  void OutputToStream(Aws::OStream& oStream, const char* location) const;
53 
59  inline const Aws::String& GetPath() const{ return m_path; }
60 
66  inline void SetPath(const Aws::String& value) { m_pathHasBeenSet = true; m_path = value; }
67 
73  inline void SetPath(Aws::String&& value) { m_pathHasBeenSet = true; m_path = value; }
74 
80  inline void SetPath(const char* value) { m_pathHasBeenSet = true; m_path.assign(value); }
81 
87  inline InstanceProfile& WithPath(const Aws::String& value) { SetPath(value); return *this;}
88 
94  inline InstanceProfile& WithPath(Aws::String&& value) { SetPath(value); return *this;}
95 
101  inline InstanceProfile& WithPath(const char* value) { SetPath(value); return *this;}
102 
106  inline const Aws::String& GetInstanceProfileName() const{ return m_instanceProfileName; }
107 
111  inline void SetInstanceProfileName(const Aws::String& value) { m_instanceProfileNameHasBeenSet = true; m_instanceProfileName = value; }
112 
116  inline void SetInstanceProfileName(Aws::String&& value) { m_instanceProfileNameHasBeenSet = true; m_instanceProfileName = value; }
117 
121  inline void SetInstanceProfileName(const char* value) { m_instanceProfileNameHasBeenSet = true; m_instanceProfileName.assign(value); }
122 
126  inline InstanceProfile& WithInstanceProfileName(const Aws::String& value) { SetInstanceProfileName(value); return *this;}
127 
131  inline InstanceProfile& WithInstanceProfileName(Aws::String&& value) { SetInstanceProfileName(value); return *this;}
132 
136  inline InstanceProfile& WithInstanceProfileName(const char* value) { SetInstanceProfileName(value); return *this;}
137 
144  inline const Aws::String& GetInstanceProfileId() const{ return m_instanceProfileId; }
145 
152  inline void SetInstanceProfileId(const Aws::String& value) { m_instanceProfileIdHasBeenSet = true; m_instanceProfileId = value; }
153 
160  inline void SetInstanceProfileId(Aws::String&& value) { m_instanceProfileIdHasBeenSet = true; m_instanceProfileId = value; }
161 
168  inline void SetInstanceProfileId(const char* value) { m_instanceProfileIdHasBeenSet = true; m_instanceProfileId.assign(value); }
169 
176  inline InstanceProfile& WithInstanceProfileId(const Aws::String& value) { SetInstanceProfileId(value); return *this;}
177 
184  inline InstanceProfile& WithInstanceProfileId(Aws::String&& value) { SetInstanceProfileId(value); return *this;}
185 
192  inline InstanceProfile& WithInstanceProfileId(const char* value) { SetInstanceProfileId(value); return *this;}
193 
200  inline const Aws::String& GetArn() const{ return m_arn; }
201 
208  inline void SetArn(const Aws::String& value) { m_arnHasBeenSet = true; m_arn = value; }
209 
216  inline void SetArn(Aws::String&& value) { m_arnHasBeenSet = true; m_arn = value; }
217 
224  inline void SetArn(const char* value) { m_arnHasBeenSet = true; m_arn.assign(value); }
225 
232  inline InstanceProfile& WithArn(const Aws::String& value) { SetArn(value); return *this;}
233 
240  inline InstanceProfile& WithArn(Aws::String&& value) { SetArn(value); return *this;}
241 
248  inline InstanceProfile& WithArn(const char* value) { SetArn(value); return *this;}
249 
253  inline const Aws::Utils::DateTime& GetCreateDate() const{ return m_createDate; }
254 
258  inline void SetCreateDate(const Aws::Utils::DateTime& value) { m_createDateHasBeenSet = true; m_createDate = value; }
259 
263  inline void SetCreateDate(Aws::Utils::DateTime&& value) { m_createDateHasBeenSet = true; m_createDate = value; }
264 
268  inline InstanceProfile& WithCreateDate(const Aws::Utils::DateTime& value) { SetCreateDate(value); return *this;}
269 
273  inline InstanceProfile& WithCreateDate(Aws::Utils::DateTime&& value) { SetCreateDate(value); return *this;}
274 
278  inline const Aws::Vector<Role>& GetRoles() const{ return m_roles; }
279 
283  inline void SetRoles(const Aws::Vector<Role>& value) { m_rolesHasBeenSet = true; m_roles = value; }
284 
288  inline void SetRoles(Aws::Vector<Role>&& value) { m_rolesHasBeenSet = true; m_roles = value; }
289 
293  inline InstanceProfile& WithRoles(const Aws::Vector<Role>& value) { SetRoles(value); return *this;}
294 
298  inline InstanceProfile& WithRoles(Aws::Vector<Role>&& value) { SetRoles(value); return *this;}
299 
303  inline InstanceProfile& AddRoles(const Role& value) { m_rolesHasBeenSet = true; m_roles.push_back(value); return *this; }
304 
308  inline InstanceProfile& AddRoles(Role&& value) { m_rolesHasBeenSet = true; m_roles.push_back(value); return *this; }
309 
310  private:
311  Aws::String m_path;
312  bool m_pathHasBeenSet;
313  Aws::String m_instanceProfileName;
314  bool m_instanceProfileNameHasBeenSet;
315  Aws::String m_instanceProfileId;
316  bool m_instanceProfileIdHasBeenSet;
317  Aws::String m_arn;
318  bool m_arnHasBeenSet;
319  Aws::Utils::DateTime m_createDate;
320  bool m_createDateHasBeenSet;
321  Aws::Vector<Role> m_roles;
322  bool m_rolesHasBeenSet;
323  };
324 
325 } // namespace Model
326 } // namespace IAM
327 } // namespace Aws
const Aws::String & GetInstanceProfileName() const
void SetInstanceProfileId(const Aws::String &value)
void SetRoles(const Aws::Vector< Role > &value)
InstanceProfile & AddRoles(Role &&value)
InstanceProfile & WithInstanceProfileId(Aws::String &&value)
void SetCreateDate(const Aws::Utils::DateTime &value)
InstanceProfile & WithPath(const Aws::String &value)
const Aws::String & GetPath() const
const Aws::Utils::DateTime & GetCreateDate() const
InstanceProfile & WithInstanceProfileName(const Aws::String &value)
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
void SetArn(const char *value)
InstanceProfile & WithInstanceProfileName(const char *value)
void SetInstanceProfileId(const char *value)
void SetInstanceProfileName(const char *value)
const Aws::String & GetArn() const
InstanceProfile & WithInstanceProfileId(const char *value)
void SetArn(const Aws::String &value)
InstanceProfile & WithCreateDate(const Aws::Utils::DateTime &value)
const Aws::String & GetInstanceProfileId() const
InstanceProfile & WithInstanceProfileId(const Aws::String &value)
InstanceProfile & WithInstanceProfileName(Aws::String &&value)
InstanceProfile & WithArn(Aws::String &&value)
InstanceProfile & WithRoles(const Aws::Vector< Role > &value)
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
void SetPath(Aws::String &&value)
void SetInstanceProfileId(Aws::String &&value)
InstanceProfile & WithArn(const Aws::String &value)
InstanceProfile & WithRoles(Aws::Vector< Role > &&value)
InstanceProfile & WithCreateDate(Aws::Utils::DateTime &&value)
void SetCreateDate(Aws::Utils::DateTime &&value)
void SetInstanceProfileName(Aws::String &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
void SetInstanceProfileName(const Aws::String &value)
void SetRoles(Aws::Vector< Role > &&value)
InstanceProfile & WithPath(const char *value)
void SetArn(Aws::String &&value)
InstanceProfile & WithArn(const char *value)
#define AWS_IAM_API
Definition: IAM_EXPORTS.h:37
const Aws::Vector< Role > & GetRoles() const
InstanceProfile & WithPath(Aws::String &&value)
InstanceProfile & AddRoles(const Role &value)
void SetPath(const char *value)
void SetPath(const Aws::String &value)
JSON (JavaScript Object Notation).