AWS SDK for C++  1.9.123
AWS SDK for C++
AllowedPrincipal.h
Go to the documentation of this file.
1 
6 #pragma once
7 #include <aws/ec2/EC2_EXPORTS.h>
11 #include <utility>
12 
13 namespace Aws
14 {
15 namespace Utils
16 {
17 namespace Xml
18 {
19  class XmlNode;
20 } // namespace Xml
21 } // namespace Utils
22 namespace EC2
23 {
24 namespace Model
25 {
26 
33  {
34  public:
38 
39  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
40  void OutputToStream(Aws::OStream& oStream, const char* location) const;
41 
42 
46  inline const PrincipalType& GetPrincipalType() const{ return m_principalType; }
47 
51  inline bool PrincipalTypeHasBeenSet() const { return m_principalTypeHasBeenSet; }
52 
56  inline void SetPrincipalType(const PrincipalType& value) { m_principalTypeHasBeenSet = true; m_principalType = value; }
57 
61  inline void SetPrincipalType(PrincipalType&& value) { m_principalTypeHasBeenSet = true; m_principalType = std::move(value); }
62 
66  inline AllowedPrincipal& WithPrincipalType(const PrincipalType& value) { SetPrincipalType(value); return *this;}
67 
71  inline AllowedPrincipal& WithPrincipalType(PrincipalType&& value) { SetPrincipalType(std::move(value)); return *this;}
72 
73 
77  inline const Aws::String& GetPrincipal() const{ return m_principal; }
78 
82  inline bool PrincipalHasBeenSet() const { return m_principalHasBeenSet; }
83 
87  inline void SetPrincipal(const Aws::String& value) { m_principalHasBeenSet = true; m_principal = value; }
88 
92  inline void SetPrincipal(Aws::String&& value) { m_principalHasBeenSet = true; m_principal = std::move(value); }
93 
97  inline void SetPrincipal(const char* value) { m_principalHasBeenSet = true; m_principal.assign(value); }
98 
102  inline AllowedPrincipal& WithPrincipal(const Aws::String& value) { SetPrincipal(value); return *this;}
103 
107  inline AllowedPrincipal& WithPrincipal(Aws::String&& value) { SetPrincipal(std::move(value)); return *this;}
108 
112  inline AllowedPrincipal& WithPrincipal(const char* value) { SetPrincipal(value); return *this;}
113 
114  private:
115 
116  PrincipalType m_principalType;
117  bool m_principalTypeHasBeenSet;
118 
119  Aws::String m_principal;
120  bool m_principalHasBeenSet;
121  };
122 
123 } // namespace Model
124 } // namespace EC2
125 } // namespace Aws
Aws::EC2::Model::AllowedPrincipal::WithPrincipalType
AllowedPrincipal & WithPrincipalType(const PrincipalType &value)
Definition: AllowedPrincipal.h:66
Aws::EC2::Model::AllowedPrincipal::WithPrincipal
AllowedPrincipal & WithPrincipal(Aws::String &&value)
Definition: AllowedPrincipal.h:107
Aws::EC2::Model::AllowedPrincipal::OutputToStream
void OutputToStream(Aws::OStream &oStream, const char *location) const
Aws::EC2::Model::AllowedPrincipal::PrincipalHasBeenSet
bool PrincipalHasBeenSet() const
Definition: AllowedPrincipal.h:82
AWS_EC2_API
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:28
Aws::EC2::Model::AllowedPrincipal::operator=
AllowedPrincipal & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
AWSStreamFwd.h
Aws::EC2::Model::AllowedPrincipal::SetPrincipal
void SetPrincipal(const char *value)
Definition: AllowedPrincipal.h:97
Aws::OStream
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:21
Aws::EC2::Model::AllowedPrincipal
Definition: AllowedPrincipal.h:33
Aws::EC2::Model::AllowedPrincipal::WithPrincipal
AllowedPrincipal & WithPrincipal(const char *value)
Definition: AllowedPrincipal.h:112
Aws::Utils::Xml::XmlNode
Definition: XmlSerializer.h:53
AWSString.h
Aws::EC2::Model::AllowedPrincipal::SetPrincipal
void SetPrincipal(Aws::String &&value)
Definition: AllowedPrincipal.h:92
Aws::EC2::Model::AllowedPrincipal::SetPrincipalType
void SetPrincipalType(const PrincipalType &value)
Definition: AllowedPrincipal.h:56
Aws::EC2::Model::AllowedPrincipal::SetPrincipalType
void SetPrincipalType(PrincipalType &&value)
Definition: AllowedPrincipal.h:61
Aws::EC2::Model::AllowedPrincipal::WithPrincipal
AllowedPrincipal & WithPrincipal(const Aws::String &value)
Definition: AllowedPrincipal.h:102
Aws::EC2::Model::AllowedPrincipal::WithPrincipalType
AllowedPrincipal & WithPrincipalType(PrincipalType &&value)
Definition: AllowedPrincipal.h:71
Aws::EC2::Model::AllowedPrincipal::OutputToStream
void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
Aws
Definition: AccessManagementClient.h:15
Aws::EC2::Model::AllowedPrincipal::PrincipalTypeHasBeenSet
bool PrincipalTypeHasBeenSet() const
Definition: AllowedPrincipal.h:51
Aws::EC2::Model::AllowedPrincipal::GetPrincipalType
const PrincipalType & GetPrincipalType() const
Definition: AllowedPrincipal.h:46
Aws::EC2::Model::AllowedPrincipal::GetPrincipal
const Aws::String & GetPrincipal() const
Definition: AllowedPrincipal.h:77
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
index
int index
Definition: cJSON.h:181
Aws::EC2::Model::AllowedPrincipal::AllowedPrincipal
AllowedPrincipal()
Aws::EC2::Model::AllowedPrincipal::SetPrincipal
void SetPrincipal(const Aws::String &value)
Definition: AllowedPrincipal.h:87
EC2_EXPORTS.h
PrincipalType.h
Aws::EC2::Model::PrincipalType
PrincipalType
Definition: PrincipalType.h:17
Aws::EC2::Model::AllowedPrincipal::AllowedPrincipal
AllowedPrincipal(const Aws::Utils::Xml::XmlNode &xmlNode)