AWS SDK for C++  1.9.106
AWS SDK for C++
GetSessionTokenRequest.h
Go to the documentation of this file.
1 
6 #pragma once
7 #include <aws/sts/STS_EXPORTS.h>
8 #include <aws/sts/STSRequest.h>
10 #include <utility>
11 
12 namespace Aws
13 {
14 namespace STS
15 {
16 namespace Model
17 {
18 
22  {
23  public:
25 
26  // Service request name is the Operation name which will send this request out,
27  // each operation should has unique request name, so that we can get operation's name from this request.
28  // Note: this is not true for response, multiple operations may have the same response name,
29  // so we can not get operation's name from response.
30  inline virtual const char* GetServiceRequestName() const override { return "GetSessionToken"; }
31 
32  Aws::String SerializePayload() const override;
33 
34  protected:
35  void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
36 
37  public:
38 
47  inline int GetDurationSeconds() const{ return m_durationSeconds; }
48 
57  inline bool DurationSecondsHasBeenSet() const { return m_durationSecondsHasBeenSet; }
58 
67  inline void SetDurationSeconds(int value) { m_durationSecondsHasBeenSet = true; m_durationSeconds = value; }
68 
77  inline GetSessionTokenRequest& WithDurationSeconds(int value) { SetDurationSeconds(value); return *this;}
78 
79 
93  inline const Aws::String& GetSerialNumber() const{ return m_serialNumber; }
94 
108  inline bool SerialNumberHasBeenSet() const { return m_serialNumberHasBeenSet; }
109 
123  inline void SetSerialNumber(const Aws::String& value) { m_serialNumberHasBeenSet = true; m_serialNumber = value; }
124 
138  inline void SetSerialNumber(Aws::String&& value) { m_serialNumberHasBeenSet = true; m_serialNumber = std::move(value); }
139 
153  inline void SetSerialNumber(const char* value) { m_serialNumberHasBeenSet = true; m_serialNumber.assign(value); }
154 
168  inline GetSessionTokenRequest& WithSerialNumber(const Aws::String& value) { SetSerialNumber(value); return *this;}
169 
183  inline GetSessionTokenRequest& WithSerialNumber(Aws::String&& value) { SetSerialNumber(std::move(value)); return *this;}
184 
198  inline GetSessionTokenRequest& WithSerialNumber(const char* value) { SetSerialNumber(value); return *this;}
199 
200 
210  inline const Aws::String& GetTokenCode() const{ return m_tokenCode; }
211 
221  inline bool TokenCodeHasBeenSet() const { return m_tokenCodeHasBeenSet; }
222 
232  inline void SetTokenCode(const Aws::String& value) { m_tokenCodeHasBeenSet = true; m_tokenCode = value; }
233 
243  inline void SetTokenCode(Aws::String&& value) { m_tokenCodeHasBeenSet = true; m_tokenCode = std::move(value); }
244 
254  inline void SetTokenCode(const char* value) { m_tokenCodeHasBeenSet = true; m_tokenCode.assign(value); }
255 
265  inline GetSessionTokenRequest& WithTokenCode(const Aws::String& value) { SetTokenCode(value); return *this;}
266 
276  inline GetSessionTokenRequest& WithTokenCode(Aws::String&& value) { SetTokenCode(std::move(value)); return *this;}
277 
287  inline GetSessionTokenRequest& WithTokenCode(const char* value) { SetTokenCode(value); return *this;}
288 
289  private:
290 
291  int m_durationSeconds;
292  bool m_durationSecondsHasBeenSet;
293 
294  Aws::String m_serialNumber;
295  bool m_serialNumberHasBeenSet;
296 
297  Aws::String m_tokenCode;
298  bool m_tokenCodeHasBeenSet;
299  };
300 
301 } // namespace Model
302 } // namespace STS
303 } // namespace Aws
Aws::STS::STSRequest
Definition: STSRequest.h:17
Aws::Http::URI
Definition: URI.h:32
Aws::STS::Model::GetSessionTokenRequest::DurationSecondsHasBeenSet
bool DurationSecondsHasBeenSet() const
Definition: GetSessionTokenRequest.h:57
Aws::STS::Model::GetSessionTokenRequest::GetDurationSeconds
int GetDurationSeconds() const
Definition: GetSessionTokenRequest.h:47
Aws::STS::Model::GetSessionTokenRequest::SetSerialNumber
void SetSerialNumber(const Aws::String &value)
Definition: GetSessionTokenRequest.h:123
Aws::STS::Model::GetSessionTokenRequest::WithTokenCode
GetSessionTokenRequest & WithTokenCode(Aws::String &&value)
Definition: GetSessionTokenRequest.h:276
AWS_STS_API
#define AWS_STS_API
Definition: STS_EXPORTS.h:28
Aws::STS::Model::GetSessionTokenRequest::GetTokenCode
const Aws::String & GetTokenCode() const
Definition: GetSessionTokenRequest.h:210
Aws::STS::Model::GetSessionTokenRequest::WithSerialNumber
GetSessionTokenRequest & WithSerialNumber(const Aws::String &value)
Definition: GetSessionTokenRequest.h:168
Aws::STS::Model::GetSessionTokenRequest::WithTokenCode
GetSessionTokenRequest & WithTokenCode(const char *value)
Definition: GetSessionTokenRequest.h:287
Aws::STS::Model::GetSessionTokenRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: GetSessionTokenRequest.h:30
Aws::STS::Model::GetSessionTokenRequest
Definition: GetSessionTokenRequest.h:22
Aws::STS::Model::GetSessionTokenRequest::SerializePayload
Aws::String SerializePayload() const override
Aws::STS::Model::GetSessionTokenRequest::WithTokenCode
GetSessionTokenRequest & WithTokenCode(const Aws::String &value)
Definition: GetSessionTokenRequest.h:265
Aws::STS::Model::GetSessionTokenRequest::SetDurationSeconds
void SetDurationSeconds(int value)
Definition: GetSessionTokenRequest.h:67
STS_EXPORTS.h
Aws::STS::Model::GetSessionTokenRequest::SetSerialNumber
void SetSerialNumber(Aws::String &&value)
Definition: GetSessionTokenRequest.h:138
Aws::STS::Model::GetSessionTokenRequest::DumpBodyToUrl
void DumpBodyToUrl(Aws::Http::URI &uri) const override
AWSString.h
Aws::STS::Model::GetSessionTokenRequest::SetSerialNumber
void SetSerialNumber(const char *value)
Definition: GetSessionTokenRequest.h:153
Aws::STS::Model::GetSessionTokenRequest::SerialNumberHasBeenSet
bool SerialNumberHasBeenSet() const
Definition: GetSessionTokenRequest.h:108
Aws::STS::Model::GetSessionTokenRequest::WithSerialNumber
GetSessionTokenRequest & WithSerialNumber(Aws::String &&value)
Definition: GetSessionTokenRequest.h:183
Aws::STS::Model::GetSessionTokenRequest::WithSerialNumber
GetSessionTokenRequest & WithSerialNumber(const char *value)
Definition: GetSessionTokenRequest.h:198
Aws::STS::Model::GetSessionTokenRequest::SetTokenCode
void SetTokenCode(const char *value)
Definition: GetSessionTokenRequest.h:254
Aws::STS::Model::GetSessionTokenRequest::TokenCodeHasBeenSet
bool TokenCodeHasBeenSet() const
Definition: GetSessionTokenRequest.h:221
Aws::STS::Model::GetSessionTokenRequest::GetSessionTokenRequest
GetSessionTokenRequest()
Aws
Definition: AccessManagementClient.h:15
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::STS::Model::GetSessionTokenRequest::SetTokenCode
void SetTokenCode(Aws::String &&value)
Definition: GetSessionTokenRequest.h:243
Aws::STS::Model::GetSessionTokenRequest::WithDurationSeconds
GetSessionTokenRequest & WithDurationSeconds(int value)
Definition: GetSessionTokenRequest.h:77
Aws::STS::Model::GetSessionTokenRequest::SetTokenCode
void SetTokenCode(const Aws::String &value)
Definition: GetSessionTokenRequest.h:232
Aws::STS::Model::GetSessionTokenRequest::GetSerialNumber
const Aws::String & GetSerialNumber() const
Definition: GetSessionTokenRequest.h:93
STSRequest.h