AWS SDK for C++

AWS SDK for C++ Version 1.11.440

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();
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 const PrincipalType& GetPrincipalType() const{ return m_principalType; }
50 inline bool PrincipalTypeHasBeenSet() const { return m_principalTypeHasBeenSet; }
51 inline void SetPrincipalType(const PrincipalType& value) { m_principalTypeHasBeenSet = true; m_principalType = value; }
52 inline void SetPrincipalType(PrincipalType&& value) { m_principalTypeHasBeenSet = true; m_principalType = std::move(value); }
53 inline AllowedPrincipal& WithPrincipalType(const PrincipalType& value) { SetPrincipalType(value); return *this;}
54 inline AllowedPrincipal& WithPrincipalType(PrincipalType&& value) { SetPrincipalType(std::move(value)); return *this;}
56
58
61 inline const Aws::String& GetPrincipal() const{ return m_principal; }
62 inline bool PrincipalHasBeenSet() const { return m_principalHasBeenSet; }
63 inline void SetPrincipal(const Aws::String& value) { m_principalHasBeenSet = true; m_principal = value; }
64 inline void SetPrincipal(Aws::String&& value) { m_principalHasBeenSet = true; m_principal = std::move(value); }
65 inline void SetPrincipal(const char* value) { m_principalHasBeenSet = true; m_principal.assign(value); }
66 inline AllowedPrincipal& WithPrincipal(const Aws::String& value) { SetPrincipal(value); return *this;}
67 inline AllowedPrincipal& WithPrincipal(Aws::String&& value) { SetPrincipal(std::move(value)); return *this;}
68 inline AllowedPrincipal& WithPrincipal(const char* value) { SetPrincipal(value); return *this;}
70
72
75 inline const Aws::String& GetServicePermissionId() const{ return m_servicePermissionId; }
76 inline bool ServicePermissionIdHasBeenSet() const { return m_servicePermissionIdHasBeenSet; }
77 inline void SetServicePermissionId(const Aws::String& value) { m_servicePermissionIdHasBeenSet = true; m_servicePermissionId = value; }
78 inline void SetServicePermissionId(Aws::String&& value) { m_servicePermissionIdHasBeenSet = true; m_servicePermissionId = std::move(value); }
79 inline void SetServicePermissionId(const char* value) { m_servicePermissionIdHasBeenSet = true; m_servicePermissionId.assign(value); }
80 inline AllowedPrincipal& WithServicePermissionId(const Aws::String& value) { SetServicePermissionId(value); return *this;}
81 inline AllowedPrincipal& WithServicePermissionId(Aws::String&& value) { SetServicePermissionId(std::move(value)); return *this;}
82 inline AllowedPrincipal& WithServicePermissionId(const char* value) { SetServicePermissionId(value); return *this;}
84
86
89 inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
90 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
91 inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
92 inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
93 inline AllowedPrincipal& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
94 inline AllowedPrincipal& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
95 inline AllowedPrincipal& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
96 inline AllowedPrincipal& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
98
100
103 inline const Aws::String& GetServiceId() const{ return m_serviceId; }
104 inline bool ServiceIdHasBeenSet() const { return m_serviceIdHasBeenSet; }
105 inline void SetServiceId(const Aws::String& value) { m_serviceIdHasBeenSet = true; m_serviceId = value; }
106 inline void SetServiceId(Aws::String&& value) { m_serviceIdHasBeenSet = true; m_serviceId = std::move(value); }
107 inline void SetServiceId(const char* value) { m_serviceIdHasBeenSet = true; m_serviceId.assign(value); }
108 inline AllowedPrincipal& WithServiceId(const Aws::String& value) { SetServiceId(value); return *this;}
109 inline AllowedPrincipal& WithServiceId(Aws::String&& value) { SetServiceId(std::move(value)); return *this;}
110 inline AllowedPrincipal& WithServiceId(const char* value) { SetServiceId(value); return *this;}
112 private:
113
114 PrincipalType m_principalType;
115 bool m_principalTypeHasBeenSet = false;
116
117 Aws::String m_principal;
118 bool m_principalHasBeenSet = false;
119
120 Aws::String m_servicePermissionId;
121 bool m_servicePermissionIdHasBeenSet = false;
122
123 Aws::Vector<Tag> m_tags;
124 bool m_tagsHasBeenSet = false;
125
126 Aws::String m_serviceId;
127 bool m_serviceIdHasBeenSet = false;
128 };
129
130} // namespace Model
131} // namespace EC2
132} // namespace Aws
void SetServiceId(const char *value)
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
void SetServicePermissionId(const char *value)
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
const Aws::Vector< Tag > & GetTags() const
AllowedPrincipal & WithServicePermissionId(const char *value)
void SetServiceId(Aws::String &&value)
AllowedPrincipal & WithServiceId(const char *value)
AllowedPrincipal & WithTags(const Aws::Vector< Tag > &value)
const PrincipalType & GetPrincipalType() const
const Aws::String & GetServiceId() const
void SetServicePermissionId(Aws::String &&value)
void SetPrincipal(const char *value)
AWS_EC2_API AllowedPrincipal & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetPrincipalType(const PrincipalType &value)
AllowedPrincipal & WithTags(Aws::Vector< Tag > &&value)
void SetPrincipal(Aws::String &&value)
AllowedPrincipal & WithPrincipalType(const PrincipalType &value)
void SetServiceId(const Aws::String &value)
AllowedPrincipal & WithServiceId(Aws::String &&value)
AWS_EC2_API AllowedPrincipal(const Aws::Utils::Xml::XmlNode &xmlNode)
AllowedPrincipal & AddTags(Tag &&value)
void SetTags(const Aws::Vector< Tag > &value)
const Aws::String & GetServicePermissionId() const
void SetPrincipal(const Aws::String &value)
AllowedPrincipal & WithServicePermissionId(Aws::String &&value)
void SetPrincipalType(PrincipalType &&value)
const Aws::String & GetPrincipal() const
AllowedPrincipal & WithPrincipal(Aws::String &&value)
AllowedPrincipal & WithPrincipal(const char *value)
void SetTags(Aws::Vector< Tag > &&value)
AllowedPrincipal & WithPrincipalType(PrincipalType &&value)
AllowedPrincipal & WithPrincipal(const Aws::String &value)
AllowedPrincipal & AddTags(const Tag &value)
void SetServicePermissionId(const Aws::String &value)
AllowedPrincipal & WithServiceId(const Aws::String &value)
AllowedPrincipal & WithServicePermissionId(const Aws::String &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