AWS SDK for C++  0.14.3
AWS SDK for C++
TemporaryCredential.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
18 
19 namespace Aws
20 {
21 namespace Utils
22 {
23 namespace Json
24 {
25  class JsonValue;
26 } // namespace Json
27 } // namespace Utils
28 namespace OpsWorks
29 {
30 namespace Model
31 {
32 
38  {
39  public:
42  TemporaryCredential& operator=(const Aws::Utils::Json::JsonValue& jsonValue);
43  Aws::Utils::Json::JsonValue Jsonize() const;
44 
48  inline const Aws::String& GetUsername() const{ return m_username; }
49 
53  inline void SetUsername(const Aws::String& value) { m_usernameHasBeenSet = true; m_username = value; }
54 
58  inline void SetUsername(Aws::String&& value) { m_usernameHasBeenSet = true; m_username = value; }
59 
63  inline void SetUsername(const char* value) { m_usernameHasBeenSet = true; m_username.assign(value); }
64 
68  inline TemporaryCredential& WithUsername(const Aws::String& value) { SetUsername(value); return *this;}
69 
73  inline TemporaryCredential& WithUsername(Aws::String&& value) { SetUsername(value); return *this;}
74 
78  inline TemporaryCredential& WithUsername(const char* value) { SetUsername(value); return *this;}
79 
83  inline const Aws::String& GetPassword() const{ return m_password; }
84 
88  inline void SetPassword(const Aws::String& value) { m_passwordHasBeenSet = true; m_password = value; }
89 
93  inline void SetPassword(Aws::String&& value) { m_passwordHasBeenSet = true; m_password = value; }
94 
98  inline void SetPassword(const char* value) { m_passwordHasBeenSet = true; m_password.assign(value); }
99 
103  inline TemporaryCredential& WithPassword(const Aws::String& value) { SetPassword(value); return *this;}
104 
108  inline TemporaryCredential& WithPassword(Aws::String&& value) { SetPassword(value); return *this;}
109 
113  inline TemporaryCredential& WithPassword(const char* value) { SetPassword(value); return *this;}
114 
121  inline int GetValidForInMinutes() const{ return m_validForInMinutes; }
122 
129  inline void SetValidForInMinutes(int value) { m_validForInMinutesHasBeenSet = true; m_validForInMinutes = value; }
130 
137  inline TemporaryCredential& WithValidForInMinutes(int value) { SetValidForInMinutes(value); return *this;}
138 
142  inline const Aws::String& GetInstanceId() const{ return m_instanceId; }
143 
147  inline void SetInstanceId(const Aws::String& value) { m_instanceIdHasBeenSet = true; m_instanceId = value; }
148 
152  inline void SetInstanceId(Aws::String&& value) { m_instanceIdHasBeenSet = true; m_instanceId = value; }
153 
157  inline void SetInstanceId(const char* value) { m_instanceIdHasBeenSet = true; m_instanceId.assign(value); }
158 
162  inline TemporaryCredential& WithInstanceId(const Aws::String& value) { SetInstanceId(value); return *this;}
163 
167  inline TemporaryCredential& WithInstanceId(Aws::String&& value) { SetInstanceId(value); return *this;}
168 
172  inline TemporaryCredential& WithInstanceId(const char* value) { SetInstanceId(value); return *this;}
173 
174  private:
175  Aws::String m_username;
176  bool m_usernameHasBeenSet;
177  Aws::String m_password;
178  bool m_passwordHasBeenSet;
179  int m_validForInMinutes;
180  bool m_validForInMinutesHasBeenSet;
181  Aws::String m_instanceId;
182  bool m_instanceIdHasBeenSet;
183  };
184 
185 } // namespace Model
186 } // namespace OpsWorks
187 } // namespace Aws
TemporaryCredential & WithPassword(const char *value)
TemporaryCredential & WithInstanceId(const char *value)
TemporaryCredential & WithUsername(const Aws::String &value)
TemporaryCredential & WithInstanceId(Aws::String &&value)
const Aws::String & GetInstanceId() const
TemporaryCredential & WithUsername(const char *value)
TemporaryCredential & WithPassword(const Aws::String &value)
TemporaryCredential & WithInstanceId(const Aws::String &value)
const Aws::String & GetUsername() const
void SetInstanceId(const Aws::String &value)
void SetPassword(const Aws::String &value)
TemporaryCredential & WithPassword(Aws::String &&value)
const Aws::String & GetPassword() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
#define AWS_OPSWORKS_API
void SetUsername(const Aws::String &value)
TemporaryCredential & WithUsername(Aws::String &&value)
TemporaryCredential & WithValidForInMinutes(int value)
JSON (JavaScript Object Notation).