AWS SDK for C++

AWS SDK for C++ Version 1.11.612

Loading...
Searching...
No Matches
UserContext.h
1
6#pragma once
7#include <aws/kendra/Kendra_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/kendra/model/DataSourceGroup.h>
11#include <utility>
12
13namespace Aws
14{
15namespace Utils
16{
17namespace Json
18{
19 class JsonValue;
20 class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace kendra
24{
25namespace Model
26{
27
51 {
52 public:
53 AWS_KENDRA_API UserContext() = default;
54 AWS_KENDRA_API UserContext(Aws::Utils::Json::JsonView jsonValue);
56 AWS_KENDRA_API Aws::Utils::Json::JsonValue Jsonize() const;
57
58
60
64 inline const Aws::String& GetToken() const { return m_token; }
65 inline bool TokenHasBeenSet() const { return m_tokenHasBeenSet; }
66 template<typename TokenT = Aws::String>
67 void SetToken(TokenT&& value) { m_tokenHasBeenSet = true; m_token = std::forward<TokenT>(value); }
68 template<typename TokenT = Aws::String>
69 UserContext& WithToken(TokenT&& value) { SetToken(std::forward<TokenT>(value)); return *this;}
71
73
77 inline const Aws::String& GetUserId() const { return m_userId; }
78 inline bool UserIdHasBeenSet() const { return m_userIdHasBeenSet; }
79 template<typename UserIdT = Aws::String>
80 void SetUserId(UserIdT&& value) { m_userIdHasBeenSet = true; m_userId = std::forward<UserIdT>(value); }
81 template<typename UserIdT = Aws::String>
82 UserContext& WithUserId(UserIdT&& value) { SetUserId(std::forward<UserIdT>(value)); return *this;}
84
86
90 inline const Aws::Vector<Aws::String>& GetGroups() const { return m_groups; }
91 inline bool GroupsHasBeenSet() const { return m_groupsHasBeenSet; }
92 template<typename GroupsT = Aws::Vector<Aws::String>>
93 void SetGroups(GroupsT&& value) { m_groupsHasBeenSet = true; m_groups = std::forward<GroupsT>(value); }
94 template<typename GroupsT = Aws::Vector<Aws::String>>
95 UserContext& WithGroups(GroupsT&& value) { SetGroups(std::forward<GroupsT>(value)); return *this;}
96 template<typename GroupsT = Aws::String>
97 UserContext& AddGroups(GroupsT&& value) { m_groupsHasBeenSet = true; m_groups.emplace_back(std::forward<GroupsT>(value)); return *this; }
99
101
105 inline const Aws::Vector<DataSourceGroup>& GetDataSourceGroups() const { return m_dataSourceGroups; }
106 inline bool DataSourceGroupsHasBeenSet() const { return m_dataSourceGroupsHasBeenSet; }
107 template<typename DataSourceGroupsT = Aws::Vector<DataSourceGroup>>
108 void SetDataSourceGroups(DataSourceGroupsT&& value) { m_dataSourceGroupsHasBeenSet = true; m_dataSourceGroups = std::forward<DataSourceGroupsT>(value); }
109 template<typename DataSourceGroupsT = Aws::Vector<DataSourceGroup>>
110 UserContext& WithDataSourceGroups(DataSourceGroupsT&& value) { SetDataSourceGroups(std::forward<DataSourceGroupsT>(value)); return *this;}
111 template<typename DataSourceGroupsT = DataSourceGroup>
112 UserContext& AddDataSourceGroups(DataSourceGroupsT&& value) { m_dataSourceGroupsHasBeenSet = true; m_dataSourceGroups.emplace_back(std::forward<DataSourceGroupsT>(value)); return *this; }
114 private:
115
116 Aws::String m_token;
117 bool m_tokenHasBeenSet = false;
118
119 Aws::String m_userId;
120 bool m_userIdHasBeenSet = false;
121
123 bool m_groupsHasBeenSet = false;
124
125 Aws::Vector<DataSourceGroup> m_dataSourceGroups;
126 bool m_dataSourceGroupsHasBeenSet = false;
127 };
128
129} // namespace Model
130} // namespace kendra
131} // namespace Aws
UserContext & WithGroups(GroupsT &&value)
Definition UserContext.h:95
AWS_KENDRA_API UserContext & operator=(Aws::Utils::Json::JsonView jsonValue)
UserContext & WithToken(TokenT &&value)
Definition UserContext.h:69
const Aws::String & GetUserId() const
Definition UserContext.h:77
const Aws::Vector< DataSourceGroup > & GetDataSourceGroups() const
UserContext & AddDataSourceGroups(DataSourceGroupsT &&value)
void SetUserId(UserIdT &&value)
Definition UserContext.h:80
AWS_KENDRA_API UserContext()=default
UserContext & AddGroups(GroupsT &&value)
Definition UserContext.h:97
UserContext & WithUserId(UserIdT &&value)
Definition UserContext.h:82
const Aws::String & GetToken() const
Definition UserContext.h:64
AWS_KENDRA_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_KENDRA_API UserContext(Aws::Utils::Json::JsonView jsonValue)
void SetDataSourceGroups(DataSourceGroupsT &&value)
void SetToken(TokenT &&value)
Definition UserContext.h:67
const Aws::Vector< Aws::String > & GetGroups() const
Definition UserContext.h:90
UserContext & WithDataSourceGroups(DataSourceGroupsT &&value)
void SetGroups(GroupsT &&value)
Definition UserContext.h:93
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue