AWS SDK for C++  0.12.9
AWS SDK for C++
InstanceNetworkInterfaceAttachment.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:
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 InstanceNetworkInterfaceAttachment& WithAttachmentId(const Aws::String& value) { SetAttachmentId(value); return *this;}
73 
77  inline InstanceNetworkInterfaceAttachment& WithAttachmentId(Aws::String&& value) { SetAttachmentId(value); return *this;}
78 
82  inline InstanceNetworkInterfaceAttachment& WithAttachmentId(const char* value) { SetAttachmentId(value); return *this;}
83 
88  inline long GetDeviceIndex() const{ return m_deviceIndex; }
89 
94  inline void SetDeviceIndex(long value) { m_deviceIndexHasBeenSet = true; m_deviceIndex = value; }
95 
100  inline InstanceNetworkInterfaceAttachment& WithDeviceIndex(long value) { SetDeviceIndex(value); return *this;}
101 
105  inline const AttachmentStatus& GetStatus() const{ return m_status; }
106 
110  inline void SetStatus(const AttachmentStatus& value) { m_statusHasBeenSet = true; m_status = value; }
111 
115  inline void SetStatus(AttachmentStatus&& value) { m_statusHasBeenSet = true; m_status = value; }
116 
120  inline InstanceNetworkInterfaceAttachment& WithStatus(const AttachmentStatus& value) { SetStatus(value); return *this;}
121 
125  inline InstanceNetworkInterfaceAttachment& WithStatus(AttachmentStatus&& value) { SetStatus(value); return *this;}
126 
130  inline const Aws::Utils::DateTime& GetAttachTime() const{ return m_attachTime; }
131 
135  inline void SetAttachTime(const Aws::Utils::DateTime& value) { m_attachTimeHasBeenSet = true; m_attachTime = value; }
136 
140  inline void SetAttachTime(Aws::Utils::DateTime&& value) { m_attachTimeHasBeenSet = true; m_attachTime = value; }
141 
145  inline InstanceNetworkInterfaceAttachment& WithAttachTime(const Aws::Utils::DateTime& value) { SetAttachTime(value); return *this;}
146 
150  inline InstanceNetworkInterfaceAttachment& WithAttachTime(Aws::Utils::DateTime&& value) { SetAttachTime(value); return *this;}
151 
156  inline bool GetDeleteOnTermination() const{ return m_deleteOnTermination; }
157 
162  inline void SetDeleteOnTermination(bool value) { m_deleteOnTerminationHasBeenSet = true; m_deleteOnTermination = value; }
163 
168  inline InstanceNetworkInterfaceAttachment& WithDeleteOnTermination(bool value) { SetDeleteOnTermination(value); return *this;}
169 
170  private:
171  Aws::String m_attachmentId;
172  bool m_attachmentIdHasBeenSet;
173  long m_deviceIndex;
174  bool m_deviceIndexHasBeenSet;
175  AttachmentStatus m_status;
176  bool m_statusHasBeenSet;
177  Aws::Utils::DateTime m_attachTime;
178  bool m_attachTimeHasBeenSet;
179  bool m_deleteOnTermination;
180  bool m_deleteOnTerminationHasBeenSet;
181  };
182 
183 } // namespace Model
184 } // namespace EC2
185 } // namespace Aws
InstanceNetworkInterfaceAttachment & WithAttachmentId(const Aws::String &value)
InstanceNetworkInterfaceAttachment & WithAttachTime(Aws::Utils::DateTime &&value)
InstanceNetworkInterfaceAttachment & WithAttachmentId(Aws::String &&value)
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
InstanceNetworkInterfaceAttachment & WithDeleteOnTermination(bool value)
InstanceNetworkInterfaceAttachment & WithStatus(AttachmentStatus &&value)
InstanceNetworkInterfaceAttachment & WithStatus(const AttachmentStatus &value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
InstanceNetworkInterfaceAttachment & WithDeviceIndex(long value)
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:34
InstanceNetworkInterfaceAttachment & WithAttachmentId(const char *value)
JSON (JavaScript Object Notation).
InstanceNetworkInterfaceAttachment & WithAttachTime(const Aws::Utils::DateTime &value)