AWS SDK for C++  1.9.104
AWS SDK for C++
Credentials.h
Go to the documentation of this file.
1 
6 #pragma once
7 #include <aws/sts/STS_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 STS
23 {
24 namespace Model
25 {
26 
34  {
35  public:
39 
40  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
41  void OutputToStream(Aws::OStream& oStream, const char* location) const;
42 
43 
47  inline const Aws::String& GetAccessKeyId() const{ return m_accessKeyId; }
48 
52  inline bool AccessKeyIdHasBeenSet() const { return m_accessKeyIdHasBeenSet; }
53 
57  inline void SetAccessKeyId(const Aws::String& value) { m_accessKeyIdHasBeenSet = true; m_accessKeyId = value; }
58 
62  inline void SetAccessKeyId(Aws::String&& value) { m_accessKeyIdHasBeenSet = true; m_accessKeyId = std::move(value); }
63 
67  inline void SetAccessKeyId(const char* value) { m_accessKeyIdHasBeenSet = true; m_accessKeyId.assign(value); }
68 
72  inline Credentials& WithAccessKeyId(const Aws::String& value) { SetAccessKeyId(value); return *this;}
73 
77  inline Credentials& WithAccessKeyId(Aws::String&& value) { SetAccessKeyId(std::move(value)); return *this;}
78 
82  inline Credentials& WithAccessKeyId(const char* value) { SetAccessKeyId(value); return *this;}
83 
84 
88  inline const Aws::String& GetSecretAccessKey() const{ return m_secretAccessKey; }
89 
93  inline bool SecretAccessKeyHasBeenSet() const { return m_secretAccessKeyHasBeenSet; }
94 
98  inline void SetSecretAccessKey(const Aws::String& value) { m_secretAccessKeyHasBeenSet = true; m_secretAccessKey = value; }
99 
103  inline void SetSecretAccessKey(Aws::String&& value) { m_secretAccessKeyHasBeenSet = true; m_secretAccessKey = std::move(value); }
104 
108  inline void SetSecretAccessKey(const char* value) { m_secretAccessKeyHasBeenSet = true; m_secretAccessKey.assign(value); }
109 
113  inline Credentials& WithSecretAccessKey(const Aws::String& value) { SetSecretAccessKey(value); return *this;}
114 
118  inline Credentials& WithSecretAccessKey(Aws::String&& value) { SetSecretAccessKey(std::move(value)); return *this;}
119 
123  inline Credentials& WithSecretAccessKey(const char* value) { SetSecretAccessKey(value); return *this;}
124 
125 
130  inline const Aws::String& GetSessionToken() const{ return m_sessionToken; }
131 
136  inline bool SessionTokenHasBeenSet() const { return m_sessionTokenHasBeenSet; }
137 
142  inline void SetSessionToken(const Aws::String& value) { m_sessionTokenHasBeenSet = true; m_sessionToken = value; }
143 
148  inline void SetSessionToken(Aws::String&& value) { m_sessionTokenHasBeenSet = true; m_sessionToken = std::move(value); }
149 
154  inline void SetSessionToken(const char* value) { m_sessionTokenHasBeenSet = true; m_sessionToken.assign(value); }
155 
160  inline Credentials& WithSessionToken(const Aws::String& value) { SetSessionToken(value); return *this;}
161 
166  inline Credentials& WithSessionToken(Aws::String&& value) { SetSessionToken(std::move(value)); return *this;}
167 
172  inline Credentials& WithSessionToken(const char* value) { SetSessionToken(value); return *this;}
173 
174 
178  inline const Aws::Utils::DateTime& GetExpiration() const{ return m_expiration; }
179 
183  inline bool ExpirationHasBeenSet() const { return m_expirationHasBeenSet; }
184 
188  inline void SetExpiration(const Aws::Utils::DateTime& value) { m_expirationHasBeenSet = true; m_expiration = value; }
189 
193  inline void SetExpiration(Aws::Utils::DateTime&& value) { m_expirationHasBeenSet = true; m_expiration = std::move(value); }
194 
198  inline Credentials& WithExpiration(const Aws::Utils::DateTime& value) { SetExpiration(value); return *this;}
199 
203  inline Credentials& WithExpiration(Aws::Utils::DateTime&& value) { SetExpiration(std::move(value)); return *this;}
204 
205  private:
206 
207  Aws::String m_accessKeyId;
208  bool m_accessKeyIdHasBeenSet;
209 
210  Aws::String m_secretAccessKey;
211  bool m_secretAccessKeyHasBeenSet;
212 
213  Aws::String m_sessionToken;
214  bool m_sessionTokenHasBeenSet;
215 
216  Aws::Utils::DateTime m_expiration;
217  bool m_expirationHasBeenSet;
218  };
219 
220 } // namespace Model
221 } // namespace STS
222 } // namespace Aws
Aws::Utils::DateTime
Definition: DateTime.h:55
Aws::STS::Model::Credentials
Definition: Credentials.h:34
Aws::STS::Model::Credentials::GetSessionToken
const Aws::String & GetSessionToken() const
Definition: Credentials.h:130
Aws::STS::Model::Credentials::SetSessionToken
void SetSessionToken(Aws::String &&value)
Definition: Credentials.h:148
Aws::STS::Model::Credentials::WithExpiration
Credentials & WithExpiration(Aws::Utils::DateTime &&value)
Definition: Credentials.h:203
Aws::STS::Model::Credentials::SetAccessKeyId
void SetAccessKeyId(const Aws::String &value)
Definition: Credentials.h:57
Aws::STS::Model::Credentials::Credentials
Credentials(const Aws::Utils::Xml::XmlNode &xmlNode)
Aws::STS::Model::Credentials::OutputToStream
void OutputToStream(Aws::OStream &oStream, const char *location) const
Aws::STS::Model::Credentials::SetSessionToken
void SetSessionToken(const char *value)
Definition: Credentials.h:154
Aws::STS::Model::Credentials::WithSessionToken
Credentials & WithSessionToken(const char *value)
Definition: Credentials.h:172
DateTime.h
AWS_STS_API
#define AWS_STS_API
Definition: STS_EXPORTS.h:28
Aws::STS::Model::Credentials::SetSessionToken
void SetSessionToken(const Aws::String &value)
Definition: Credentials.h:142
AWSStreamFwd.h
Aws::STS::Model::Credentials::AccessKeyIdHasBeenSet
bool AccessKeyIdHasBeenSet() const
Definition: Credentials.h:52
Aws::STS::Model::Credentials::SetExpiration
void SetExpiration(const Aws::Utils::DateTime &value)
Definition: Credentials.h:188
Aws::STS::Model::Credentials::SetSecretAccessKey
void SetSecretAccessKey(Aws::String &&value)
Definition: Credentials.h:103
Aws::STS::Model::Credentials::SecretAccessKeyHasBeenSet
bool SecretAccessKeyHasBeenSet() const
Definition: Credentials.h:93
Aws::STS::Model::Credentials::SetExpiration
void SetExpiration(Aws::Utils::DateTime &&value)
Definition: Credentials.h:193
Aws::STS::Model::Credentials::WithAccessKeyId
Credentials & WithAccessKeyId(Aws::String &&value)
Definition: Credentials.h:77
Aws::OStream
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:21
Aws::STS::Model::Credentials::WithSecretAccessKey
Credentials & WithSecretAccessKey(const Aws::String &value)
Definition: Credentials.h:113
Aws::STS::Model::Credentials::SetAccessKeyId
void SetAccessKeyId(const char *value)
Definition: Credentials.h:67
Aws::STS::Model::Credentials::SessionTokenHasBeenSet
bool SessionTokenHasBeenSet() const
Definition: Credentials.h:136
Aws::Utils::Xml::XmlNode
Definition: XmlSerializer.h:53
Aws::STS::Model::Credentials::Credentials
Credentials()
STS_EXPORTS.h
Aws::STS::Model::Credentials::OutputToStream
void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
Aws::STS::Model::Credentials::WithSecretAccessKey
Credentials & WithSecretAccessKey(const char *value)
Definition: Credentials.h:123
Aws::STS::Model::Credentials::operator=
Credentials & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
Aws::STS::Model::Credentials::WithSessionToken
Credentials & WithSessionToken(Aws::String &&value)
Definition: Credentials.h:166
AWSString.h
Aws::STS::Model::Credentials::WithExpiration
Credentials & WithExpiration(const Aws::Utils::DateTime &value)
Definition: Credentials.h:198
Aws::STS::Model::Credentials::GetExpiration
const Aws::Utils::DateTime & GetExpiration() const
Definition: Credentials.h:178
Aws::STS::Model::Credentials::ExpirationHasBeenSet
bool ExpirationHasBeenSet() const
Definition: Credentials.h:183
Aws::STS::Model::Credentials::SetAccessKeyId
void SetAccessKeyId(Aws::String &&value)
Definition: Credentials.h:62
Aws::STS::Model::Credentials::GetAccessKeyId
const Aws::String & GetAccessKeyId() const
Definition: Credentials.h:47
Aws::STS::Model::Credentials::SetSecretAccessKey
void SetSecretAccessKey(const char *value)
Definition: Credentials.h:108
Aws::STS::Model::Credentials::WithAccessKeyId
Credentials & WithAccessKeyId(const char *value)
Definition: Credentials.h:82
Aws
Definition: AccessManagementClient.h:15
Aws::STS::Model::Credentials::WithSecretAccessKey
Credentials & WithSecretAccessKey(Aws::String &&value)
Definition: Credentials.h:118
Aws::STS::Model::Credentials::GetSecretAccessKey
const Aws::String & GetSecretAccessKey() const
Definition: Credentials.h:88
Aws::STS::Model::Credentials::WithSessionToken
Credentials & WithSessionToken(const Aws::String &value)
Definition: Credentials.h:160
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::STS::Model::Credentials::SetSecretAccessKey
void SetSecretAccessKey(const Aws::String &value)
Definition: Credentials.h:98
index
int index
Definition: cJSON.h:181
Aws::STS::Model::Credentials::WithAccessKeyId
Credentials & WithAccessKeyId(const Aws::String &value)
Definition: Credentials.h:72