AWS SDK for C++  1.8.71
AWS SDK for C++
CreateDiskRequest.h
Go to the documentation of this file.
1 
6 #pragma once
13 #include <utility>
14 
15 namespace Aws
16 {
17 namespace Lightsail
18 {
19 namespace Model
20 {
21 
25  {
26  public:
28 
29  // Service request name is the Operation name which will send this request out,
30  // each operation should has unique request name, so that we can get operation's name from this request.
31  // Note: this is not true for response, multiple operations may have the same response name,
32  // so we can not get operation's name from response.
33  inline virtual const char* GetServiceRequestName() const override { return "CreateDisk"; }
34 
35  Aws::String SerializePayload() const override;
36 
37  Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
38 
39 
43  inline const Aws::String& GetDiskName() const{ return m_diskName; }
44 
48  inline bool DiskNameHasBeenSet() const { return m_diskNameHasBeenSet; }
49 
53  inline void SetDiskName(const Aws::String& value) { m_diskNameHasBeenSet = true; m_diskName = value; }
54 
58  inline void SetDiskName(Aws::String&& value) { m_diskNameHasBeenSet = true; m_diskName = std::move(value); }
59 
63  inline void SetDiskName(const char* value) { m_diskNameHasBeenSet = true; m_diskName.assign(value); }
64 
68  inline CreateDiskRequest& WithDiskName(const Aws::String& value) { SetDiskName(value); return *this;}
69 
73  inline CreateDiskRequest& WithDiskName(Aws::String&& value) { SetDiskName(std::move(value)); return *this;}
74 
78  inline CreateDiskRequest& WithDiskName(const char* value) { SetDiskName(value); return *this;}
79 
80 
88  inline const Aws::String& GetAvailabilityZone() const{ return m_availabilityZone; }
89 
97  inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; }
98 
106  inline void SetAvailabilityZone(const Aws::String& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = value; }
107 
115  inline void SetAvailabilityZone(Aws::String&& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = std::move(value); }
116 
124  inline void SetAvailabilityZone(const char* value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone.assign(value); }
125 
133  inline CreateDiskRequest& WithAvailabilityZone(const Aws::String& value) { SetAvailabilityZone(value); return *this;}
134 
142  inline CreateDiskRequest& WithAvailabilityZone(Aws::String&& value) { SetAvailabilityZone(std::move(value)); return *this;}
143 
151  inline CreateDiskRequest& WithAvailabilityZone(const char* value) { SetAvailabilityZone(value); return *this;}
152 
153 
157  inline int GetSizeInGb() const{ return m_sizeInGb; }
158 
162  inline bool SizeInGbHasBeenSet() const { return m_sizeInGbHasBeenSet; }
163 
167  inline void SetSizeInGb(int value) { m_sizeInGbHasBeenSet = true; m_sizeInGb = value; }
168 
172  inline CreateDiskRequest& WithSizeInGb(int value) { SetSizeInGb(value); return *this;}
173 
174 
180  inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
181 
187  inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
188 
194  inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
195 
201  inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
202 
208  inline CreateDiskRequest& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
209 
215  inline CreateDiskRequest& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
216 
222  inline CreateDiskRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
223 
229  inline CreateDiskRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
230 
231 
236  inline const Aws::Vector<AddOnRequest>& GetAddOns() const{ return m_addOns; }
237 
242  inline bool AddOnsHasBeenSet() const { return m_addOnsHasBeenSet; }
243 
248  inline void SetAddOns(const Aws::Vector<AddOnRequest>& value) { m_addOnsHasBeenSet = true; m_addOns = value; }
249 
254  inline void SetAddOns(Aws::Vector<AddOnRequest>&& value) { m_addOnsHasBeenSet = true; m_addOns = std::move(value); }
255 
260  inline CreateDiskRequest& WithAddOns(const Aws::Vector<AddOnRequest>& value) { SetAddOns(value); return *this;}
261 
266  inline CreateDiskRequest& WithAddOns(Aws::Vector<AddOnRequest>&& value) { SetAddOns(std::move(value)); return *this;}
267 
272  inline CreateDiskRequest& AddAddOns(const AddOnRequest& value) { m_addOnsHasBeenSet = true; m_addOns.push_back(value); return *this; }
273 
278  inline CreateDiskRequest& AddAddOns(AddOnRequest&& value) { m_addOnsHasBeenSet = true; m_addOns.push_back(std::move(value)); return *this; }
279 
280  private:
281 
282  Aws::String m_diskName;
283  bool m_diskNameHasBeenSet;
284 
285  Aws::String m_availabilityZone;
286  bool m_availabilityZoneHasBeenSet;
287 
288  int m_sizeInGb;
289  bool m_sizeInGbHasBeenSet;
290 
291  Aws::Vector<Tag> m_tags;
292  bool m_tagsHasBeenSet;
293 
294  Aws::Vector<AddOnRequest> m_addOns;
295  bool m_addOnsHasBeenSet;
296  };
297 
298 } // namespace Model
299 } // namespace Lightsail
300 } // namespace Aws
CreateDiskRequest & WithDiskName(const char *value)
const Aws::Vector< AddOnRequest > & GetAddOns() const
CreateDiskRequest & WithSizeInGb(int value)
CreateDiskRequest & AddTags(const Tag &value)
virtual const char * GetServiceRequestName() const override
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
void SetTags(Aws::Vector< Tag > &&value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:53
void SetAvailabilityZone(Aws::String &&value)
CreateDiskRequest & WithAvailabilityZone(const char *value)
void SetAddOns(Aws::Vector< AddOnRequest > &&value)
void SetAvailabilityZone(const Aws::String &value)
CreateDiskRequest & WithAddOns(const Aws::Vector< AddOnRequest > &value)
void SetAddOns(const Aws::Vector< AddOnRequest > &value)
CreateDiskRequest & WithTags(const Aws::Vector< Tag > &value)
CreateDiskRequest & WithDiskName(const Aws::String &value)
const Aws::Vector< Tag > & GetTags() const
CreateDiskRequest & AddAddOns(AddOnRequest &&value)
CreateDiskRequest & AddAddOns(const AddOnRequest &value)
CreateDiskRequest & WithAvailabilityZone(const Aws::String &value)
void SetDiskName(const Aws::String &value)
CreateDiskRequest & WithDiskName(Aws::String &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
const Aws::String & GetDiskName() const
CreateDiskRequest & WithTags(Aws::Vector< Tag > &&value)
CreateDiskRequest & WithAvailabilityZone(Aws::String &&value)
#define AWS_LIGHTSAIL_API
const Aws::String & GetAvailabilityZone() const
void SetTags(const Aws::Vector< Tag > &value)
CreateDiskRequest & WithAddOns(Aws::Vector< AddOnRequest > &&value)
CreateDiskRequest & AddTags(Tag &&value)