AWS SDK for C++  1.9.15
AWS SDK for C++
PutInstancePublicPortsRequest.h
Go to the documentation of this file.
1 
6 #pragma once
12 #include <utility>
13 
14 namespace Aws
15 {
16 namespace Lightsail
17 {
18 namespace Model
19 {
20 
24  {
25  public:
27 
28  // Service request name is the Operation name which will send this request out,
29  // each operation should has unique request name, so that we can get operation's name from this request.
30  // Note: this is not true for response, multiple operations may have the same response name,
31  // so we can not get operation's name from response.
32  inline virtual const char* GetServiceRequestName() const override { return "PutInstancePublicPorts"; }
33 
34  Aws::String SerializePayload() const override;
35 
37 
38 
43  inline const Aws::Vector<PortInfo>& GetPortInfos() const{ return m_portInfos; }
44 
49  inline bool PortInfosHasBeenSet() const { return m_portInfosHasBeenSet; }
50 
55  inline void SetPortInfos(const Aws::Vector<PortInfo>& value) { m_portInfosHasBeenSet = true; m_portInfos = value; }
56 
61  inline void SetPortInfos(Aws::Vector<PortInfo>&& value) { m_portInfosHasBeenSet = true; m_portInfos = std::move(value); }
62 
67  inline PutInstancePublicPortsRequest& WithPortInfos(const Aws::Vector<PortInfo>& value) { SetPortInfos(value); return *this;}
68 
73  inline PutInstancePublicPortsRequest& WithPortInfos(Aws::Vector<PortInfo>&& value) { SetPortInfos(std::move(value)); return *this;}
74 
79  inline PutInstancePublicPortsRequest& AddPortInfos(const PortInfo& value) { m_portInfosHasBeenSet = true; m_portInfos.push_back(value); return *this; }
80 
85  inline PutInstancePublicPortsRequest& AddPortInfos(PortInfo&& value) { m_portInfosHasBeenSet = true; m_portInfos.push_back(std::move(value)); return *this; }
86 
87 
91  inline const Aws::String& GetInstanceName() const{ return m_instanceName; }
92 
96  inline bool InstanceNameHasBeenSet() const { return m_instanceNameHasBeenSet; }
97 
101  inline void SetInstanceName(const Aws::String& value) { m_instanceNameHasBeenSet = true; m_instanceName = value; }
102 
106  inline void SetInstanceName(Aws::String&& value) { m_instanceNameHasBeenSet = true; m_instanceName = std::move(value); }
107 
111  inline void SetInstanceName(const char* value) { m_instanceNameHasBeenSet = true; m_instanceName.assign(value); }
112 
116  inline PutInstancePublicPortsRequest& WithInstanceName(const Aws::String& value) { SetInstanceName(value); return *this;}
117 
121  inline PutInstancePublicPortsRequest& WithInstanceName(Aws::String&& value) { SetInstanceName(std::move(value)); return *this;}
122 
126  inline PutInstancePublicPortsRequest& WithInstanceName(const char* value) { SetInstanceName(value); return *this;}
127 
128  private:
129 
130  Aws::Vector<PortInfo> m_portInfos;
131  bool m_portInfosHasBeenSet;
132 
133  Aws::String m_instanceName;
134  bool m_instanceNameHasBeenSet;
135  };
136 
137 } // namespace Model
138 } // namespace Lightsail
139 } // namespace Aws
Aws::Lightsail::Model::PutInstancePublicPortsRequest::WithInstanceName
PutInstancePublicPortsRequest & WithInstanceName(const Aws::String &value)
Definition: PutInstancePublicPortsRequest.h:116
Aws::Lightsail::Model::PutInstancePublicPortsRequest::SerializePayload
Aws::String SerializePayload() const override
Aws::Http::HeaderValueCollection
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:53
Aws::Lightsail::Model::PutInstancePublicPortsRequest::SetInstanceName
void SetInstanceName(const Aws::String &value)
Definition: PutInstancePublicPortsRequest.h:101
Aws::Lightsail::Model::PutInstancePublicPortsRequest::WithPortInfos
PutInstancePublicPortsRequest & WithPortInfos(Aws::Vector< PortInfo > &&value)
Definition: PutInstancePublicPortsRequest.h:73
Aws::Lightsail::Model::PutInstancePublicPortsRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: PutInstancePublicPortsRequest.h:32
Aws::Lightsail::Model::PutInstancePublicPortsRequest::WithPortInfos
PutInstancePublicPortsRequest & WithPortInfos(const Aws::Vector< PortInfo > &value)
Definition: PutInstancePublicPortsRequest.h:67
Aws::Lightsail::Model::PutInstancePublicPortsRequest::SetPortInfos
void SetPortInfos(Aws::Vector< PortInfo > &&value)
Definition: PutInstancePublicPortsRequest.h:61
Aws::Lightsail::Model::PutInstancePublicPortsRequest::InstanceNameHasBeenSet
bool InstanceNameHasBeenSet() const
Definition: PutInstancePublicPortsRequest.h:96
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
AWSVector.h
LightsailRequest.h
Aws::Lightsail::Model::PutInstancePublicPortsRequest::GetPortInfos
const Aws::Vector< PortInfo > & GetPortInfos() const
Definition: PutInstancePublicPortsRequest.h:43
Aws::Lightsail::Model::PutInstancePublicPortsRequest::GetRequestSpecificHeaders
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
Aws::Lightsail::Model::PutInstancePublicPortsRequest
Definition: PutInstancePublicPortsRequest.h:24
Aws::Lightsail::Model::PutInstancePublicPortsRequest::GetInstanceName
const Aws::String & GetInstanceName() const
Definition: PutInstancePublicPortsRequest.h:91
Aws::Lightsail::LightsailRequest
Definition: LightsailRequest.h:17
AWSString.h
Aws::Lightsail::Model::PutInstancePublicPortsRequest::PutInstancePublicPortsRequest
PutInstancePublicPortsRequest()
Lightsail_EXPORTS.h
Aws::Lightsail::Model::PutInstancePublicPortsRequest::SetPortInfos
void SetPortInfos(const Aws::Vector< PortInfo > &value)
Definition: PutInstancePublicPortsRequest.h:55
Aws::Lightsail::Model::PutInstancePublicPortsRequest::AddPortInfos
PutInstancePublicPortsRequest & AddPortInfos(const PortInfo &value)
Definition: PutInstancePublicPortsRequest.h:79
Aws::Lightsail::Model::PutInstancePublicPortsRequest::PortInfosHasBeenSet
bool PortInfosHasBeenSet() const
Definition: PutInstancePublicPortsRequest.h:49
Aws::Lightsail::Model::PutInstancePublicPortsRequest::SetInstanceName
void SetInstanceName(Aws::String &&value)
Definition: PutInstancePublicPortsRequest.h:106
Aws
Definition: AccessManagementClient.h:15
Aws::Lightsail::Model::PutInstancePublicPortsRequest::SetInstanceName
void SetInstanceName(const char *value)
Definition: PutInstancePublicPortsRequest.h:111
Aws::Lightsail::Model::PutInstancePublicPortsRequest::WithInstanceName
PutInstancePublicPortsRequest & WithInstanceName(Aws::String &&value)
Definition: PutInstancePublicPortsRequest.h:121
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::Lightsail::Model::PutInstancePublicPortsRequest::WithInstanceName
PutInstancePublicPortsRequest & WithInstanceName(const char *value)
Definition: PutInstancePublicPortsRequest.h:126
Aws::Lightsail::Model::PortInfo
Definition: PortInfo.h:36
AWS_LIGHTSAIL_API
#define AWS_LIGHTSAIL_API
Definition: Lightsail_EXPORTS.h:28
Aws::Lightsail::Model::PutInstancePublicPortsRequest::AddPortInfos
PutInstancePublicPortsRequest & AddPortInfos(PortInfo &&value)
Definition: PutInstancePublicPortsRequest.h:85
PortInfo.h