AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
Principal.h
1
6#pragma once
7#include <aws/workdocs/WorkDocs_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/workdocs/model/PrincipalType.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/workdocs/model/PermissionInfo.h>
12#include <utility>
13
14namespace Aws
15{
16namespace Utils
17{
18namespace Json
19{
20 class JsonValue;
21 class JsonView;
22} // namespace Json
23} // namespace Utils
24namespace WorkDocs
25{
26namespace Model
27{
28
35 {
36 public:
37 AWS_WORKDOCS_API Principal() = default;
38 AWS_WORKDOCS_API Principal(Aws::Utils::Json::JsonView jsonValue);
39 AWS_WORKDOCS_API Principal& operator=(Aws::Utils::Json::JsonView jsonValue);
40 AWS_WORKDOCS_API Aws::Utils::Json::JsonValue Jsonize() const;
41
42
44
47 inline const Aws::String& GetId() const { return m_id; }
48 inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
49 template<typename IdT = Aws::String>
50 void SetId(IdT&& value) { m_idHasBeenSet = true; m_id = std::forward<IdT>(value); }
51 template<typename IdT = Aws::String>
52 Principal& WithId(IdT&& value) { SetId(std::forward<IdT>(value)); return *this;}
54
56
59 inline PrincipalType GetType() const { return m_type; }
60 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
61 inline void SetType(PrincipalType value) { m_typeHasBeenSet = true; m_type = value; }
62 inline Principal& WithType(PrincipalType value) { SetType(value); return *this;}
64
66
69 inline const Aws::Vector<PermissionInfo>& GetRoles() const { return m_roles; }
70 inline bool RolesHasBeenSet() const { return m_rolesHasBeenSet; }
71 template<typename RolesT = Aws::Vector<PermissionInfo>>
72 void SetRoles(RolesT&& value) { m_rolesHasBeenSet = true; m_roles = std::forward<RolesT>(value); }
73 template<typename RolesT = Aws::Vector<PermissionInfo>>
74 Principal& WithRoles(RolesT&& value) { SetRoles(std::forward<RolesT>(value)); return *this;}
75 template<typename RolesT = PermissionInfo>
76 Principal& AddRoles(RolesT&& value) { m_rolesHasBeenSet = true; m_roles.emplace_back(std::forward<RolesT>(value)); return *this; }
78 private:
79
80 Aws::String m_id;
81 bool m_idHasBeenSet = false;
82
84 bool m_typeHasBeenSet = false;
85
87 bool m_rolesHasBeenSet = false;
88 };
89
90} // namespace Model
91} // namespace WorkDocs
92} // namespace Aws
void SetType(PrincipalType value)
Definition Principal.h:61
const Aws::Vector< PermissionInfo > & GetRoles() const
Definition Principal.h:69
Principal & WithRoles(RolesT &&value)
Definition Principal.h:74
AWS_WORKDOCS_API Aws::Utils::Json::JsonValue Jsonize() const
void SetRoles(RolesT &&value)
Definition Principal.h:72
PrincipalType GetType() const
Definition Principal.h:59
const Aws::String & GetId() const
Definition Principal.h:47
Principal & AddRoles(RolesT &&value)
Definition Principal.h:76
Principal & WithType(PrincipalType value)
Definition Principal.h:62
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:52
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue