AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
AllowedPrincipal.h
1
6#pragma once
7#include <aws/ec2/EC2_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9#include <aws/ec2/model/PrincipalType.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11#include <aws/core/utils/memory/stl/AWSVector.h>
12#include <aws/ec2/model/Tag.h>
13#include <utility>
14
15namespace Aws
16{
17namespace Utils
18{
19namespace Xml
20{
21 class XmlNode;
22} // namespace Xml
23} // namespace Utils
24namespace EC2
25{
26namespace Model
27{
28
35 {
36 public:
37 AWS_EC2_API AllowedPrincipal() = default;
38 AWS_EC2_API AllowedPrincipal(const Aws::Utils::Xml::XmlNode& xmlNode);
40
41 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
42 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
43
44
46
49 inline PrincipalType GetPrincipalType() const { return m_principalType; }
50 inline bool PrincipalTypeHasBeenSet() const { return m_principalTypeHasBeenSet; }
51 inline void SetPrincipalType(PrincipalType value) { m_principalTypeHasBeenSet = true; m_principalType = value; }
52 inline AllowedPrincipal& WithPrincipalType(PrincipalType value) { SetPrincipalType(value); return *this;}
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) { m_principalHasBeenSet = true; m_principal = std::forward<PrincipalT>(value); }
63 template<typename PrincipalT = Aws::String>
64 AllowedPrincipal& WithPrincipal(PrincipalT&& value) { SetPrincipal(std::forward<PrincipalT>(value)); return *this;}
66
68
71 inline const Aws::String& GetServicePermissionId() const { return m_servicePermissionId; }
72 inline bool ServicePermissionIdHasBeenSet() const { return m_servicePermissionIdHasBeenSet; }
73 template<typename ServicePermissionIdT = Aws::String>
74 void SetServicePermissionId(ServicePermissionIdT&& value) { m_servicePermissionIdHasBeenSet = true; m_servicePermissionId = std::forward<ServicePermissionIdT>(value); }
75 template<typename ServicePermissionIdT = Aws::String>
76 AllowedPrincipal& WithServicePermissionId(ServicePermissionIdT&& value) { SetServicePermissionId(std::forward<ServicePermissionIdT>(value)); return *this;}
78
80
83 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
84 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
85 template<typename TagsT = Aws::Vector<Tag>>
86 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
87 template<typename TagsT = Aws::Vector<Tag>>
88 AllowedPrincipal& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
89 template<typename TagsT = Tag>
90 AllowedPrincipal& AddTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags.emplace_back(std::forward<TagsT>(value)); return *this; }
92
94
97 inline const Aws::String& GetServiceId() const { return m_serviceId; }
98 inline bool ServiceIdHasBeenSet() const { return m_serviceIdHasBeenSet; }
99 template<typename ServiceIdT = Aws::String>
100 void SetServiceId(ServiceIdT&& value) { m_serviceIdHasBeenSet = true; m_serviceId = std::forward<ServiceIdT>(value); }
101 template<typename ServiceIdT = Aws::String>
102 AllowedPrincipal& WithServiceId(ServiceIdT&& value) { SetServiceId(std::forward<ServiceIdT>(value)); return *this;}
104 private:
105
106 PrincipalType m_principalType{PrincipalType::NOT_SET};
107 bool m_principalTypeHasBeenSet = false;
108
109 Aws::String m_principal;
110 bool m_principalHasBeenSet = false;
111
112 Aws::String m_servicePermissionId;
113 bool m_servicePermissionIdHasBeenSet = false;
114
115 Aws::Vector<Tag> m_tags;
116 bool m_tagsHasBeenSet = false;
117
118 Aws::String m_serviceId;
119 bool m_serviceIdHasBeenSet = false;
120 };
121
122} // namespace Model
123} // namespace EC2
124} // 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