AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
CreateVolumeRequest.h
1
6#pragma once
7#include <aws/core/utils/UUID.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/fsx/FSxRequest.h>
11#include <aws/fsx/FSx_EXPORTS.h>
12#include <aws/fsx/model/CreateOntapVolumeConfiguration.h>
13#include <aws/fsx/model/CreateOpenZFSVolumeConfiguration.h>
14#include <aws/fsx/model/Tag.h>
15#include <aws/fsx/model/VolumeType.h>
16
17#include <utility>
18
19namespace Aws {
20namespace FSx {
21namespace Model {
22
26 public:
27 AWS_FSX_API CreateVolumeRequest() = default;
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 "CreateVolume"; }
34
35 AWS_FSX_API Aws::String SerializePayload() const override;
36
38
40
41 inline const Aws::String& GetClientRequestToken() const { return m_clientRequestToken; }
42 inline bool ClientRequestTokenHasBeenSet() const { return m_clientRequestTokenHasBeenSet; }
43 template <typename ClientRequestTokenT = Aws::String>
44 void SetClientRequestToken(ClientRequestTokenT&& value) {
45 m_clientRequestTokenHasBeenSet = true;
46 m_clientRequestToken = std::forward<ClientRequestTokenT>(value);
47 }
48 template <typename ClientRequestTokenT = Aws::String>
49 CreateVolumeRequest& WithClientRequestToken(ClientRequestTokenT&& value) {
50 SetClientRequestToken(std::forward<ClientRequestTokenT>(value));
51 return *this;
52 }
54
56
60 inline VolumeType GetVolumeType() const { return m_volumeType; }
61 inline bool VolumeTypeHasBeenSet() const { return m_volumeTypeHasBeenSet; }
62 inline void SetVolumeType(VolumeType value) {
63 m_volumeTypeHasBeenSet = true;
64 m_volumeType = value;
65 }
67 SetVolumeType(value);
68 return *this;
69 }
71
73
76 inline const Aws::String& GetName() const { return m_name; }
77 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
78 template <typename NameT = Aws::String>
79 void SetName(NameT&& value) {
80 m_nameHasBeenSet = true;
81 m_name = std::forward<NameT>(value);
82 }
83 template <typename NameT = Aws::String>
84 CreateVolumeRequest& WithName(NameT&& value) {
85 SetName(std::forward<NameT>(value));
86 return *this;
87 }
89
91
94 inline const CreateOntapVolumeConfiguration& GetOntapConfiguration() const { return m_ontapConfiguration; }
95 inline bool OntapConfigurationHasBeenSet() const { return m_ontapConfigurationHasBeenSet; }
96 template <typename OntapConfigurationT = CreateOntapVolumeConfiguration>
97 void SetOntapConfiguration(OntapConfigurationT&& value) {
98 m_ontapConfigurationHasBeenSet = true;
99 m_ontapConfiguration = std::forward<OntapConfigurationT>(value);
100 }
101 template <typename OntapConfigurationT = CreateOntapVolumeConfiguration>
102 CreateVolumeRequest& WithOntapConfiguration(OntapConfigurationT&& value) {
103 SetOntapConfiguration(std::forward<OntapConfigurationT>(value));
104 return *this;
105 }
107
109
110 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
111 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
112 template <typename TagsT = Aws::Vector<Tag>>
113 void SetTags(TagsT&& value) {
114 m_tagsHasBeenSet = true;
115 m_tags = std::forward<TagsT>(value);
116 }
117 template <typename TagsT = Aws::Vector<Tag>>
119 SetTags(std::forward<TagsT>(value));
120 return *this;
121 }
122 template <typename TagsT = Tag>
123 CreateVolumeRequest& AddTags(TagsT&& value) {
124 m_tagsHasBeenSet = true;
125 m_tags.emplace_back(std::forward<TagsT>(value));
126 return *this;
127 }
129
131
134 inline const CreateOpenZFSVolumeConfiguration& GetOpenZFSConfiguration() const { return m_openZFSConfiguration; }
135 inline bool OpenZFSConfigurationHasBeenSet() const { return m_openZFSConfigurationHasBeenSet; }
136 template <typename OpenZFSConfigurationT = CreateOpenZFSVolumeConfiguration>
137 void SetOpenZFSConfiguration(OpenZFSConfigurationT&& value) {
138 m_openZFSConfigurationHasBeenSet = true;
139 m_openZFSConfiguration = std::forward<OpenZFSConfigurationT>(value);
140 }
141 template <typename OpenZFSConfigurationT = CreateOpenZFSVolumeConfiguration>
142 CreateVolumeRequest& WithOpenZFSConfiguration(OpenZFSConfigurationT&& value) {
143 SetOpenZFSConfiguration(std::forward<OpenZFSConfigurationT>(value));
144 return *this;
145 }
147 private:
148 Aws::String m_clientRequestToken{Aws::Utils::UUID::PseudoRandomUUID()};
149
150 VolumeType m_volumeType{VolumeType::NOT_SET};
151
152 Aws::String m_name;
153
154 CreateOntapVolumeConfiguration m_ontapConfiguration;
155
156 Aws::Vector<Tag> m_tags;
157
158 CreateOpenZFSVolumeConfiguration m_openZFSConfiguration;
159 bool m_clientRequestTokenHasBeenSet = true;
160 bool m_volumeTypeHasBeenSet = false;
161 bool m_nameHasBeenSet = false;
162 bool m_ontapConfigurationHasBeenSet = false;
163 bool m_tagsHasBeenSet = false;
164 bool m_openZFSConfigurationHasBeenSet = false;
165};
166
167} // namespace Model
168} // namespace FSx
169} // namespace Aws
const Aws::Vector< Tag > & GetTags() const
virtual const char * GetServiceRequestName() const override
AWS_FSX_API CreateVolumeRequest()=default
CreateVolumeRequest & WithOpenZFSConfiguration(OpenZFSConfigurationT &&value)
CreateVolumeRequest & WithVolumeType(VolumeType value)
const CreateOntapVolumeConfiguration & GetOntapConfiguration() const
const Aws::String & GetName() const
CreateVolumeRequest & WithTags(TagsT &&value)
CreateVolumeRequest & WithOntapConfiguration(OntapConfigurationT &&value)
const CreateOpenZFSVolumeConfiguration & GetOpenZFSConfiguration() const
CreateVolumeRequest & WithClientRequestToken(ClientRequestTokenT &&value)
AWS_FSX_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
void SetOntapConfiguration(OntapConfigurationT &&value)
AWS_FSX_API Aws::String SerializePayload() const override
const Aws::String & GetClientRequestToken() const
CreateVolumeRequest & AddTags(TagsT &&value)
CreateVolumeRequest & WithName(NameT &&value)
void SetClientRequestToken(ClientRequestTokenT &&value)
void SetOpenZFSConfiguration(OpenZFSConfigurationT &&value)
static Aws::Utils::UUID PseudoRandomUUID()
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