AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
Credentials.h
1
6#pragma once
7#include <aws/sts/STS_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 <utility>
12
13namespace Aws
14{
15namespace Utils
16{
17namespace Xml
18{
19 class XmlNode;
20} // namespace Xml
21} // namespace Utils
22namespace STS
23{
24namespace Model
25{
26
34 {
35 public:
36 AWS_STS_API Credentials();
37 AWS_STS_API Credentials(const Aws::Utils::Xml::XmlNode& xmlNode);
38 AWS_STS_API Credentials& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
39
40 AWS_STS_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
41 AWS_STS_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
42
43
45
48 inline const Aws::String& GetAccessKeyId() const{ return m_accessKeyId; }
49 inline bool AccessKeyIdHasBeenSet() const { return m_accessKeyIdHasBeenSet; }
50 inline void SetAccessKeyId(const Aws::String& value) { m_accessKeyIdHasBeenSet = true; m_accessKeyId = value; }
51 inline void SetAccessKeyId(Aws::String&& value) { m_accessKeyIdHasBeenSet = true; m_accessKeyId = std::move(value); }
52 inline void SetAccessKeyId(const char* value) { m_accessKeyIdHasBeenSet = true; m_accessKeyId.assign(value); }
53 inline Credentials& WithAccessKeyId(const Aws::String& value) { SetAccessKeyId(value); return *this;}
54 inline Credentials& WithAccessKeyId(Aws::String&& value) { SetAccessKeyId(std::move(value)); return *this;}
55 inline Credentials& WithAccessKeyId(const char* value) { SetAccessKeyId(value); return *this;}
57
59
62 inline const Aws::String& GetSecretAccessKey() const{ return m_secretAccessKey; }
63 inline bool SecretAccessKeyHasBeenSet() const { return m_secretAccessKeyHasBeenSet; }
64 inline void SetSecretAccessKey(const Aws::String& value) { m_secretAccessKeyHasBeenSet = true; m_secretAccessKey = value; }
65 inline void SetSecretAccessKey(Aws::String&& value) { m_secretAccessKeyHasBeenSet = true; m_secretAccessKey = std::move(value); }
66 inline void SetSecretAccessKey(const char* value) { m_secretAccessKeyHasBeenSet = true; m_secretAccessKey.assign(value); }
67 inline Credentials& WithSecretAccessKey(const Aws::String& value) { SetSecretAccessKey(value); return *this;}
68 inline Credentials& WithSecretAccessKey(Aws::String&& value) { SetSecretAccessKey(std::move(value)); return *this;}
69 inline Credentials& WithSecretAccessKey(const char* value) { SetSecretAccessKey(value); return *this;}
71
73
77 inline const Aws::String& GetSessionToken() const{ return m_sessionToken; }
78 inline bool SessionTokenHasBeenSet() const { return m_sessionTokenHasBeenSet; }
79 inline void SetSessionToken(const Aws::String& value) { m_sessionTokenHasBeenSet = true; m_sessionToken = value; }
80 inline void SetSessionToken(Aws::String&& value) { m_sessionTokenHasBeenSet = true; m_sessionToken = std::move(value); }
81 inline void SetSessionToken(const char* value) { m_sessionTokenHasBeenSet = true; m_sessionToken.assign(value); }
82 inline Credentials& WithSessionToken(const Aws::String& value) { SetSessionToken(value); return *this;}
83 inline Credentials& WithSessionToken(Aws::String&& value) { SetSessionToken(std::move(value)); return *this;}
84 inline Credentials& WithSessionToken(const char* value) { SetSessionToken(value); return *this;}
86
88
91 inline const Aws::Utils::DateTime& GetExpiration() const{ return m_expiration; }
92 inline bool ExpirationHasBeenSet() const { return m_expirationHasBeenSet; }
93 inline void SetExpiration(const Aws::Utils::DateTime& value) { m_expirationHasBeenSet = true; m_expiration = value; }
94 inline void SetExpiration(Aws::Utils::DateTime&& value) { m_expirationHasBeenSet = true; m_expiration = std::move(value); }
95 inline Credentials& WithExpiration(const Aws::Utils::DateTime& value) { SetExpiration(value); return *this;}
96 inline Credentials& WithExpiration(Aws::Utils::DateTime&& value) { SetExpiration(std::move(value)); return *this;}
98 private:
99
100 Aws::String m_accessKeyId;
101 bool m_accessKeyIdHasBeenSet = false;
102
103 Aws::String m_secretAccessKey;
104 bool m_secretAccessKeyHasBeenSet = false;
105
106 Aws::String m_sessionToken;
107 bool m_sessionTokenHasBeenSet = false;
108
109 Aws::Utils::DateTime m_expiration;
110 bool m_expirationHasBeenSet = false;
111 };
112
113} // namespace Model
114} // namespace STS
115} // namespace Aws
AWS_STS_API Credentials & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetSecretAccessKey(Aws::String &&value)
Definition Credentials.h:65
bool SessionTokenHasBeenSet() const
Definition Credentials.h:78
void SetExpiration(const Aws::Utils::DateTime &value)
Definition Credentials.h:93
void SetSecretAccessKey(const Aws::String &value)
Definition Credentials.h:64
void SetAccessKeyId(const Aws::String &value)
Definition Credentials.h:50
bool AccessKeyIdHasBeenSet() const
Definition Credentials.h:49
void SetExpiration(Aws::Utils::DateTime &&value)
Definition Credentials.h:94
const Aws::String & GetSessionToken() const
Definition Credentials.h:77
Credentials & WithSecretAccessKey(const Aws::String &value)
Definition Credentials.h:67
void SetSessionToken(Aws::String &&value)
Definition Credentials.h:80
void SetSecretAccessKey(const char *value)
Definition Credentials.h:66
bool ExpirationHasBeenSet() const
Definition Credentials.h:92
Credentials & WithSessionToken(const char *value)
Definition Credentials.h:84
AWS_STS_API Credentials(const Aws::Utils::Xml::XmlNode &xmlNode)
AWS_STS_API void OutputToStream(Aws::OStream &oStream, const char *location) const
Credentials & WithSessionToken(Aws::String &&value)
Definition Credentials.h:83
Credentials & WithAccessKeyId(const char *value)
Definition Credentials.h:55
AWS_STS_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
Credentials & WithAccessKeyId(Aws::String &&value)
Definition Credentials.h:54
Credentials & WithExpiration(const Aws::Utils::DateTime &value)
Definition Credentials.h:95
const Aws::String & GetAccessKeyId() const
Definition Credentials.h:48
Credentials & WithSecretAccessKey(Aws::String &&value)
Definition Credentials.h:68
const Aws::String & GetSecretAccessKey() const
Definition Credentials.h:62
Credentials & WithSecretAccessKey(const char *value)
Definition Credentials.h:69
void SetSessionToken(const Aws::String &value)
Definition Credentials.h:79
Credentials & WithAccessKeyId(const Aws::String &value)
Definition Credentials.h:53
const Aws::Utils::DateTime & GetExpiration() const
Definition Credentials.h:91
void SetAccessKeyId(const char *value)
Definition Credentials.h:52
bool SecretAccessKeyHasBeenSet() const
Definition Credentials.h:63
void SetSessionToken(const char *value)
Definition Credentials.h:81
Credentials & WithSessionToken(const Aws::String &value)
Definition Credentials.h:82
Credentials & WithExpiration(Aws::Utils::DateTime &&value)
Definition Credentials.h:96
void SetAccessKeyId(Aws::String &&value)
Definition Credentials.h:51
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::basic_ostream< char, std::char_traits< char > > OStream