AWS SDK for C++  1.9.159
AWS SDK for C++
UserContext.h
Go to the documentation of this file.
1 
6 #pragma once
11 #include <utility>
12 
13 namespace Aws
14 {
15 namespace Utils
16 {
17 namespace Json
18 {
19  class JsonValue;
20  class JsonView;
21 } // namespace Json
22 } // namespace Utils
23 namespace kendra
24 {
25 namespace Model
26 {
27 
39  {
40  public:
45 
46 
51  inline const Aws::String& GetToken() const{ return m_token; }
52 
57  inline bool TokenHasBeenSet() const { return m_tokenHasBeenSet; }
58 
63  inline void SetToken(const Aws::String& value) { m_tokenHasBeenSet = true; m_token = value; }
64 
69  inline void SetToken(Aws::String&& value) { m_tokenHasBeenSet = true; m_token = std::move(value); }
70 
75  inline void SetToken(const char* value) { m_tokenHasBeenSet = true; m_token.assign(value); }
76 
81  inline UserContext& WithToken(const Aws::String& value) { SetToken(value); return *this;}
82 
87  inline UserContext& WithToken(Aws::String&& value) { SetToken(std::move(value)); return *this;}
88 
93  inline UserContext& WithToken(const char* value) { SetToken(value); return *this;}
94 
95 
100  inline const Aws::String& GetUserId() const{ return m_userId; }
101 
106  inline bool UserIdHasBeenSet() const { return m_userIdHasBeenSet; }
107 
112  inline void SetUserId(const Aws::String& value) { m_userIdHasBeenSet = true; m_userId = value; }
113 
118  inline void SetUserId(Aws::String&& value) { m_userIdHasBeenSet = true; m_userId = std::move(value); }
119 
124  inline void SetUserId(const char* value) { m_userIdHasBeenSet = true; m_userId.assign(value); }
125 
130  inline UserContext& WithUserId(const Aws::String& value) { SetUserId(value); return *this;}
131 
136  inline UserContext& WithUserId(Aws::String&& value) { SetUserId(std::move(value)); return *this;}
137 
142  inline UserContext& WithUserId(const char* value) { SetUserId(value); return *this;}
143 
144 
149  inline const Aws::Vector<Aws::String>& GetGroups() const{ return m_groups; }
150 
155  inline bool GroupsHasBeenSet() const { return m_groupsHasBeenSet; }
156 
161  inline void SetGroups(const Aws::Vector<Aws::String>& value) { m_groupsHasBeenSet = true; m_groups = value; }
162 
167  inline void SetGroups(Aws::Vector<Aws::String>&& value) { m_groupsHasBeenSet = true; m_groups = std::move(value); }
168 
173  inline UserContext& WithGroups(const Aws::Vector<Aws::String>& value) { SetGroups(value); return *this;}
174 
179  inline UserContext& WithGroups(Aws::Vector<Aws::String>&& value) { SetGroups(std::move(value)); return *this;}
180 
185  inline UserContext& AddGroups(const Aws::String& value) { m_groupsHasBeenSet = true; m_groups.push_back(value); return *this; }
186 
191  inline UserContext& AddGroups(Aws::String&& value) { m_groupsHasBeenSet = true; m_groups.push_back(std::move(value)); return *this; }
192 
197  inline UserContext& AddGroups(const char* value) { m_groupsHasBeenSet = true; m_groups.push_back(value); return *this; }
198 
199 
204  inline const Aws::Vector<DataSourceGroup>& GetDataSourceGroups() const{ return m_dataSourceGroups; }
205 
210  inline bool DataSourceGroupsHasBeenSet() const { return m_dataSourceGroupsHasBeenSet; }
211 
216  inline void SetDataSourceGroups(const Aws::Vector<DataSourceGroup>& value) { m_dataSourceGroupsHasBeenSet = true; m_dataSourceGroups = value; }
217 
222  inline void SetDataSourceGroups(Aws::Vector<DataSourceGroup>&& value) { m_dataSourceGroupsHasBeenSet = true; m_dataSourceGroups = std::move(value); }
223 
228  inline UserContext& WithDataSourceGroups(const Aws::Vector<DataSourceGroup>& value) { SetDataSourceGroups(value); return *this;}
229 
234  inline UserContext& WithDataSourceGroups(Aws::Vector<DataSourceGroup>&& value) { SetDataSourceGroups(std::move(value)); return *this;}
235 
240  inline UserContext& AddDataSourceGroups(const DataSourceGroup& value) { m_dataSourceGroupsHasBeenSet = true; m_dataSourceGroups.push_back(value); return *this; }
241 
246  inline UserContext& AddDataSourceGroups(DataSourceGroup&& value) { m_dataSourceGroupsHasBeenSet = true; m_dataSourceGroups.push_back(std::move(value)); return *this; }
247 
248  private:
249 
250  Aws::String m_token;
251  bool m_tokenHasBeenSet;
252 
253  Aws::String m_userId;
254  bool m_userIdHasBeenSet;
255 
256  Aws::Vector<Aws::String> m_groups;
257  bool m_groupsHasBeenSet;
258 
259  Aws::Vector<DataSourceGroup> m_dataSourceGroups;
260  bool m_dataSourceGroupsHasBeenSet;
261  };
262 
263 } // namespace Model
264 } // namespace kendra
265 } // namespace Aws
Aws::kendra::Model::UserContext::SetUserId
void SetUserId(const char *value)
Definition: UserContext.h:124
Aws::kendra::Model::UserContext
Definition: UserContext.h:39
Aws::kendra::Model::UserContext::SetDataSourceGroups
void SetDataSourceGroups(const Aws::Vector< DataSourceGroup > &value)
Definition: UserContext.h:216
Aws::kendra::Model::UserContext::SetToken
void SetToken(Aws::String &&value)
Definition: UserContext.h:69
Aws::kendra::Model::UserContext::WithToken
UserContext & WithToken(Aws::String &&value)
Definition: UserContext.h:87
Aws::kendra::Model::UserContext::SetToken
void SetToken(const Aws::String &value)
Definition: UserContext.h:63
Aws::kendra::Model::UserContext::UserContext
UserContext(Aws::Utils::Json::JsonView jsonValue)
Aws::kendra::Model::UserContext::AddGroups
UserContext & AddGroups(const Aws::String &value)
Definition: UserContext.h:185
Aws::kendra::Model::UserContext::AddDataSourceGroups
UserContext & AddDataSourceGroups(const DataSourceGroup &value)
Definition: UserContext.h:240
Aws::kendra::Model::UserContext::SetToken
void SetToken(const char *value)
Definition: UserContext.h:75
Aws::kendra::Model::UserContext::WithGroups
UserContext & WithGroups(const Aws::Vector< Aws::String > &value)
Definition: UserContext.h:173
Aws::kendra::Model::UserContext::Jsonize
Aws::Utils::Json::JsonValue Jsonize() const
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
Aws::kendra::Model::UserContext::SetUserId
void SetUserId(Aws::String &&value)
Definition: UserContext.h:118
Aws::kendra::Model::UserContext::DataSourceGroupsHasBeenSet
bool DataSourceGroupsHasBeenSet() const
Definition: UserContext.h:210
AWSVector.h
Aws::kendra::Model::UserContext::WithUserId
UserContext & WithUserId(const Aws::String &value)
Definition: UserContext.h:130
Aws::kendra::Model::UserContext::GetDataSourceGroups
const Aws::Vector< DataSourceGroup > & GetDataSourceGroups() const
Definition: UserContext.h:204
Aws::kendra::Model::UserContext::operator=
UserContext & operator=(Aws::Utils::Json::JsonView jsonValue)
Aws::kendra::Model::UserContext::WithUserId
UserContext & WithUserId(const char *value)
Definition: UserContext.h:142
Aws::kendra::Model::UserContext::WithDataSourceGroups
UserContext & WithDataSourceGroups(Aws::Vector< DataSourceGroup > &&value)
Definition: UserContext.h:234
Aws::kendra::Model::UserContext::GetGroups
const Aws::Vector< Aws::String > & GetGroups() const
Definition: UserContext.h:149
Kendra_EXPORTS.h
DataSourceGroup.h
Aws::kendra::Model::UserContext::UserIdHasBeenSet
bool UserIdHasBeenSet() const
Definition: UserContext.h:106
Aws::kendra::Model::UserContext::WithUserId
UserContext & WithUserId(Aws::String &&value)
Definition: UserContext.h:136
Aws::Utils::Json::JsonView
Definition: JsonSerializer.h:235
AWSString.h
Aws::kendra::Model::UserContext::UserContext
UserContext()
Aws::Utils::Json::JsonValue
Definition: JsonSerializer.h:33
Aws::kendra::Model::UserContext::SetDataSourceGroups
void SetDataSourceGroups(Aws::Vector< DataSourceGroup > &&value)
Definition: UserContext.h:222
Aws::kendra::Model::UserContext::GetUserId
const Aws::String & GetUserId() const
Definition: UserContext.h:100
Aws::kendra::Model::UserContext::TokenHasBeenSet
bool TokenHasBeenSet() const
Definition: UserContext.h:57
Aws::kendra::Model::UserContext::WithToken
UserContext & WithToken(const char *value)
Definition: UserContext.h:93
Aws::kendra::Model::UserContext::SetUserId
void SetUserId(const Aws::String &value)
Definition: UserContext.h:112
Aws::kendra::Model::UserContext::SetGroups
void SetGroups(const Aws::Vector< Aws::String > &value)
Definition: UserContext.h:161
Aws::MigrationHubStrategyRecommendations::Model::OutputFormat::NOT_SET
@ NOT_SET
Aws
Definition: AccessManagementClient.h:15
Aws::kendra::Model::UserContext::SetGroups
void SetGroups(Aws::Vector< Aws::String > &&value)
Definition: UserContext.h:167
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::kendra::Model::UserContext::AddGroups
UserContext & AddGroups(const char *value)
Definition: UserContext.h:197
Aws::kendra::Model::UserContext::AddDataSourceGroups
UserContext & AddDataSourceGroups(DataSourceGroup &&value)
Definition: UserContext.h:246
AWS_KENDRA_API
#define AWS_KENDRA_API
Definition: Kendra_EXPORTS.h:28
Aws::kendra::Model::UserContext::AddGroups
UserContext & AddGroups(Aws::String &&value)
Definition: UserContext.h:191
Aws::kendra::Model::UserContext::WithToken
UserContext & WithToken(const Aws::String &value)
Definition: UserContext.h:81
Aws::kendra::Model::UserContext::GroupsHasBeenSet
bool GroupsHasBeenSet() const
Definition: UserContext.h:155
Aws::kendra::Model::UserContext::WithGroups
UserContext & WithGroups(Aws::Vector< Aws::String > &&value)
Definition: UserContext.h:179
Aws::kendra::Model::UserContext::GetToken
const Aws::String & GetToken() const
Definition: UserContext.h:51
Aws::kendra::Model::DataSourceGroup
Definition: DataSourceGroup.h:33
Aws::kendra::Model::UserContext::WithDataSourceGroups
UserContext & WithDataSourceGroups(const Aws::Vector< DataSourceGroup > &value)
Definition: UserContext.h:228