AWS SDK for C++  0.14.3
AWS SDK for C++
CreateImageRequest.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>
17 #include <aws/ec2/EC2Request.h>
21 
22 namespace Aws
23 {
24 namespace EC2
25 {
26 namespace Model
27 {
28 
33  {
34  public:
36  Aws::String SerializePayload() const override;
37 
44  inline bool GetDryRun() const{ return m_dryRun; }
45 
52  inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
53 
60  inline CreateImageRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
61 
65  inline const Aws::String& GetInstanceId() const{ return m_instanceId; }
66 
70  inline void SetInstanceId(const Aws::String& value) { m_instanceIdHasBeenSet = true; m_instanceId = value; }
71 
75  inline void SetInstanceId(Aws::String&& value) { m_instanceIdHasBeenSet = true; m_instanceId = value; }
76 
80  inline void SetInstanceId(const char* value) { m_instanceIdHasBeenSet = true; m_instanceId.assign(value); }
81 
85  inline CreateImageRequest& WithInstanceId(const Aws::String& value) { SetInstanceId(value); return *this;}
86 
90  inline CreateImageRequest& WithInstanceId(Aws::String&& value) { SetInstanceId(value); return *this;}
91 
95  inline CreateImageRequest& WithInstanceId(const char* value) { SetInstanceId(value); return *this;}
96 
102  inline const Aws::String& GetName() const{ return m_name; }
103 
109  inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
110 
116  inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = value; }
117 
123  inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
124 
130  inline CreateImageRequest& WithName(const Aws::String& value) { SetName(value); return *this;}
131 
137  inline CreateImageRequest& WithName(Aws::String&& value) { SetName(value); return *this;}
138 
144  inline CreateImageRequest& WithName(const char* value) { SetName(value); return *this;}
145 
149  inline const Aws::String& GetDescription() const{ return m_description; }
150 
154  inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }
155 
159  inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = value; }
160 
164  inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }
165 
169  inline CreateImageRequest& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}
170 
174  inline CreateImageRequest& WithDescription(Aws::String&& value) { SetDescription(value); return *this;}
175 
179  inline CreateImageRequest& WithDescription(const char* value) { SetDescription(value); return *this;}
180 
187  inline bool GetNoReboot() const{ return m_noReboot; }
188 
195  inline void SetNoReboot(bool value) { m_noRebootHasBeenSet = true; m_noReboot = value; }
196 
203  inline CreateImageRequest& WithNoReboot(bool value) { SetNoReboot(value); return *this;}
204 
208  inline const Aws::Vector<BlockDeviceMapping>& GetBlockDeviceMappings() const{ return m_blockDeviceMappings; }
209 
213  inline void SetBlockDeviceMappings(const Aws::Vector<BlockDeviceMapping>& value) { m_blockDeviceMappingsHasBeenSet = true; m_blockDeviceMappings = value; }
214 
218  inline void SetBlockDeviceMappings(Aws::Vector<BlockDeviceMapping>&& value) { m_blockDeviceMappingsHasBeenSet = true; m_blockDeviceMappings = value; }
219 
223  inline CreateImageRequest& WithBlockDeviceMappings(const Aws::Vector<BlockDeviceMapping>& value) { SetBlockDeviceMappings(value); return *this;}
224 
228  inline CreateImageRequest& WithBlockDeviceMappings(Aws::Vector<BlockDeviceMapping>&& value) { SetBlockDeviceMappings(value); return *this;}
229 
233  inline CreateImageRequest& AddBlockDeviceMappings(const BlockDeviceMapping& value) { m_blockDeviceMappingsHasBeenSet = true; m_blockDeviceMappings.push_back(value); return *this; }
234 
238  inline CreateImageRequest& AddBlockDeviceMappings(BlockDeviceMapping&& value) { m_blockDeviceMappingsHasBeenSet = true; m_blockDeviceMappings.push_back(value); return *this; }
239 
240  private:
241  bool m_dryRun;
242  bool m_dryRunHasBeenSet;
243  Aws::String m_instanceId;
244  bool m_instanceIdHasBeenSet;
245  Aws::String m_name;
246  bool m_nameHasBeenSet;
247  Aws::String m_description;
248  bool m_descriptionHasBeenSet;
249  bool m_noReboot;
250  bool m_noRebootHasBeenSet;
251  Aws::Vector<BlockDeviceMapping> m_blockDeviceMappings;
252  bool m_blockDeviceMappingsHasBeenSet;
253  };
254 
255 } // namespace Model
256 } // namespace EC2
257 } // namespace Aws
void SetDescription(const char *value)
CreateImageRequest & AddBlockDeviceMappings(BlockDeviceMapping &&value)
CreateImageRequest & WithInstanceId(Aws::String &&value)
void SetDescription(const Aws::String &value)
CreateImageRequest & WithBlockDeviceMappings(Aws::Vector< BlockDeviceMapping > &&value)
CreateImageRequest & WithDryRun(bool value)
CreateImageRequest & WithName(const Aws::String &value)
CreateImageRequest & WithInstanceId(const char *value)
CreateImageRequest & WithInstanceId(const Aws::String &value)
const Aws::String & GetInstanceId() const
const Aws::String & GetDescription() const
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
const Aws::String & GetName() const
CreateImageRequest & WithName(Aws::String &&value)
void SetInstanceId(const char *value)
CreateImageRequest & WithName(const char *value)
void SetBlockDeviceMappings(const Aws::Vector< BlockDeviceMapping > &value)
void SetBlockDeviceMappings(Aws::Vector< BlockDeviceMapping > &&value)
void SetInstanceId(Aws::String &&value)
void SetName(const Aws::String &value)
void SetInstanceId(const Aws::String &value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
const Aws::Vector< BlockDeviceMapping > & GetBlockDeviceMappings() const
CreateImageRequest & WithNoReboot(bool value)
CreateImageRequest & WithBlockDeviceMappings(const Aws::Vector< BlockDeviceMapping > &value)
void SetDescription(Aws::String &&value)
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:37
CreateImageRequest & WithDescription(Aws::String &&value)
CreateImageRequest & AddBlockDeviceMappings(const BlockDeviceMapping &value)
CreateImageRequest & WithDescription(const char *value)
JSON (JavaScript Object Notation).
CreateImageRequest & WithDescription(const Aws::String &value)