1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 #include <aws/fsx/FSx_EXPORTS.h>
8 #include <aws/fsx/FSxRequest.h>
9 #include <aws/core/utils/memory/stl/AWSString.h>
10 #include <aws/fsx/model/VolumeType.h>
11 #include <aws/fsx/model/CreateOntapVolumeConfiguration.h>
12 #include <aws/core/utils/memory/stl/AWSVector.h>
13 #include <aws/fsx/model/Tag.h>
14 #include <utility>
15 #include <aws/core/utils/UUID.h>
16 
17 namespace Aws
18 {
19 namespace FSx
20 {
21 namespace Model
22 {
23 
24   /**
25    */
26   class AWS_FSX_API CreateVolumeRequest : public FSxRequest
27   {
28   public:
29     CreateVolumeRequest();
30 
31     // Service request name is the Operation name which will send this request out,
32     // each operation should has unique request name, so that we can get operation's name from this request.
33     // Note: this is not true for response, multiple operations may have the same response name,
34     // so we can not get operation's name from response.
GetServiceRequestName()35     inline virtual const char* GetServiceRequestName() const override { return "CreateVolume"; }
36 
37     Aws::String SerializePayload() const override;
38 
39     Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
40 
41 
42 
GetClientRequestToken()43     inline const Aws::String& GetClientRequestToken() const{ return m_clientRequestToken; }
44 
45 
ClientRequestTokenHasBeenSet()46     inline bool ClientRequestTokenHasBeenSet() const { return m_clientRequestTokenHasBeenSet; }
47 
48 
SetClientRequestToken(const Aws::String & value)49     inline void SetClientRequestToken(const Aws::String& value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken = value; }
50 
51 
SetClientRequestToken(Aws::String && value)52     inline void SetClientRequestToken(Aws::String&& value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken = std::move(value); }
53 
54 
SetClientRequestToken(const char * value)55     inline void SetClientRequestToken(const char* value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken.assign(value); }
56 
57 
WithClientRequestToken(const Aws::String & value)58     inline CreateVolumeRequest& WithClientRequestToken(const Aws::String& value) { SetClientRequestToken(value); return *this;}
59 
60 
WithClientRequestToken(Aws::String && value)61     inline CreateVolumeRequest& WithClientRequestToken(Aws::String&& value) { SetClientRequestToken(std::move(value)); return *this;}
62 
63 
WithClientRequestToken(const char * value)64     inline CreateVolumeRequest& WithClientRequestToken(const char* value) { SetClientRequestToken(value); return *this;}
65 
66 
67     /**
68      * <p>Specifies the type of volume to create; <code>ONTAP</code> is the only valid
69      * volume type.</p>
70      */
GetVolumeType()71     inline const VolumeType& GetVolumeType() const{ return m_volumeType; }
72 
73     /**
74      * <p>Specifies the type of volume to create; <code>ONTAP</code> is the only valid
75      * volume type.</p>
76      */
VolumeTypeHasBeenSet()77     inline bool VolumeTypeHasBeenSet() const { return m_volumeTypeHasBeenSet; }
78 
79     /**
80      * <p>Specifies the type of volume to create; <code>ONTAP</code> is the only valid
81      * volume type.</p>
82      */
SetVolumeType(const VolumeType & value)83     inline void SetVolumeType(const VolumeType& value) { m_volumeTypeHasBeenSet = true; m_volumeType = value; }
84 
85     /**
86      * <p>Specifies the type of volume to create; <code>ONTAP</code> is the only valid
87      * volume type.</p>
88      */
SetVolumeType(VolumeType && value)89     inline void SetVolumeType(VolumeType&& value) { m_volumeTypeHasBeenSet = true; m_volumeType = std::move(value); }
90 
91     /**
92      * <p>Specifies the type of volume to create; <code>ONTAP</code> is the only valid
93      * volume type.</p>
94      */
WithVolumeType(const VolumeType & value)95     inline CreateVolumeRequest& WithVolumeType(const VolumeType& value) { SetVolumeType(value); return *this;}
96 
97     /**
98      * <p>Specifies the type of volume to create; <code>ONTAP</code> is the only valid
99      * volume type.</p>
100      */
WithVolumeType(VolumeType && value)101     inline CreateVolumeRequest& WithVolumeType(VolumeType&& value) { SetVolumeType(std::move(value)); return *this;}
102 
103 
104     /**
105      * <p>Specifies the name of the volume you're creating.</p>
106      */
GetName()107     inline const Aws::String& GetName() const{ return m_name; }
108 
109     /**
110      * <p>Specifies the name of the volume you're creating.</p>
111      */
NameHasBeenSet()112     inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
113 
114     /**
115      * <p>Specifies the name of the volume you're creating.</p>
116      */
SetName(const Aws::String & value)117     inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
118 
119     /**
120      * <p>Specifies the name of the volume you're creating.</p>
121      */
SetName(Aws::String && value)122     inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
123 
124     /**
125      * <p>Specifies the name of the volume you're creating.</p>
126      */
SetName(const char * value)127     inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
128 
129     /**
130      * <p>Specifies the name of the volume you're creating.</p>
131      */
WithName(const Aws::String & value)132     inline CreateVolumeRequest& WithName(const Aws::String& value) { SetName(value); return *this;}
133 
134     /**
135      * <p>Specifies the name of the volume you're creating.</p>
136      */
WithName(Aws::String && value)137     inline CreateVolumeRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
138 
139     /**
140      * <p>Specifies the name of the volume you're creating.</p>
141      */
WithName(const char * value)142     inline CreateVolumeRequest& WithName(const char* value) { SetName(value); return *this;}
143 
144 
145     /**
146      * <p>Specifies the <code>ONTAP</code> configuration to use in creating the
147      * volume.</p>
148      */
GetOntapConfiguration()149     inline const CreateOntapVolumeConfiguration& GetOntapConfiguration() const{ return m_ontapConfiguration; }
150 
151     /**
152      * <p>Specifies the <code>ONTAP</code> configuration to use in creating the
153      * volume.</p>
154      */
OntapConfigurationHasBeenSet()155     inline bool OntapConfigurationHasBeenSet() const { return m_ontapConfigurationHasBeenSet; }
156 
157     /**
158      * <p>Specifies the <code>ONTAP</code> configuration to use in creating the
159      * volume.</p>
160      */
SetOntapConfiguration(const CreateOntapVolumeConfiguration & value)161     inline void SetOntapConfiguration(const CreateOntapVolumeConfiguration& value) { m_ontapConfigurationHasBeenSet = true; m_ontapConfiguration = value; }
162 
163     /**
164      * <p>Specifies the <code>ONTAP</code> configuration to use in creating the
165      * volume.</p>
166      */
SetOntapConfiguration(CreateOntapVolumeConfiguration && value)167     inline void SetOntapConfiguration(CreateOntapVolumeConfiguration&& value) { m_ontapConfigurationHasBeenSet = true; m_ontapConfiguration = std::move(value); }
168 
169     /**
170      * <p>Specifies the <code>ONTAP</code> configuration to use in creating the
171      * volume.</p>
172      */
WithOntapConfiguration(const CreateOntapVolumeConfiguration & value)173     inline CreateVolumeRequest& WithOntapConfiguration(const CreateOntapVolumeConfiguration& value) { SetOntapConfiguration(value); return *this;}
174 
175     /**
176      * <p>Specifies the <code>ONTAP</code> configuration to use in creating the
177      * volume.</p>
178      */
WithOntapConfiguration(CreateOntapVolumeConfiguration && value)179     inline CreateVolumeRequest& WithOntapConfiguration(CreateOntapVolumeConfiguration&& value) { SetOntapConfiguration(std::move(value)); return *this;}
180 
181 
182 
GetTags()183     inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
184 
185 
TagsHasBeenSet()186     inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
187 
188 
SetTags(const Aws::Vector<Tag> & value)189     inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
190 
191 
SetTags(Aws::Vector<Tag> && value)192     inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
193 
194 
WithTags(const Aws::Vector<Tag> & value)195     inline CreateVolumeRequest& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
196 
197 
WithTags(Aws::Vector<Tag> && value)198     inline CreateVolumeRequest& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
199 
200 
AddTags(const Tag & value)201     inline CreateVolumeRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
202 
203 
AddTags(Tag && value)204     inline CreateVolumeRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
205 
206   private:
207 
208     Aws::String m_clientRequestToken;
209     bool m_clientRequestTokenHasBeenSet;
210 
211     VolumeType m_volumeType;
212     bool m_volumeTypeHasBeenSet;
213 
214     Aws::String m_name;
215     bool m_nameHasBeenSet;
216 
217     CreateOntapVolumeConfiguration m_ontapConfiguration;
218     bool m_ontapConfigurationHasBeenSet;
219 
220     Aws::Vector<Tag> m_tags;
221     bool m_tagsHasBeenSet;
222   };
223 
224 } // namespace Model
225 } // namespace FSx
226 } // namespace Aws
227