AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
AllowedPrincipal.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/ec2/EC2_EXPORTS.h>
11#include <aws/ec2/model/PrincipalType.h>
12#include <aws/ec2/model/Tag.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Xml {
19class XmlNode;
20} // namespace Xml
21} // namespace Utils
22namespace EC2 {
23namespace Model {
24
31 public:
32 AWS_EC2_API AllowedPrincipal() = default;
33 AWS_EC2_API AllowedPrincipal(const Aws::Utils::Xml::XmlNode& xmlNode);
35
36 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
37 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
38
40
43 inline PrincipalType GetPrincipalType() const { return m_principalType; }
44 inline bool PrincipalTypeHasBeenSet() const { return m_principalTypeHasBeenSet; }
45 inline void SetPrincipalType(PrincipalType value) {
46 m_principalTypeHasBeenSet = true;
47 m_principalType = value;
48 }
50 SetPrincipalType(value);
51 return *this;
52 }
54
56
59 inline const Aws::String& GetPrincipal() const { return m_principal; }
60 inline bool PrincipalHasBeenSet() const { return m_principalHasBeenSet; }
61 template <typename PrincipalT = Aws::String>
62 void SetPrincipal(PrincipalT&& value) {
63 m_principalHasBeenSet = true;
64 m_principal = std::forward<PrincipalT>(value);
65 }
66 template <typename PrincipalT = Aws::String>
67 AllowedPrincipal& WithPrincipal(PrincipalT&& value) {
68 SetPrincipal(std::forward<PrincipalT>(value));
69 return *this;
70 }
72
74
77 inline const Aws::String& GetServicePermissionId() const { return m_servicePermissionId; }
78 inline bool ServicePermissionIdHasBeenSet() const { return m_servicePermissionIdHasBeenSet; }
79 template <typename ServicePermissionIdT = Aws::String>
80 void SetServicePermissionId(ServicePermissionIdT&& value) {
81 m_servicePermissionIdHasBeenSet = true;
82 m_servicePermissionId = std::forward<ServicePermissionIdT>(value);
83 }
84 template <typename ServicePermissionIdT = Aws::String>
85 AllowedPrincipal& WithServicePermissionId(ServicePermissionIdT&& value) {
86 SetServicePermissionId(std::forward<ServicePermissionIdT>(value));
87 return *this;
88 }
90
92
95 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
96 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
97 template <typename TagsT = Aws::Vector<Tag>>
98 void SetTags(TagsT&& value) {
99 m_tagsHasBeenSet = true;
100 m_tags = std::forward<TagsT>(value);
101 }
102 template <typename TagsT = Aws::Vector<Tag>>
103 AllowedPrincipal& WithTags(TagsT&& value) {
104 SetTags(std::forward<TagsT>(value));
105 return *this;
106 }
107 template <typename TagsT = Tag>
108 AllowedPrincipal& AddTags(TagsT&& value) {
109 m_tagsHasBeenSet = true;
110 m_tags.emplace_back(std::forward<TagsT>(value));
111 return *this;
112 }
114
116
119 inline const Aws::String& GetServiceId() const { return m_serviceId; }
120 inline bool ServiceIdHasBeenSet() const { return m_serviceIdHasBeenSet; }
121 template <typename ServiceIdT = Aws::String>
122 void SetServiceId(ServiceIdT&& value) {
123 m_serviceIdHasBeenSet = true;
124 m_serviceId = std::forward<ServiceIdT>(value);
125 }
126 template <typename ServiceIdT = Aws::String>
127 AllowedPrincipal& WithServiceId(ServiceIdT&& value) {
128 SetServiceId(std::forward<ServiceIdT>(value));
129 return *this;
130 }
132 private:
133 PrincipalType m_principalType{PrincipalType::NOT_SET};
134
135 Aws::String m_principal;
136
137 Aws::String m_servicePermissionId;
138
139 Aws::Vector<Tag> m_tags;
140
141 Aws::String m_serviceId;
142 bool m_principalTypeHasBeenSet = false;
143 bool m_principalHasBeenSet = false;
144 bool m_servicePermissionIdHasBeenSet = false;
145 bool m_tagsHasBeenSet = false;
146 bool m_serviceIdHasBeenSet = false;
147};
148
149} // namespace Model
150} // namespace EC2
151} // namespace Aws
void SetServicePermissionId(ServicePermissionIdT &&value)
AllowedPrincipal & WithPrincipal(PrincipalT &&value)
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
const Aws::Vector< Tag > & GetTags() const
void SetServiceId(ServiceIdT &&value)
AllowedPrincipal & AddTags(TagsT &&value)
const Aws::String & GetServiceId() const
PrincipalType GetPrincipalType() const
AWS_EC2_API AllowedPrincipal & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
AllowedPrincipal & WithTags(TagsT &&value)
AllowedPrincipal & WithServiceId(ServiceIdT &&value)
AWS_EC2_API AllowedPrincipal()=default
void SetPrincipal(PrincipalT &&value)
AWS_EC2_API AllowedPrincipal(const Aws::Utils::Xml::XmlNode &xmlNode)
const Aws::String & GetServicePermissionId() const
AllowedPrincipal & WithPrincipalType(PrincipalType value)
const Aws::String & GetPrincipal() const
AllowedPrincipal & WithServicePermissionId(ServicePermissionIdT &&value)
void SetPrincipalType(PrincipalType value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
std::basic_ostream< char, std::char_traits< char > > OStream