AWS SDK for C++  0.14.3
AWS SDK for C++
DescribeSnapshotsRequest.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
16 #include <aws/ec2/EC2_EXPORTS.h>
17 #include <aws/ec2/EC2Request.h>
20 #include <aws/ec2/model/Filter.h>
21 
22 namespace Aws
23 {
24 namespace EC2
25 {
26 namespace Model
27 {
28 
33  {
34  public:
36  Aws::String SerializePayload() const override;
37 
44  inline bool GetDryRun() const{ return m_dryRun; }
45 
52  inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
53 
60  inline DescribeSnapshotsRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
61 
66  inline const Aws::Vector<Aws::String>& GetSnapshotIds() const{ return m_snapshotIds; }
67 
72  inline void SetSnapshotIds(const Aws::Vector<Aws::String>& value) { m_snapshotIdsHasBeenSet = true; m_snapshotIds = value; }
73 
78  inline void SetSnapshotIds(Aws::Vector<Aws::String>&& value) { m_snapshotIdsHasBeenSet = true; m_snapshotIds = value; }
79 
84  inline DescribeSnapshotsRequest& WithSnapshotIds(const Aws::Vector<Aws::String>& value) { SetSnapshotIds(value); return *this;}
85 
90  inline DescribeSnapshotsRequest& WithSnapshotIds(Aws::Vector<Aws::String>&& value) { SetSnapshotIds(value); return *this;}
91 
96  inline DescribeSnapshotsRequest& AddSnapshotIds(const Aws::String& value) { m_snapshotIdsHasBeenSet = true; m_snapshotIds.push_back(value); return *this; }
97 
102  inline DescribeSnapshotsRequest& AddSnapshotIds(Aws::String&& value) { m_snapshotIdsHasBeenSet = true; m_snapshotIds.push_back(value); return *this; }
103 
108  inline DescribeSnapshotsRequest& AddSnapshotIds(const char* value) { m_snapshotIdsHasBeenSet = true; m_snapshotIds.push_back(value); return *this; }
109 
114  inline const Aws::Vector<Aws::String>& GetOwnerIds() const{ return m_ownerIds; }
115 
120  inline void SetOwnerIds(const Aws::Vector<Aws::String>& value) { m_ownerIdsHasBeenSet = true; m_ownerIds = value; }
121 
126  inline void SetOwnerIds(Aws::Vector<Aws::String>&& value) { m_ownerIdsHasBeenSet = true; m_ownerIds = value; }
127 
132  inline DescribeSnapshotsRequest& WithOwnerIds(const Aws::Vector<Aws::String>& value) { SetOwnerIds(value); return *this;}
133 
138  inline DescribeSnapshotsRequest& WithOwnerIds(Aws::Vector<Aws::String>&& value) { SetOwnerIds(value); return *this;}
139 
144  inline DescribeSnapshotsRequest& AddOwnerIds(const Aws::String& value) { m_ownerIdsHasBeenSet = true; m_ownerIds.push_back(value); return *this; }
145 
150  inline DescribeSnapshotsRequest& AddOwnerIds(Aws::String&& value) { m_ownerIdsHasBeenSet = true; m_ownerIds.push_back(value); return *this; }
151 
156  inline DescribeSnapshotsRequest& AddOwnerIds(const char* value) { m_ownerIdsHasBeenSet = true; m_ownerIds.push_back(value); return *this; }
157 
161  inline const Aws::Vector<Aws::String>& GetRestorableByUserIds() const{ return m_restorableByUserIds; }
162 
166  inline void SetRestorableByUserIds(const Aws::Vector<Aws::String>& value) { m_restorableByUserIdsHasBeenSet = true; m_restorableByUserIds = value; }
167 
171  inline void SetRestorableByUserIds(Aws::Vector<Aws::String>&& value) { m_restorableByUserIdsHasBeenSet = true; m_restorableByUserIds = value; }
172 
176  inline DescribeSnapshotsRequest& WithRestorableByUserIds(const Aws::Vector<Aws::String>& value) { SetRestorableByUserIds(value); return *this;}
177 
181  inline DescribeSnapshotsRequest& WithRestorableByUserIds(Aws::Vector<Aws::String>&& value) { SetRestorableByUserIds(value); return *this;}
182 
186  inline DescribeSnapshotsRequest& AddRestorableByUserIds(const Aws::String& value) { m_restorableByUserIdsHasBeenSet = true; m_restorableByUserIds.push_back(value); return *this; }
187 
191  inline DescribeSnapshotsRequest& AddRestorableByUserIds(Aws::String&& value) { m_restorableByUserIdsHasBeenSet = true; m_restorableByUserIds.push_back(value); return *this; }
192 
196  inline DescribeSnapshotsRequest& AddRestorableByUserIds(const char* value) { m_restorableByUserIdsHasBeenSet = true; m_restorableByUserIds.push_back(value); return *this; }
197 
223  inline const Aws::Vector<Filter>& GetFilters() const{ return m_filters; }
224 
250  inline void SetFilters(const Aws::Vector<Filter>& value) { m_filtersHasBeenSet = true; m_filters = value; }
251 
277  inline void SetFilters(Aws::Vector<Filter>&& value) { m_filtersHasBeenSet = true; m_filters = value; }
278 
304  inline DescribeSnapshotsRequest& WithFilters(const Aws::Vector<Filter>& value) { SetFilters(value); return *this;}
305 
331  inline DescribeSnapshotsRequest& WithFilters(Aws::Vector<Filter>&& value) { SetFilters(value); return *this;}
332 
358  inline DescribeSnapshotsRequest& AddFilters(const Filter& value) { m_filtersHasBeenSet = true; m_filters.push_back(value); return *this; }
359 
385  inline DescribeSnapshotsRequest& AddFilters(Filter&& value) { m_filtersHasBeenSet = true; m_filters.push_back(value); return *this; }
386 
394  inline const Aws::String& GetNextToken() const{ return m_nextToken; }
395 
403  inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; }
404 
412  inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; }
413 
421  inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); }
422 
430  inline DescribeSnapshotsRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
431 
439  inline DescribeSnapshotsRequest& WithNextToken(Aws::String&& value) { SetNextToken(value); return *this;}
440 
448  inline DescribeSnapshotsRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;}
449 
462  inline int GetMaxResults() const{ return m_maxResults; }
463 
476  inline void SetMaxResults(int value) { m_maxResultsHasBeenSet = true; m_maxResults = value; }
477 
490  inline DescribeSnapshotsRequest& WithMaxResults(int value) { SetMaxResults(value); return *this;}
491 
492  private:
493  bool m_dryRun;
494  bool m_dryRunHasBeenSet;
495  Aws::Vector<Aws::String> m_snapshotIds;
496  bool m_snapshotIdsHasBeenSet;
497  Aws::Vector<Aws::String> m_ownerIds;
498  bool m_ownerIdsHasBeenSet;
499  Aws::Vector<Aws::String> m_restorableByUserIds;
500  bool m_restorableByUserIdsHasBeenSet;
501  Aws::Vector<Filter> m_filters;
502  bool m_filtersHasBeenSet;
503  Aws::String m_nextToken;
504  bool m_nextTokenHasBeenSet;
505  int m_maxResults;
506  bool m_maxResultsHasBeenSet;
507  };
508 
509 } // namespace Model
510 } // namespace EC2
511 } // namespace Aws
DescribeSnapshotsRequest & WithSnapshotIds(const Aws::Vector< Aws::String > &value)
DescribeSnapshotsRequest & AddFilters(Filter &&value)
DescribeSnapshotsRequest & AddRestorableByUserIds(const char *value)
DescribeSnapshotsRequest & WithFilters(Aws::Vector< Filter > &&value)
DescribeSnapshotsRequest & AddSnapshotIds(const char *value)
DescribeSnapshotsRequest & WithOwnerIds(const Aws::Vector< Aws::String > &value)
const Aws::Vector< Aws::String > & GetSnapshotIds() const
DescribeSnapshotsRequest & AddRestorableByUserIds(const Aws::String &value)
DescribeSnapshotsRequest & AddOwnerIds(Aws::String &&value)
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
void SetSnapshotIds(const Aws::Vector< Aws::String > &value)
DescribeSnapshotsRequest & AddSnapshotIds(Aws::String &&value)
DescribeSnapshotsRequest & WithNextToken(const char *value)
void SetRestorableByUserIds(const Aws::Vector< Aws::String > &value)
void SetRestorableByUserIds(Aws::Vector< Aws::String > &&value)
void SetOwnerIds(Aws::Vector< Aws::String > &&value)
DescribeSnapshotsRequest & AddOwnerIds(const Aws::String &value)
void SetFilters(const Aws::Vector< Filter > &value)
DescribeSnapshotsRequest & AddFilters(const Filter &value)
DescribeSnapshotsRequest & WithRestorableByUserIds(Aws::Vector< Aws::String > &&value)
DescribeSnapshotsRequest & WithDryRun(bool value)
DescribeSnapshotsRequest & AddRestorableByUserIds(Aws::String &&value)
DescribeSnapshotsRequest & WithMaxResults(int value)
void SetOwnerIds(const Aws::Vector< Aws::String > &value)
const Aws::Vector< Aws::String > & GetOwnerIds() const
DescribeSnapshotsRequest & WithNextToken(Aws::String &&value)
const Aws::Vector< Aws::String > & GetRestorableByUserIds() const
DescribeSnapshotsRequest & AddOwnerIds(const char *value)
DescribeSnapshotsRequest & WithOwnerIds(Aws::Vector< Aws::String > &&value)
DescribeSnapshotsRequest & WithRestorableByUserIds(const Aws::Vector< Aws::String > &value)
void SetFilters(Aws::Vector< Filter > &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
DescribeSnapshotsRequest & WithNextToken(const Aws::String &value)
const Aws::Vector< Filter > & GetFilters() const
DescribeSnapshotsRequest & AddSnapshotIds(const Aws::String &value)
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:37
DescribeSnapshotsRequest & WithSnapshotIds(Aws::Vector< Aws::String > &&value)
DescribeSnapshotsRequest & WithFilters(const Aws::Vector< Filter > &value)
void SetSnapshotIds(Aws::Vector< Aws::String > &&value)
JSON (JavaScript Object Notation).