AWS SDK for C++

AWS SDK for C++ Version 1.11.942

Loading...
Searching...
No Matches
Session.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/workspaces-web/WorkSpacesWeb_EXPORTS.h>
11#include <aws/workspaces-web/model/SessionStatus.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Json {
18class JsonValue;
19class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace WorkSpacesWeb {
23namespace Model {
24
30class Session {
31 public:
32 AWS_WORKSPACESWEB_API Session() = default;
33 AWS_WORKSPACESWEB_API Session(Aws::Utils::Json::JsonView jsonValue);
34 AWS_WORKSPACESWEB_API Session& operator=(Aws::Utils::Json::JsonView jsonValue);
35 AWS_WORKSPACESWEB_API Aws::Utils::Json::JsonValue Jsonize() const;
36
38
41 inline const Aws::String& GetPortalArn() const { return m_portalArn; }
42 inline bool PortalArnHasBeenSet() const { return m_portalArnHasBeenSet; }
43 template <typename PortalArnT = Aws::String>
44 void SetPortalArn(PortalArnT&& value) {
45 m_portalArnHasBeenSet = true;
46 m_portalArn = std::forward<PortalArnT>(value);
47 }
48 template <typename PortalArnT = Aws::String>
49 Session& WithPortalArn(PortalArnT&& value) {
50 SetPortalArn(std::forward<PortalArnT>(value));
51 return *this;
52 }
54
56
59 inline const Aws::String& GetSessionId() const { return m_sessionId; }
60 inline bool SessionIdHasBeenSet() const { return m_sessionIdHasBeenSet; }
61 template <typename SessionIdT = Aws::String>
62 void SetSessionId(SessionIdT&& value) {
63 m_sessionIdHasBeenSet = true;
64 m_sessionId = std::forward<SessionIdT>(value);
65 }
66 template <typename SessionIdT = Aws::String>
67 Session& WithSessionId(SessionIdT&& value) {
68 SetSessionId(std::forward<SessionIdT>(value));
69 return *this;
70 }
72
74
77 inline const Aws::String& GetUsername() const { return m_username; }
78 inline bool UsernameHasBeenSet() const { return m_usernameHasBeenSet; }
79 template <typename UsernameT = Aws::String>
80 void SetUsername(UsernameT&& value) {
81 m_usernameHasBeenSet = true;
82 m_username = std::forward<UsernameT>(value);
83 }
84 template <typename UsernameT = Aws::String>
85 Session& WithUsername(UsernameT&& value) {
86 SetUsername(std::forward<UsernameT>(value));
87 return *this;
88 }
90
92
95 inline const Aws::Vector<Aws::String>& GetClientIpAddresses() const { return m_clientIpAddresses; }
96 inline bool ClientIpAddressesHasBeenSet() const { return m_clientIpAddressesHasBeenSet; }
97 template <typename ClientIpAddressesT = Aws::Vector<Aws::String>>
98 void SetClientIpAddresses(ClientIpAddressesT&& value) {
99 m_clientIpAddressesHasBeenSet = true;
100 m_clientIpAddresses = std::forward<ClientIpAddressesT>(value);
101 }
102 template <typename ClientIpAddressesT = Aws::Vector<Aws::String>>
103 Session& WithClientIpAddresses(ClientIpAddressesT&& value) {
104 SetClientIpAddresses(std::forward<ClientIpAddressesT>(value));
105 return *this;
106 }
107 template <typename ClientIpAddressesT = Aws::String>
108 Session& AddClientIpAddresses(ClientIpAddressesT&& value) {
109 m_clientIpAddressesHasBeenSet = true;
110 m_clientIpAddresses.emplace_back(std::forward<ClientIpAddressesT>(value));
111 return *this;
112 }
114
116
119 inline SessionStatus GetStatus() const { return m_status; }
120 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
121 inline void SetStatus(SessionStatus value) {
122 m_statusHasBeenSet = true;
123 m_status = value;
124 }
126 SetStatus(value);
127 return *this;
128 }
130
132
135 inline const Aws::Utils::DateTime& GetStartTime() const { return m_startTime; }
136 inline bool StartTimeHasBeenSet() const { return m_startTimeHasBeenSet; }
137 template <typename StartTimeT = Aws::Utils::DateTime>
138 void SetStartTime(StartTimeT&& value) {
139 m_startTimeHasBeenSet = true;
140 m_startTime = std::forward<StartTimeT>(value);
141 }
142 template <typename StartTimeT = Aws::Utils::DateTime>
143 Session& WithStartTime(StartTimeT&& value) {
144 SetStartTime(std::forward<StartTimeT>(value));
145 return *this;
146 }
148
150
153 inline const Aws::Utils::DateTime& GetEndTime() const { return m_endTime; }
154 inline bool EndTimeHasBeenSet() const { return m_endTimeHasBeenSet; }
155 template <typename EndTimeT = Aws::Utils::DateTime>
156 void SetEndTime(EndTimeT&& value) {
157 m_endTimeHasBeenSet = true;
158 m_endTime = std::forward<EndTimeT>(value);
159 }
160 template <typename EndTimeT = Aws::Utils::DateTime>
161 Session& WithEndTime(EndTimeT&& value) {
162 SetEndTime(std::forward<EndTimeT>(value));
163 return *this;
164 }
166 private:
167 Aws::String m_portalArn;
168
169 Aws::String m_sessionId;
170
171 Aws::String m_username;
172
173 Aws::Vector<Aws::String> m_clientIpAddresses;
174
176
177 Aws::Utils::DateTime m_startTime{};
178
179 Aws::Utils::DateTime m_endTime{};
180 bool m_portalArnHasBeenSet = false;
181 bool m_sessionIdHasBeenSet = false;
182 bool m_usernameHasBeenSet = false;
183 bool m_clientIpAddressesHasBeenSet = false;
184 bool m_statusHasBeenSet = false;
185 bool m_startTimeHasBeenSet = false;
186 bool m_endTimeHasBeenSet = false;
187};
188
189} // namespace Model
190} // namespace WorkSpacesWeb
191} // namespace Aws
AWS_WORKSPACESWEB_API Session(Aws::Utils::Json::JsonView jsonValue)
const Aws::Utils::DateTime & GetStartTime() const
Definition Session.h:135
void SetUsername(UsernameT &&value)
Definition Session.h:80
bool ClientIpAddressesHasBeenSet() const
Definition Session.h:96
void SetPortalArn(PortalArnT &&value)
Definition Session.h:44
Session & AddClientIpAddresses(ClientIpAddressesT &&value)
Definition Session.h:108
void SetStartTime(StartTimeT &&value)
Definition Session.h:138
SessionStatus GetStatus() const
Definition Session.h:119
AWS_WORKSPACESWEB_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::String & GetUsername() const
Definition Session.h:77
Session & WithStatus(SessionStatus value)
Definition Session.h:125
const Aws::String & GetSessionId() const
Definition Session.h:59
Session & WithPortalArn(PortalArnT &&value)
Definition Session.h:49
void SetStatus(SessionStatus value)
Definition Session.h:121
Session & WithClientIpAddresses(ClientIpAddressesT &&value)
Definition Session.h:103
const Aws::Utils::DateTime & GetEndTime() const
Definition Session.h:153
const Aws::Vector< Aws::String > & GetClientIpAddresses() const
Definition Session.h:95
AWS_WORKSPACESWEB_API Session & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetPortalArn() const
Definition Session.h:41
Session & WithEndTime(EndTimeT &&value)
Definition Session.h:161
Session & WithSessionId(SessionIdT &&value)
Definition Session.h:67
void SetEndTime(EndTimeT &&value)
Definition Session.h:156
Session & WithUsername(UsernameT &&value)
Definition Session.h:85
AWS_WORKSPACESWEB_API Session()=default
void SetSessionId(SessionIdT &&value)
Definition Session.h:62
void SetClientIpAddresses(ClientIpAddressesT &&value)
Definition Session.h:98
Session & WithStartTime(StartTimeT &&value)
Definition Session.h:143
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue