AWS SDK for C++

AWS SDK for C++ Version 1.11.686

Loading...
Searching...
No Matches
Principal.h
1
6#pragma once
7#include <aws/qbusiness/QBusiness_EXPORTS.h>
8#include <aws/qbusiness/model/PrincipalGroup.h>
9#include <aws/qbusiness/model/PrincipalUser.h>
10
11#include <utility>
12
13namespace Aws {
14namespace Utils {
15namespace Json {
16class JsonValue;
17class JsonView;
18} // namespace Json
19} // namespace Utils
20namespace QBusiness {
21namespace Model {
22
30class Principal {
31 public:
32 AWS_QBUSINESS_API Principal() = default;
35 AWS_QBUSINESS_API Aws::Utils::Json::JsonValue Jsonize() const;
36
38
41 inline const PrincipalUser& GetUser() const { return m_user; }
42 inline bool UserHasBeenSet() const { return m_userHasBeenSet; }
43 template <typename UserT = PrincipalUser>
44 void SetUser(UserT&& value) {
45 m_userHasBeenSet = true;
46 m_user = std::forward<UserT>(value);
47 }
48 template <typename UserT = PrincipalUser>
50 SetUser(std::forward<UserT>(value));
51 return *this;
52 }
54
56
59 inline const PrincipalGroup& GetGroup() const { return m_group; }
60 inline bool GroupHasBeenSet() const { return m_groupHasBeenSet; }
61 template <typename GroupT = PrincipalGroup>
62 void SetGroup(GroupT&& value) {
63 m_groupHasBeenSet = true;
64 m_group = std::forward<GroupT>(value);
65 }
66 template <typename GroupT = PrincipalGroup>
68 SetGroup(std::forward<GroupT>(value));
69 return *this;
70 }
72 private:
73 PrincipalUser m_user;
74 bool m_userHasBeenSet = false;
75
76 PrincipalGroup m_group;
77 bool m_groupHasBeenSet = false;
78};
79
80} // namespace Model
81} // namespace QBusiness
82} // namespace Aws
void SetGroup(GroupT &&value)
Definition Principal.h:62
AWS_QBUSINESS_API Principal(Aws::Utils::Json::JsonView jsonValue)
const PrincipalUser & GetUser() const
Definition Principal.h:41
AWS_QBUSINESS_API Principal & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_QBUSINESS_API Aws::Utils::Json::JsonValue Jsonize() const
Principal & WithUser(UserT &&value)
Definition Principal.h:49
void SetUser(UserT &&value)
Definition Principal.h:44
Principal & WithGroup(GroupT &&value)
Definition Principal.h:67
AWS_QBUSINESS_API Principal()=default
const PrincipalGroup & GetGroup() const
Definition Principal.h:59
std::shared_ptr< T > MakeShared(const char *allocationTag, ArgTypes &&... args)
Aws::Utils::Json::JsonValue JsonValue