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/ec2/EC2_EXPORTS.h>
8 #include <aws/ec2/EC2Request.h>
9 #include <aws/core/utils/memory/stl/AWSVector.h>
10 #include <aws/core/utils/memory/stl/AWSString.h>
11 #include <aws/ec2/model/Filter.h>
12 #include <utility>
13 
14 namespace Aws
15 {
16 namespace EC2
17 {
18 namespace Model
19 {
20 
21   /**
22    */
23   class AWS_EC2_API DescribeImportSnapshotTasksRequest : public EC2Request
24   {
25   public:
26     DescribeImportSnapshotTasksRequest();
27 
28     // Service request name is the Operation name which will send this request out,
29     // each operation should has unique request name, so that we can get operation's name from this request.
30     // Note: this is not true for response, multiple operations may have the same response name,
31     // so we can not get operation's name from response.
GetServiceRequestName()32     inline virtual const char* GetServiceRequestName() const override { return "DescribeImportSnapshotTasks"; }
33 
34     Aws::String SerializePayload() const override;
35 
36   protected:
37     void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
38 
39   public:
40 
41     /**
42      * <p>Checks whether you have the required permissions for the action, without
43      * actually making the request, and provides an error response. If you have the
44      * required permissions, the error response is <code>DryRunOperation</code>.
45      * Otherwise, it is <code>UnauthorizedOperation</code>.</p>
46      */
GetDryRun()47     inline bool GetDryRun() const{ return m_dryRun; }
48 
49     /**
50      * <p>Checks whether you have the required permissions for the action, without
51      * actually making the request, and provides an error response. If you have the
52      * required permissions, the error response is <code>DryRunOperation</code>.
53      * Otherwise, it is <code>UnauthorizedOperation</code>.</p>
54      */
DryRunHasBeenSet()55     inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
56 
57     /**
58      * <p>Checks whether you have the required permissions for the action, without
59      * actually making the request, and provides an error response. If you have the
60      * required permissions, the error response is <code>DryRunOperation</code>.
61      * Otherwise, it is <code>UnauthorizedOperation</code>.</p>
62      */
SetDryRun(bool value)63     inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
64 
65     /**
66      * <p>Checks whether you have the required permissions for the action, without
67      * actually making the request, and provides an error response. If you have the
68      * required permissions, the error response is <code>DryRunOperation</code>.
69      * Otherwise, it is <code>UnauthorizedOperation</code>.</p>
70      */
WithDryRun(bool value)71     inline DescribeImportSnapshotTasksRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
72 
73 
74     /**
75      * <p>The filters.</p>
76      */
GetFilters()77     inline const Aws::Vector<Filter>& GetFilters() const{ return m_filters; }
78 
79     /**
80      * <p>The filters.</p>
81      */
FiltersHasBeenSet()82     inline bool FiltersHasBeenSet() const { return m_filtersHasBeenSet; }
83 
84     /**
85      * <p>The filters.</p>
86      */
SetFilters(const Aws::Vector<Filter> & value)87     inline void SetFilters(const Aws::Vector<Filter>& value) { m_filtersHasBeenSet = true; m_filters = value; }
88 
89     /**
90      * <p>The filters.</p>
91      */
SetFilters(Aws::Vector<Filter> && value)92     inline void SetFilters(Aws::Vector<Filter>&& value) { m_filtersHasBeenSet = true; m_filters = std::move(value); }
93 
94     /**
95      * <p>The filters.</p>
96      */
WithFilters(const Aws::Vector<Filter> & value)97     inline DescribeImportSnapshotTasksRequest& WithFilters(const Aws::Vector<Filter>& value) { SetFilters(value); return *this;}
98 
99     /**
100      * <p>The filters.</p>
101      */
WithFilters(Aws::Vector<Filter> && value)102     inline DescribeImportSnapshotTasksRequest& WithFilters(Aws::Vector<Filter>&& value) { SetFilters(std::move(value)); return *this;}
103 
104     /**
105      * <p>The filters.</p>
106      */
AddFilters(const Filter & value)107     inline DescribeImportSnapshotTasksRequest& AddFilters(const Filter& value) { m_filtersHasBeenSet = true; m_filters.push_back(value); return *this; }
108 
109     /**
110      * <p>The filters.</p>
111      */
AddFilters(Filter && value)112     inline DescribeImportSnapshotTasksRequest& AddFilters(Filter&& value) { m_filtersHasBeenSet = true; m_filters.push_back(std::move(value)); return *this; }
113 
114 
115     /**
116      * <p>A list of import snapshot task IDs.</p>
117      */
GetImportTaskIds()118     inline const Aws::Vector<Aws::String>& GetImportTaskIds() const{ return m_importTaskIds; }
119 
120     /**
121      * <p>A list of import snapshot task IDs.</p>
122      */
ImportTaskIdsHasBeenSet()123     inline bool ImportTaskIdsHasBeenSet() const { return m_importTaskIdsHasBeenSet; }
124 
125     /**
126      * <p>A list of import snapshot task IDs.</p>
127      */
SetImportTaskIds(const Aws::Vector<Aws::String> & value)128     inline void SetImportTaskIds(const Aws::Vector<Aws::String>& value) { m_importTaskIdsHasBeenSet = true; m_importTaskIds = value; }
129 
130     /**
131      * <p>A list of import snapshot task IDs.</p>
132      */
SetImportTaskIds(Aws::Vector<Aws::String> && value)133     inline void SetImportTaskIds(Aws::Vector<Aws::String>&& value) { m_importTaskIdsHasBeenSet = true; m_importTaskIds = std::move(value); }
134 
135     /**
136      * <p>A list of import snapshot task IDs.</p>
137      */
WithImportTaskIds(const Aws::Vector<Aws::String> & value)138     inline DescribeImportSnapshotTasksRequest& WithImportTaskIds(const Aws::Vector<Aws::String>& value) { SetImportTaskIds(value); return *this;}
139 
140     /**
141      * <p>A list of import snapshot task IDs.</p>
142      */
WithImportTaskIds(Aws::Vector<Aws::String> && value)143     inline DescribeImportSnapshotTasksRequest& WithImportTaskIds(Aws::Vector<Aws::String>&& value) { SetImportTaskIds(std::move(value)); return *this;}
144 
145     /**
146      * <p>A list of import snapshot task IDs.</p>
147      */
AddImportTaskIds(const Aws::String & value)148     inline DescribeImportSnapshotTasksRequest& AddImportTaskIds(const Aws::String& value) { m_importTaskIdsHasBeenSet = true; m_importTaskIds.push_back(value); return *this; }
149 
150     /**
151      * <p>A list of import snapshot task IDs.</p>
152      */
AddImportTaskIds(Aws::String && value)153     inline DescribeImportSnapshotTasksRequest& AddImportTaskIds(Aws::String&& value) { m_importTaskIdsHasBeenSet = true; m_importTaskIds.push_back(std::move(value)); return *this; }
154 
155     /**
156      * <p>A list of import snapshot task IDs.</p>
157      */
AddImportTaskIds(const char * value)158     inline DescribeImportSnapshotTasksRequest& AddImportTaskIds(const char* value) { m_importTaskIdsHasBeenSet = true; m_importTaskIds.push_back(value); return *this; }
159 
160 
161     /**
162      * <p>The maximum number of results to return in a single call. To retrieve the
163      * remaining results, make another call with the returned <code>NextToken</code>
164      * value.</p>
165      */
GetMaxResults()166     inline int GetMaxResults() const{ return m_maxResults; }
167 
168     /**
169      * <p>The maximum number of results to return in a single call. To retrieve the
170      * remaining results, make another call with the returned <code>NextToken</code>
171      * value.</p>
172      */
MaxResultsHasBeenSet()173     inline bool MaxResultsHasBeenSet() const { return m_maxResultsHasBeenSet; }
174 
175     /**
176      * <p>The maximum number of results to return in a single call. To retrieve the
177      * remaining results, make another call with the returned <code>NextToken</code>
178      * value.</p>
179      */
SetMaxResults(int value)180     inline void SetMaxResults(int value) { m_maxResultsHasBeenSet = true; m_maxResults = value; }
181 
182     /**
183      * <p>The maximum number of results to return in a single call. To retrieve the
184      * remaining results, make another call with the returned <code>NextToken</code>
185      * value.</p>
186      */
WithMaxResults(int value)187     inline DescribeImportSnapshotTasksRequest& WithMaxResults(int value) { SetMaxResults(value); return *this;}
188 
189 
190     /**
191      * <p>A token that indicates the next page of results.</p>
192      */
GetNextToken()193     inline const Aws::String& GetNextToken() const{ return m_nextToken; }
194 
195     /**
196      * <p>A token that indicates the next page of results.</p>
197      */
NextTokenHasBeenSet()198     inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; }
199 
200     /**
201      * <p>A token that indicates the next page of results.</p>
202      */
SetNextToken(const Aws::String & value)203     inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; }
204 
205     /**
206      * <p>A token that indicates the next page of results.</p>
207      */
SetNextToken(Aws::String && value)208     inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); }
209 
210     /**
211      * <p>A token that indicates the next page of results.</p>
212      */
SetNextToken(const char * value)213     inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); }
214 
215     /**
216      * <p>A token that indicates the next page of results.</p>
217      */
WithNextToken(const Aws::String & value)218     inline DescribeImportSnapshotTasksRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
219 
220     /**
221      * <p>A token that indicates the next page of results.</p>
222      */
WithNextToken(Aws::String && value)223     inline DescribeImportSnapshotTasksRequest& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
224 
225     /**
226      * <p>A token that indicates the next page of results.</p>
227      */
WithNextToken(const char * value)228     inline DescribeImportSnapshotTasksRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;}
229 
230   private:
231 
232     bool m_dryRun;
233     bool m_dryRunHasBeenSet;
234 
235     Aws::Vector<Filter> m_filters;
236     bool m_filtersHasBeenSet;
237 
238     Aws::Vector<Aws::String> m_importTaskIds;
239     bool m_importTaskIdsHasBeenSet;
240 
241     int m_maxResults;
242     bool m_maxResultsHasBeenSet;
243 
244     Aws::String m_nextToken;
245     bool m_nextTokenHasBeenSet;
246   };
247 
248 } // namespace Model
249 } // namespace EC2
250 } // namespace Aws
251