AWS SDK for C++  0.12.9
AWS SDK for C++
NetworkInterfaceAttachment.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
16 #include <aws/ec2/EC2_EXPORTS.h>
21 
22 namespace Aws
23 {
24 namespace Utils
25 {
26 namespace Xml
27 {
28  class XmlNode;
29 } // namespace Xml
30 } // namespace Utils
31 namespace EC2
32 {
33 namespace Model
34 {
35 
40  {
41  public:
44  NetworkInterfaceAttachment& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
45 
46  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
47  void OutputToStream(Aws::OStream& oStream, const char* location) const;
48 
52  inline const Aws::String& GetAttachmentId() const{ return m_attachmentId; }
53 
57  inline void SetAttachmentId(const Aws::String& value) { m_attachmentIdHasBeenSet = true; m_attachmentId = value; }
58 
62  inline void SetAttachmentId(Aws::String&& value) { m_attachmentIdHasBeenSet = true; m_attachmentId = value; }
63 
67  inline void SetAttachmentId(const char* value) { m_attachmentIdHasBeenSet = true; m_attachmentId.assign(value); }
68 
72  inline NetworkInterfaceAttachment& WithAttachmentId(const Aws::String& value) { SetAttachmentId(value); return *this;}
73 
77  inline NetworkInterfaceAttachment& WithAttachmentId(Aws::String&& value) { SetAttachmentId(value); return *this;}
78 
82  inline NetworkInterfaceAttachment& WithAttachmentId(const char* value) { SetAttachmentId(value); return *this;}
83 
87  inline const Aws::String& GetInstanceId() const{ return m_instanceId; }
88 
92  inline void SetInstanceId(const Aws::String& value) { m_instanceIdHasBeenSet = true; m_instanceId = value; }
93 
97  inline void SetInstanceId(Aws::String&& value) { m_instanceIdHasBeenSet = true; m_instanceId = value; }
98 
102  inline void SetInstanceId(const char* value) { m_instanceIdHasBeenSet = true; m_instanceId.assign(value); }
103 
107  inline NetworkInterfaceAttachment& WithInstanceId(const Aws::String& value) { SetInstanceId(value); return *this;}
108 
112  inline NetworkInterfaceAttachment& WithInstanceId(Aws::String&& value) { SetInstanceId(value); return *this;}
113 
117  inline NetworkInterfaceAttachment& WithInstanceId(const char* value) { SetInstanceId(value); return *this;}
118 
122  inline const Aws::String& GetInstanceOwnerId() const{ return m_instanceOwnerId; }
123 
127  inline void SetInstanceOwnerId(const Aws::String& value) { m_instanceOwnerIdHasBeenSet = true; m_instanceOwnerId = value; }
128 
132  inline void SetInstanceOwnerId(Aws::String&& value) { m_instanceOwnerIdHasBeenSet = true; m_instanceOwnerId = value; }
133 
137  inline void SetInstanceOwnerId(const char* value) { m_instanceOwnerIdHasBeenSet = true; m_instanceOwnerId.assign(value); }
138 
142  inline NetworkInterfaceAttachment& WithInstanceOwnerId(const Aws::String& value) { SetInstanceOwnerId(value); return *this;}
143 
147  inline NetworkInterfaceAttachment& WithInstanceOwnerId(Aws::String&& value) { SetInstanceOwnerId(value); return *this;}
148 
152  inline NetworkInterfaceAttachment& WithInstanceOwnerId(const char* value) { SetInstanceOwnerId(value); return *this;}
153 
157  inline long GetDeviceIndex() const{ return m_deviceIndex; }
158 
162  inline void SetDeviceIndex(long value) { m_deviceIndexHasBeenSet = true; m_deviceIndex = value; }
163 
167  inline NetworkInterfaceAttachment& WithDeviceIndex(long value) { SetDeviceIndex(value); return *this;}
168 
172  inline const AttachmentStatus& GetStatus() const{ return m_status; }
173 
177  inline void SetStatus(const AttachmentStatus& value) { m_statusHasBeenSet = true; m_status = value; }
178 
182  inline void SetStatus(AttachmentStatus&& value) { m_statusHasBeenSet = true; m_status = value; }
183 
187  inline NetworkInterfaceAttachment& WithStatus(const AttachmentStatus& value) { SetStatus(value); return *this;}
188 
192  inline NetworkInterfaceAttachment& WithStatus(AttachmentStatus&& value) { SetStatus(value); return *this;}
193 
197  inline const Aws::Utils::DateTime& GetAttachTime() const{ return m_attachTime; }
198 
202  inline void SetAttachTime(const Aws::Utils::DateTime& value) { m_attachTimeHasBeenSet = true; m_attachTime = value; }
203 
207  inline void SetAttachTime(Aws::Utils::DateTime&& value) { m_attachTimeHasBeenSet = true; m_attachTime = value; }
208 
212  inline NetworkInterfaceAttachment& WithAttachTime(const Aws::Utils::DateTime& value) { SetAttachTime(value); return *this;}
213 
217  inline NetworkInterfaceAttachment& WithAttachTime(Aws::Utils::DateTime&& value) { SetAttachTime(value); return *this;}
218 
223  inline bool GetDeleteOnTermination() const{ return m_deleteOnTermination; }
224 
229  inline void SetDeleteOnTermination(bool value) { m_deleteOnTerminationHasBeenSet = true; m_deleteOnTermination = value; }
230 
235  inline NetworkInterfaceAttachment& WithDeleteOnTermination(bool value) { SetDeleteOnTermination(value); return *this;}
236 
237  private:
238  Aws::String m_attachmentId;
239  bool m_attachmentIdHasBeenSet;
240  Aws::String m_instanceId;
241  bool m_instanceIdHasBeenSet;
242  Aws::String m_instanceOwnerId;
243  bool m_instanceOwnerIdHasBeenSet;
244  long m_deviceIndex;
245  bool m_deviceIndexHasBeenSet;
246  AttachmentStatus m_status;
247  bool m_statusHasBeenSet;
248  Aws::Utils::DateTime m_attachTime;
249  bool m_attachTimeHasBeenSet;
250  bool m_deleteOnTermination;
251  bool m_deleteOnTerminationHasBeenSet;
252  };
253 
254 } // namespace Model
255 } // namespace EC2
256 } // namespace Aws
NetworkInterfaceAttachment & WithAttachmentId(const char *value)
NetworkInterfaceAttachment & WithInstanceOwnerId(const Aws::String &value)
NetworkInterfaceAttachment & WithInstanceOwnerId(Aws::String &&value)
NetworkInterfaceAttachment & WithDeviceIndex(long value)
void SetAttachTime(Aws::Utils::DateTime &&value)
NetworkInterfaceAttachment & WithAttachmentId(Aws::String &&value)
NetworkInterfaceAttachment & WithInstanceOwnerId(const char *value)
NetworkInterfaceAttachment & WithInstanceId(const Aws::String &value)
NetworkInterfaceAttachment & WithDeleteOnTermination(bool value)
NetworkInterfaceAttachment & WithStatus(AttachmentStatus &&value)
const Aws::Utils::DateTime & GetAttachTime() const
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
NetworkInterfaceAttachment & WithAttachTime(Aws::Utils::DateTime &&value)
NetworkInterfaceAttachment & WithAttachTime(const Aws::Utils::DateTime &value)
NetworkInterfaceAttachment & WithInstanceId(const char *value)
NetworkInterfaceAttachment & WithStatus(const AttachmentStatus &value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
NetworkInterfaceAttachment & WithInstanceId(Aws::String &&value)
NetworkInterfaceAttachment & WithAttachmentId(const Aws::String &value)
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:34
JSON (JavaScript Object Notation).
void SetAttachTime(const Aws::Utils::DateTime &value)