AWS SDK for C++

AWS SDK for C++ Version 1.11.685

Loading...
Searching...
No Matches
Principal.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/kendra/Kendra_EXPORTS.h>
9#include <aws/kendra/model/PrincipalType.h>
10#include <aws/kendra/model/ReadAccessType.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
31class Principal {
32 public:
33 AWS_KENDRA_API Principal() = default;
34 AWS_KENDRA_API Principal(Aws::Utils::Json::JsonView jsonValue);
36 AWS_KENDRA_API Aws::Utils::Json::JsonValue Jsonize() const;
37
39
42 inline const Aws::String& GetName() const { return m_name; }
43 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
44 template <typename NameT = Aws::String>
45 void SetName(NameT&& value) {
46 m_nameHasBeenSet = true;
47 m_name = std::forward<NameT>(value);
48 }
49 template <typename NameT = Aws::String>
50 Principal& WithName(NameT&& value) {
51 SetName(std::forward<NameT>(value));
52 return *this;
53 }
55
57
60 inline PrincipalType GetType() const { return m_type; }
61 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
62 inline void SetType(PrincipalType value) {
63 m_typeHasBeenSet = true;
64 m_type = value;
65 }
67 SetType(value);
68 return *this;
69 }
71
73
76 inline ReadAccessType GetAccess() const { return m_access; }
77 inline bool AccessHasBeenSet() const { return m_accessHasBeenSet; }
78 inline void SetAccess(ReadAccessType value) {
79 m_accessHasBeenSet = true;
80 m_access = value;
81 }
83 SetAccess(value);
84 return *this;
85 }
87
89
93 inline const Aws::String& GetDataSourceId() const { return m_dataSourceId; }
94 inline bool DataSourceIdHasBeenSet() const { return m_dataSourceIdHasBeenSet; }
95 template <typename DataSourceIdT = Aws::String>
96 void SetDataSourceId(DataSourceIdT&& value) {
97 m_dataSourceIdHasBeenSet = true;
98 m_dataSourceId = std::forward<DataSourceIdT>(value);
99 }
100 template <typename DataSourceIdT = Aws::String>
101 Principal& WithDataSourceId(DataSourceIdT&& value) {
102 SetDataSourceId(std::forward<DataSourceIdT>(value));
103 return *this;
104 }
106 private:
107 Aws::String m_name;
108 bool m_nameHasBeenSet = false;
109
111 bool m_typeHasBeenSet = false;
112
114 bool m_accessHasBeenSet = false;
115
116 Aws::String m_dataSourceId;
117 bool m_dataSourceIdHasBeenSet = false;
118};
119
120} // namespace Model
121} // namespace kendra
122} // namespace Aws
void SetAccess(ReadAccessType value)
Definition Principal.h:78
const Aws::String & GetDataSourceId() const
Definition Principal.h:93
ReadAccessType GetAccess() const
Definition Principal.h:76
AWS_KENDRA_API Principal(Aws::Utils::Json::JsonView jsonValue)
Principal & WithName(NameT &&value)
Definition Principal.h:50
AWS_KENDRA_API Aws::Utils::Json::JsonValue Jsonize() const
bool DataSourceIdHasBeenSet() const
Definition Principal.h:94
const Aws::String & GetName() const
Definition Principal.h:42
Principal & WithAccess(ReadAccessType value)
Definition Principal.h:82
AWS_KENDRA_API Principal()=default
void SetDataSourceId(DataSourceIdT &&value)
Definition Principal.h:96
void SetType(PrincipalType value)
Definition Principal.h:62
Principal & WithType(PrincipalType value)
Definition Principal.h:66
Principal & WithDataSourceId(DataSourceIdT &&value)
Definition Principal.h:101
AWS_KENDRA_API Principal & operator=(Aws::Utils::Json::JsonView jsonValue)
PrincipalType GetType() const
Definition Principal.h:60
void SetName(NameT &&value)
Definition Principal.h:45
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue