AWS SDK for C++

AWS SDK for C++ Version 1.11.935

Loading...
Searching...
No Matches
Principal.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/workdocs/WorkDocs_EXPORTS.h>
10#include <aws/workdocs/model/PermissionInfo.h>
11#include <aws/workdocs/model/PrincipalType.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Json {
18class JsonValue;
19class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace WorkDocs {
23namespace Model {
24
30class Principal {
31 public:
32 AWS_WORKDOCS_API Principal() = default;
33 AWS_WORKDOCS_API Principal(Aws::Utils::Json::JsonView jsonValue);
34 AWS_WORKDOCS_API Principal& operator=(Aws::Utils::Json::JsonView jsonValue);
35 AWS_WORKDOCS_API Aws::Utils::Json::JsonValue Jsonize() const;
36
38
41 inline const Aws::String& GetId() const { return m_id; }
42 inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
43 template <typename IdT = Aws::String>
44 void SetId(IdT&& value) {
45 m_idHasBeenSet = true;
46 m_id = std::forward<IdT>(value);
47 }
48 template <typename IdT = Aws::String>
49 Principal& WithId(IdT&& value) {
50 SetId(std::forward<IdT>(value));
51 return *this;
52 }
54
56
59 inline PrincipalType GetType() const { return m_type; }
60 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
61 inline void SetType(PrincipalType value) {
62 m_typeHasBeenSet = true;
63 m_type = value;
64 }
66 SetType(value);
67 return *this;
68 }
70
72
75 inline const Aws::Vector<PermissionInfo>& GetRoles() const { return m_roles; }
76 inline bool RolesHasBeenSet() const { return m_rolesHasBeenSet; }
77 template <typename RolesT = Aws::Vector<PermissionInfo>>
78 void SetRoles(RolesT&& value) {
79 m_rolesHasBeenSet = true;
80 m_roles = std::forward<RolesT>(value);
81 }
82 template <typename RolesT = Aws::Vector<PermissionInfo>>
83 Principal& WithRoles(RolesT&& value) {
84 SetRoles(std::forward<RolesT>(value));
85 return *this;
86 }
87 template <typename RolesT = PermissionInfo>
88 Principal& AddRoles(RolesT&& value) {
89 m_rolesHasBeenSet = true;
90 m_roles.emplace_back(std::forward<RolesT>(value));
91 return *this;
92 }
94 private:
95 Aws::String m_id;
96
98
100 bool m_idHasBeenSet = false;
101 bool m_typeHasBeenSet = false;
102 bool m_rolesHasBeenSet = false;
103};
104
105} // namespace Model
106} // namespace WorkDocs
107} // namespace Aws
void SetType(PrincipalType value)
Definition Principal.h:61
const Aws::Vector< PermissionInfo > & GetRoles() const
Definition Principal.h:75
Principal & WithRoles(RolesT &&value)
Definition Principal.h:83
AWS_WORKDOCS_API Aws::Utils::Json::JsonValue Jsonize() const
void SetRoles(RolesT &&value)
Definition Principal.h:78
PrincipalType GetType() const
Definition Principal.h:59
const Aws::String & GetId() const
Definition Principal.h:41
Principal & AddRoles(RolesT &&value)
Definition Principal.h:88
Principal & WithType(PrincipalType value)
Definition Principal.h:65
AWS_WORKDOCS_API Principal()=default
AWS_WORKDOCS_API Principal & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_WORKDOCS_API Principal(Aws::Utils::Json::JsonView jsonValue)
Principal & WithId(IdT &&value)
Definition Principal.h:49
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue