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/s3control/S3Control_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/DateTime.h>
10#include <utility>
11
12namespace Aws
13{
14namespace Utils
15{
16namespace Xml
17{
18 class XmlNode;
19} // namespace Xml
20} // namespace Utils
21namespace S3Control
22{
23namespace Model
24{
25
34 {
35 public:
36 AWS_S3CONTROL_API Credentials();
37 AWS_S3CONTROL_API Credentials(const Aws::Utils::Xml::XmlNode& xmlNode);
38 AWS_S3CONTROL_API Credentials& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
39
40 AWS_S3CONTROL_API void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const;
41
42
44
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
63 inline const Aws::String& GetSecretAccessKey() const{ return m_secretAccessKey; }
64 inline bool SecretAccessKeyHasBeenSet() const { return m_secretAccessKeyHasBeenSet; }
65 inline void SetSecretAccessKey(const Aws::String& value) { m_secretAccessKeyHasBeenSet = true; m_secretAccessKey = value; }
66 inline void SetSecretAccessKey(Aws::String&& value) { m_secretAccessKeyHasBeenSet = true; m_secretAccessKey = std::move(value); }
67 inline void SetSecretAccessKey(const char* value) { m_secretAccessKeyHasBeenSet = true; m_secretAccessKey.assign(value); }
68 inline Credentials& WithSecretAccessKey(const Aws::String& value) { SetSecretAccessKey(value); return *this;}
69 inline Credentials& WithSecretAccessKey(Aws::String&& value) { SetSecretAccessKey(std::move(value)); return *this;}
70 inline Credentials& WithSecretAccessKey(const char* value) { SetSecretAccessKey(value); return *this;}
72
74
78 inline const Aws::String& GetSessionToken() const{ return m_sessionToken; }
79 inline bool SessionTokenHasBeenSet() const { return m_sessionTokenHasBeenSet; }
80 inline void SetSessionToken(const Aws::String& value) { m_sessionTokenHasBeenSet = true; m_sessionToken = value; }
81 inline void SetSessionToken(Aws::String&& value) { m_sessionTokenHasBeenSet = true; m_sessionToken = std::move(value); }
82 inline void SetSessionToken(const char* value) { m_sessionTokenHasBeenSet = true; m_sessionToken.assign(value); }
83 inline Credentials& WithSessionToken(const Aws::String& value) { SetSessionToken(value); return *this;}
84 inline Credentials& WithSessionToken(Aws::String&& value) { SetSessionToken(std::move(value)); return *this;}
85 inline Credentials& WithSessionToken(const char* value) { SetSessionToken(value); return *this;}
87
89
93 inline const Aws::Utils::DateTime& GetExpiration() const{ return m_expiration; }
94 inline bool ExpirationHasBeenSet() const { return m_expirationHasBeenSet; }
95 inline void SetExpiration(const Aws::Utils::DateTime& value) { m_expirationHasBeenSet = true; m_expiration = value; }
96 inline void SetExpiration(Aws::Utils::DateTime&& value) { m_expirationHasBeenSet = true; m_expiration = std::move(value); }
97 inline Credentials& WithExpiration(const Aws::Utils::DateTime& value) { SetExpiration(value); return *this;}
98 inline Credentials& WithExpiration(Aws::Utils::DateTime&& value) { SetExpiration(std::move(value)); return *this;}
100 private:
101
102 Aws::String m_accessKeyId;
103 bool m_accessKeyIdHasBeenSet = false;
104
105 Aws::String m_secretAccessKey;
106 bool m_secretAccessKeyHasBeenSet = false;
107
108 Aws::String m_sessionToken;
109 bool m_sessionTokenHasBeenSet = false;
110
111 Aws::Utils::DateTime m_expiration;
112 bool m_expirationHasBeenSet = false;
113 };
114
115} // namespace Model
116} // namespace S3Control
117} // namespace Aws
Credentials & WithSecretAccessKey(Aws::String &&value)
Definition Credentials.h:69
void SetAccessKeyId(const Aws::String &value)
Definition Credentials.h:50
Credentials & WithAccessKeyId(Aws::String &&value)
Definition Credentials.h:54
void SetSessionToken(const Aws::String &value)
Definition Credentials.h:80
void SetSessionToken(const char *value)
Definition Credentials.h:82
const Aws::String & GetAccessKeyId() const
Definition Credentials.h:48
AWS_S3CONTROL_API Credentials(const Aws::Utils::Xml::XmlNode &xmlNode)
Credentials & WithSessionToken(const char *value)
Definition Credentials.h:85
void SetSecretAccessKey(const Aws::String &value)
Definition Credentials.h:65
Credentials & WithSecretAccessKey(const Aws::String &value)
Definition Credentials.h:68
Credentials & WithAccessKeyId(const char *value)
Definition Credentials.h:55
void SetAccessKeyId(Aws::String &&value)
Definition Credentials.h:51
const Aws::String & GetSecretAccessKey() const
Definition Credentials.h:63
const Aws::String & GetSessionToken() const
Definition Credentials.h:78
Credentials & WithSessionToken(const Aws::String &value)
Definition Credentials.h:83
AWS_S3CONTROL_API Credentials & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetSecretAccessKey(const char *value)
Definition Credentials.h:67
Credentials & WithSessionToken(Aws::String &&value)
Definition Credentials.h:84
Credentials & WithAccessKeyId(const Aws::String &value)
Definition Credentials.h:53
Credentials & WithSecretAccessKey(const char *value)
Definition Credentials.h:70
void SetExpiration(Aws::Utils::DateTime &&value)
Definition Credentials.h:96
void SetAccessKeyId(const char *value)
Definition Credentials.h:52
const Aws::Utils::DateTime & GetExpiration() const
Definition Credentials.h:93
void SetSecretAccessKey(Aws::String &&value)
Definition Credentials.h:66
void SetExpiration(const Aws::Utils::DateTime &value)
Definition Credentials.h:95
AWS_S3CONTROL_API void AddToNode(Aws::Utils::Xml::XmlNode &parentNode) const
Credentials & WithExpiration(Aws::Utils::DateTime &&value)
Definition Credentials.h:98
void SetSessionToken(Aws::String &&value)
Definition Credentials.h:81
Credentials & WithExpiration(const Aws::Utils::DateTime &value)
Definition Credentials.h:97
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String