AWS SDK for C++

AWS SDK for C++ Version 1.11.608

Loading...
Searching...
No Matches
Principal.h
1
6#pragma once
7#include <aws/kendra/Kendra_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/kendra/model/PrincipalType.h>
10#include <aws/kendra/model/ReadAccessType.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
36 {
37 public:
38 AWS_KENDRA_API Principal() = default;
39 AWS_KENDRA_API Principal(Aws::Utils::Json::JsonView jsonValue);
41 AWS_KENDRA_API Aws::Utils::Json::JsonValue Jsonize() const;
42
43
45
48 inline const Aws::String& GetName() const { return m_name; }
49 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
50 template<typename NameT = Aws::String>
51 void SetName(NameT&& value) { m_nameHasBeenSet = true; m_name = std::forward<NameT>(value); }
52 template<typename NameT = Aws::String>
53 Principal& WithName(NameT&& value) { SetName(std::forward<NameT>(value)); return *this;}
55
57
60 inline PrincipalType GetType() const { return m_type; }
61 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
62 inline void SetType(PrincipalType value) { m_typeHasBeenSet = true; m_type = value; }
63 inline Principal& WithType(PrincipalType value) { SetType(value); return *this;}
65
67
70 inline ReadAccessType GetAccess() const { return m_access; }
71 inline bool AccessHasBeenSet() const { return m_accessHasBeenSet; }
72 inline void SetAccess(ReadAccessType value) { m_accessHasBeenSet = true; m_access = value; }
73 inline Principal& WithAccess(ReadAccessType value) { SetAccess(value); return *this;}
75
77
81 inline const Aws::String& GetDataSourceId() const { return m_dataSourceId; }
82 inline bool DataSourceIdHasBeenSet() const { return m_dataSourceIdHasBeenSet; }
83 template<typename DataSourceIdT = Aws::String>
84 void SetDataSourceId(DataSourceIdT&& value) { m_dataSourceIdHasBeenSet = true; m_dataSourceId = std::forward<DataSourceIdT>(value); }
85 template<typename DataSourceIdT = Aws::String>
86 Principal& WithDataSourceId(DataSourceIdT&& value) { SetDataSourceId(std::forward<DataSourceIdT>(value)); return *this;}
88 private:
89
90 Aws::String m_name;
91 bool m_nameHasBeenSet = false;
92
94 bool m_typeHasBeenSet = false;
95
97 bool m_accessHasBeenSet = false;
98
99 Aws::String m_dataSourceId;
100 bool m_dataSourceIdHasBeenSet = false;
101 };
102
103} // namespace Model
104} // namespace kendra
105} // namespace Aws
void SetAccess(ReadAccessType value)
Definition Principal.h:72
const Aws::String & GetDataSourceId() const
Definition Principal.h:81
ReadAccessType GetAccess() const
Definition Principal.h:70
AWS_KENDRA_API Principal(Aws::Utils::Json::JsonView jsonValue)
Principal & WithName(NameT &&value)
Definition Principal.h:53
AWS_KENDRA_API Aws::Utils::Json::JsonValue Jsonize() const
bool DataSourceIdHasBeenSet() const
Definition Principal.h:82
const Aws::String & GetName() const
Definition Principal.h:48
Principal & WithAccess(ReadAccessType value)
Definition Principal.h:73
AWS_KENDRA_API Principal()=default
void SetDataSourceId(DataSourceIdT &&value)
Definition Principal.h:84
void SetType(PrincipalType value)
Definition Principal.h:62
Principal & WithType(PrincipalType value)
Definition Principal.h:63
Principal & WithDataSourceId(DataSourceIdT &&value)
Definition Principal.h:86
AWS_KENDRA_API Principal & operator=(Aws::Utils::Json::JsonView jsonValue)
PrincipalType GetType() const
Definition Principal.h:60
void SetName(NameT &&value)
Definition Principal.h:51
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue