AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
CreateDiskRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/lightsail/LightsailRequest.h>
10#include <aws/lightsail/Lightsail_EXPORTS.h>
11#include <aws/lightsail/model/AddOnRequest.h>
12#include <aws/lightsail/model/Tag.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Lightsail {
18namespace Model {
19
23 public:
24 AWS_LIGHTSAIL_API CreateDiskRequest() = default;
25
26 // Service request name is the Operation name which will send this request out,
27 // each operation should has unique request name, so that we can get operation's name from this request.
28 // Note: this is not true for response, multiple operations may have the same response name,
29 // so we can not get operation's name from response.
30 inline virtual const char* GetServiceRequestName() const override { return "CreateDisk"; }
31
32 AWS_LIGHTSAIL_API Aws::String SerializePayload() const override;
33
35
37
40 inline const Aws::String& GetDiskName() const { return m_diskName; }
41 inline bool DiskNameHasBeenSet() const { return m_diskNameHasBeenSet; }
42 template <typename DiskNameT = Aws::String>
43 void SetDiskName(DiskNameT&& value) {
44 m_diskNameHasBeenSet = true;
45 m_diskName = std::forward<DiskNameT>(value);
46 }
47 template <typename DiskNameT = Aws::String>
48 CreateDiskRequest& WithDiskName(DiskNameT&& value) {
49 SetDiskName(std::forward<DiskNameT>(value));
50 return *this;
51 }
53
55
62 inline const Aws::String& GetAvailabilityZone() const { return m_availabilityZone; }
63 inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; }
64 template <typename AvailabilityZoneT = Aws::String>
65 void SetAvailabilityZone(AvailabilityZoneT&& value) {
66 m_availabilityZoneHasBeenSet = true;
67 m_availabilityZone = std::forward<AvailabilityZoneT>(value);
68 }
69 template <typename AvailabilityZoneT = Aws::String>
70 CreateDiskRequest& WithAvailabilityZone(AvailabilityZoneT&& value) {
71 SetAvailabilityZone(std::forward<AvailabilityZoneT>(value));
72 return *this;
73 }
75
77
80 inline int GetSizeInGb() const { return m_sizeInGb; }
81 inline bool SizeInGbHasBeenSet() const { return m_sizeInGbHasBeenSet; }
82 inline void SetSizeInGb(int value) {
83 m_sizeInGbHasBeenSet = true;
84 m_sizeInGb = value;
85 }
86 inline CreateDiskRequest& WithSizeInGb(int value) {
87 SetSizeInGb(value);
88 return *this;
89 }
91
93
98 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
99 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
100 template <typename TagsT = Aws::Vector<Tag>>
101 void SetTags(TagsT&& value) {
102 m_tagsHasBeenSet = true;
103 m_tags = std::forward<TagsT>(value);
104 }
105 template <typename TagsT = Aws::Vector<Tag>>
106 CreateDiskRequest& WithTags(TagsT&& value) {
107 SetTags(std::forward<TagsT>(value));
108 return *this;
109 }
110 template <typename TagsT = Tag>
111 CreateDiskRequest& AddTags(TagsT&& value) {
112 m_tagsHasBeenSet = true;
113 m_tags.emplace_back(std::forward<TagsT>(value));
114 return *this;
115 }
117
119
123 inline const Aws::Vector<AddOnRequest>& GetAddOns() const { return m_addOns; }
124 inline bool AddOnsHasBeenSet() const { return m_addOnsHasBeenSet; }
125 template <typename AddOnsT = Aws::Vector<AddOnRequest>>
126 void SetAddOns(AddOnsT&& value) {
127 m_addOnsHasBeenSet = true;
128 m_addOns = std::forward<AddOnsT>(value);
129 }
130 template <typename AddOnsT = Aws::Vector<AddOnRequest>>
131 CreateDiskRequest& WithAddOns(AddOnsT&& value) {
132 SetAddOns(std::forward<AddOnsT>(value));
133 return *this;
134 }
135 template <typename AddOnsT = AddOnRequest>
136 CreateDiskRequest& AddAddOns(AddOnsT&& value) {
137 m_addOnsHasBeenSet = true;
138 m_addOns.emplace_back(std::forward<AddOnsT>(value));
139 return *this;
140 }
142 private:
143 Aws::String m_diskName;
144
145 Aws::String m_availabilityZone;
146
147 int m_sizeInGb{0};
148
149 Aws::Vector<Tag> m_tags;
150
152 bool m_diskNameHasBeenSet = false;
153 bool m_availabilityZoneHasBeenSet = false;
154 bool m_sizeInGbHasBeenSet = false;
155 bool m_tagsHasBeenSet = false;
156 bool m_addOnsHasBeenSet = false;
157};
158
159} // namespace Model
160} // namespace Lightsail
161} // namespace Aws
const Aws::Vector< Tag > & GetTags() const
const Aws::String & GetAvailabilityZone() const
virtual const char * GetServiceRequestName() const override
void SetAvailabilityZone(AvailabilityZoneT &&value)
CreateDiskRequest & AddTags(TagsT &&value)
CreateDiskRequest & WithDiskName(DiskNameT &&value)
AWS_LIGHTSAIL_API CreateDiskRequest()=default
AWS_LIGHTSAIL_API Aws::String SerializePayload() const override
CreateDiskRequest & WithAvailabilityZone(AvailabilityZoneT &&value)
const Aws::String & GetDiskName() const
AWS_LIGHTSAIL_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
CreateDiskRequest & WithSizeInGb(int value)
const Aws::Vector< AddOnRequest > & GetAddOns() const
CreateDiskRequest & WithAddOns(AddOnsT &&value)
CreateDiskRequest & WithTags(TagsT &&value)
CreateDiskRequest & AddAddOns(AddOnsT &&value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector