AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
SessionCredentials.h
1
6#pragma once
7#include <aws/s3/S3_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 S3
22{
23namespace Model
24{
25
35 {
36 public:
37 AWS_S3_API SessionCredentials();
38 AWS_S3_API SessionCredentials(const Aws::Utils::Xml::XmlNode& xmlNode);
40
41 AWS_S3_API void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const;
42
43
45
50 inline const Aws::String& GetAccessKeyId() const{ return m_accessKeyId; }
51 inline bool AccessKeyIdHasBeenSet() const { return m_accessKeyIdHasBeenSet; }
52 inline void SetAccessKeyId(const Aws::String& value) { m_accessKeyIdHasBeenSet = true; m_accessKeyId = value; }
53 inline void SetAccessKeyId(Aws::String&& value) { m_accessKeyIdHasBeenSet = true; m_accessKeyId = std::move(value); }
54 inline void SetAccessKeyId(const char* value) { m_accessKeyIdHasBeenSet = true; m_accessKeyId.assign(value); }
55 inline SessionCredentials& WithAccessKeyId(const Aws::String& value) { SetAccessKeyId(value); return *this;}
56 inline SessionCredentials& WithAccessKeyId(Aws::String&& value) { SetAccessKeyId(std::move(value)); return *this;}
57 inline SessionCredentials& WithAccessKeyId(const char* value) { SetAccessKeyId(value); return *this;}
59
61
66 inline const Aws::String& GetSecretAccessKey() const{ return m_secretAccessKey; }
67 inline bool SecretAccessKeyHasBeenSet() const { return m_secretAccessKeyHasBeenSet; }
68 inline void SetSecretAccessKey(const Aws::String& value) { m_secretAccessKeyHasBeenSet = true; m_secretAccessKey = value; }
69 inline void SetSecretAccessKey(Aws::String&& value) { m_secretAccessKeyHasBeenSet = true; m_secretAccessKey = std::move(value); }
70 inline void SetSecretAccessKey(const char* value) { m_secretAccessKeyHasBeenSet = true; m_secretAccessKey.assign(value); }
71 inline SessionCredentials& WithSecretAccessKey(const Aws::String& value) { SetSecretAccessKey(value); return *this;}
72 inline SessionCredentials& WithSecretAccessKey(Aws::String&& value) { SetSecretAccessKey(std::move(value)); return *this;}
73 inline SessionCredentials& WithSecretAccessKey(const char* value) { SetSecretAccessKey(value); return *this;}
75
77
81 inline const Aws::String& GetSessionToken() const{ return m_sessionToken; }
82 inline bool SessionTokenHasBeenSet() const { return m_sessionTokenHasBeenSet; }
83 inline void SetSessionToken(const Aws::String& value) { m_sessionTokenHasBeenSet = true; m_sessionToken = value; }
84 inline void SetSessionToken(Aws::String&& value) { m_sessionTokenHasBeenSet = true; m_sessionToken = std::move(value); }
85 inline void SetSessionToken(const char* value) { m_sessionTokenHasBeenSet = true; m_sessionToken.assign(value); }
86 inline SessionCredentials& WithSessionToken(const Aws::String& value) { SetSessionToken(value); return *this;}
87 inline SessionCredentials& WithSessionToken(Aws::String&& value) { SetSessionToken(std::move(value)); return *this;}
88 inline SessionCredentials& WithSessionToken(const char* value) { SetSessionToken(value); return *this;}
90
92
99 inline const Aws::Utils::DateTime& GetExpiration() const{ return m_expiration; }
100 inline bool ExpirationHasBeenSet() const { return m_expirationHasBeenSet; }
101 inline void SetExpiration(const Aws::Utils::DateTime& value) { m_expirationHasBeenSet = true; m_expiration = value; }
102 inline void SetExpiration(Aws::Utils::DateTime&& value) { m_expirationHasBeenSet = true; m_expiration = std::move(value); }
103 inline SessionCredentials& WithExpiration(const Aws::Utils::DateTime& value) { SetExpiration(value); return *this;}
104 inline SessionCredentials& WithExpiration(Aws::Utils::DateTime&& value) { SetExpiration(std::move(value)); return *this;}
106 private:
107
108 Aws::String m_accessKeyId;
109 bool m_accessKeyIdHasBeenSet = false;
110
111 Aws::String m_secretAccessKey;
112 bool m_secretAccessKeyHasBeenSet = false;
113
114 Aws::String m_sessionToken;
115 bool m_sessionTokenHasBeenSet = false;
116
117 Aws::Utils::DateTime m_expiration;
118 bool m_expirationHasBeenSet = false;
119 };
120
121} // namespace Model
122} // namespace S3
123} // namespace Aws
SessionCredentials & WithExpiration(const Aws::Utils::DateTime &value)
const Aws::String & GetAccessKeyId() const
void SetAccessKeyId(const char *value)
void SetSessionToken(const Aws::String &value)
AWS_S3_API SessionCredentials & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
SessionCredentials & WithSecretAccessKey(const Aws::String &value)
SessionCredentials & WithSessionToken(Aws::String &&value)
void SetAccessKeyId(Aws::String &&value)
void SetSessionToken(Aws::String &&value)
SessionCredentials & WithAccessKeyId(Aws::String &&value)
void SetAccessKeyId(const Aws::String &value)
SessionCredentials & WithSecretAccessKey(const char *value)
SessionCredentials & WithAccessKeyId(const Aws::String &value)
void SetSecretAccessKey(const Aws::String &value)
const Aws::Utils::DateTime & GetExpiration() const
AWS_S3_API SessionCredentials(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetExpiration(const Aws::Utils::DateTime &value)
SessionCredentials & WithSecretAccessKey(Aws::String &&value)
void SetSecretAccessKey(Aws::String &&value)
SessionCredentials & WithExpiration(Aws::Utils::DateTime &&value)
void SetExpiration(Aws::Utils::DateTime &&value)
AWS_S3_API void AddToNode(Aws::Utils::Xml::XmlNode &parentNode) const
SessionCredentials & WithSessionToken(const char *value)
void SetSessionToken(const char *value)
void SetSecretAccessKey(const char *value)
SessionCredentials & WithAccessKeyId(const char *value)
const Aws::String & GetSecretAccessKey() const
SessionCredentials & WithSessionToken(const Aws::String &value)
const Aws::String & GetSessionToken() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String