AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
GetSessionTokenRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/sts/STSRequest.h>
9#include <aws/sts/STS_EXPORTS.h>
10
11#include <utility>
12
13namespace Aws {
14namespace STS {
15namespace Model {
16
20 public:
21 AWS_STS_API GetSessionTokenRequest() = default;
22
23 // Service request name is the Operation name which will send this request out,
24 // each operation should has unique request name, so that we can get operation's name from this request.
25 // Note: this is not true for response, multiple operations may have the same response name,
26 // so we can not get operation's name from response.
27 inline virtual const char* GetServiceRequestName() const override { return "GetSessionToken"; }
28
29 AWS_STS_API Aws::String SerializePayload() const override;
30
31 protected:
32 AWS_STS_API void DumpBodyToUrl(Aws::Http::URI& uri) const override;
33
34 public:
36
44 inline int GetDurationSeconds() const { return m_durationSeconds; }
45 inline bool DurationSecondsHasBeenSet() const { return m_durationSecondsHasBeenSet; }
46 inline void SetDurationSeconds(int value) {
47 m_durationSecondsHasBeenSet = true;
48 m_durationSeconds = value;
49 }
51 SetDurationSeconds(value);
52 return *this;
53 }
55
57
70 inline const Aws::String& GetSerialNumber() const { return m_serialNumber; }
71 inline bool SerialNumberHasBeenSet() const { return m_serialNumberHasBeenSet; }
72 template <typename SerialNumberT = Aws::String>
73 void SetSerialNumber(SerialNumberT&& value) {
74 m_serialNumberHasBeenSet = true;
75 m_serialNumber = std::forward<SerialNumberT>(value);
76 }
77 template <typename SerialNumberT = Aws::String>
78 GetSessionTokenRequest& WithSerialNumber(SerialNumberT&& value) {
79 SetSerialNumber(std::forward<SerialNumberT>(value));
80 return *this;
81 }
83
85
94 inline const Aws::String& GetTokenCode() const { return m_tokenCode; }
95 inline bool TokenCodeHasBeenSet() const { return m_tokenCodeHasBeenSet; }
96 template <typename TokenCodeT = Aws::String>
97 void SetTokenCode(TokenCodeT&& value) {
98 m_tokenCodeHasBeenSet = true;
99 m_tokenCode = std::forward<TokenCodeT>(value);
100 }
101 template <typename TokenCodeT = Aws::String>
103 SetTokenCode(std::forward<TokenCodeT>(value));
104 return *this;
105 }
107 private:
108 int m_durationSeconds{0};
109
110 Aws::String m_serialNumber;
111
112 Aws::String m_tokenCode;
113 bool m_durationSecondsHasBeenSet = false;
114 bool m_serialNumberHasBeenSet = false;
115 bool m_tokenCodeHasBeenSet = false;
116};
117
118} // namespace Model
119} // namespace STS
120} // namespace Aws
GetSessionTokenRequest & WithTokenCode(TokenCodeT &&value)
virtual const char * GetServiceRequestName() const override
GetSessionTokenRequest & WithSerialNumber(SerialNumberT &&value)
AWS_STS_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
GetSessionTokenRequest & WithDurationSeconds(int value)
AWS_STS_API Aws::String SerializePayload() const override
AWS_STS_API GetSessionTokenRequest()=default
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String