AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
UserContext.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/kendra/Kendra_EXPORTS.h>
10#include <aws/kendra/model/DataSourceGroup.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Json {
17class JsonValue;
18class JsonView;
19} // namespace Json
20} // namespace Utils
21namespace kendra {
22namespace Model {
23
47 public:
48 AWS_KENDRA_API UserContext() = default;
49 AWS_KENDRA_API UserContext(Aws::Utils::Json::JsonView jsonValue);
51 AWS_KENDRA_API Aws::Utils::Json::JsonValue Jsonize() const;
52
54
58 inline const Aws::String& GetToken() const { return m_token; }
59 inline bool TokenHasBeenSet() const { return m_tokenHasBeenSet; }
60 template <typename TokenT = Aws::String>
61 void SetToken(TokenT&& value) {
62 m_tokenHasBeenSet = true;
63 m_token = std::forward<TokenT>(value);
64 }
65 template <typename TokenT = Aws::String>
66 UserContext& WithToken(TokenT&& value) {
67 SetToken(std::forward<TokenT>(value));
68 return *this;
69 }
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) {
81 m_userIdHasBeenSet = true;
82 m_userId = std::forward<UserIdT>(value);
83 }
84 template <typename UserIdT = Aws::String>
85 UserContext& WithUserId(UserIdT&& value) {
86 SetUserId(std::forward<UserIdT>(value));
87 return *this;
88 }
90
92
96 inline const Aws::Vector<Aws::String>& GetGroups() const { return m_groups; }
97 inline bool GroupsHasBeenSet() const { return m_groupsHasBeenSet; }
98 template <typename GroupsT = Aws::Vector<Aws::String>>
99 void SetGroups(GroupsT&& value) {
100 m_groupsHasBeenSet = true;
101 m_groups = std::forward<GroupsT>(value);
102 }
103 template <typename GroupsT = Aws::Vector<Aws::String>>
104 UserContext& WithGroups(GroupsT&& value) {
105 SetGroups(std::forward<GroupsT>(value));
106 return *this;
107 }
108 template <typename GroupsT = Aws::String>
109 UserContext& AddGroups(GroupsT&& value) {
110 m_groupsHasBeenSet = true;
111 m_groups.emplace_back(std::forward<GroupsT>(value));
112 return *this;
113 }
115
117
121 inline const Aws::Vector<DataSourceGroup>& GetDataSourceGroups() const { return m_dataSourceGroups; }
122 inline bool DataSourceGroupsHasBeenSet() const { return m_dataSourceGroupsHasBeenSet; }
123 template <typename DataSourceGroupsT = Aws::Vector<DataSourceGroup>>
124 void SetDataSourceGroups(DataSourceGroupsT&& value) {
125 m_dataSourceGroupsHasBeenSet = true;
126 m_dataSourceGroups = std::forward<DataSourceGroupsT>(value);
127 }
128 template <typename DataSourceGroupsT = Aws::Vector<DataSourceGroup>>
129 UserContext& WithDataSourceGroups(DataSourceGroupsT&& value) {
130 SetDataSourceGroups(std::forward<DataSourceGroupsT>(value));
131 return *this;
132 }
133 template <typename DataSourceGroupsT = DataSourceGroup>
134 UserContext& AddDataSourceGroups(DataSourceGroupsT&& value) {
135 m_dataSourceGroupsHasBeenSet = true;
136 m_dataSourceGroups.emplace_back(std::forward<DataSourceGroupsT>(value));
137 return *this;
138 }
140 private:
141 Aws::String m_token;
142
143 Aws::String m_userId;
144
146
147 Aws::Vector<DataSourceGroup> m_dataSourceGroups;
148 bool m_tokenHasBeenSet = false;
149 bool m_userIdHasBeenSet = false;
150 bool m_groupsHasBeenSet = false;
151 bool m_dataSourceGroupsHasBeenSet = false;
152};
153
154} // namespace Model
155} // namespace kendra
156} // namespace Aws
UserContext & WithGroups(GroupsT &&value)
AWS_KENDRA_API UserContext & operator=(Aws::Utils::Json::JsonView jsonValue)
UserContext & WithToken(TokenT &&value)
Definition UserContext.h:66
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)
UserContext & WithUserId(UserIdT &&value)
Definition UserContext.h:85
const Aws::String & GetToken() const
Definition UserContext.h:58
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:61
const Aws::Vector< Aws::String > & GetGroups() const
Definition UserContext.h:96
UserContext & WithDataSourceGroups(DataSourceGroupsT &&value)
void SetGroups(GroupsT &&value)
Definition UserContext.h:99
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue