AWS SDK for C++  0.12.9
AWS SDK for C++
DescribeKeyPairsRequest.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 DescribeKeyPairsRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
61 
65  inline const Aws::Vector<Aws::String>& GetKeyNames() const{ return m_keyNames; }
66 
70  inline void SetKeyNames(const Aws::Vector<Aws::String>& value) { m_keyNamesHasBeenSet = true; m_keyNames = value; }
71 
75  inline void SetKeyNames(Aws::Vector<Aws::String>&& value) { m_keyNamesHasBeenSet = true; m_keyNames = value; }
76 
80  inline DescribeKeyPairsRequest& WithKeyNames(const Aws::Vector<Aws::String>& value) { SetKeyNames(value); return *this;}
81 
85  inline DescribeKeyPairsRequest& WithKeyNames(Aws::Vector<Aws::String>&& value) { SetKeyNames(value); return *this;}
86 
90  inline DescribeKeyPairsRequest& AddKeyNames(const Aws::String& value) { m_keyNamesHasBeenSet = true; m_keyNames.push_back(value); return *this; }
91 
95  inline DescribeKeyPairsRequest& AddKeyNames(Aws::String&& value) { m_keyNamesHasBeenSet = true; m_keyNames.push_back(value); return *this; }
96 
100  inline DescribeKeyPairsRequest& AddKeyNames(const char* value) { m_keyNamesHasBeenSet = true; m_keyNames.push_back(value); return *this; }
101 
107  inline const Aws::Vector<Filter>& GetFilters() const{ return m_filters; }
108 
114  inline void SetFilters(const Aws::Vector<Filter>& value) { m_filtersHasBeenSet = true; m_filters = value; }
115 
121  inline void SetFilters(Aws::Vector<Filter>&& value) { m_filtersHasBeenSet = true; m_filters = value; }
122 
128  inline DescribeKeyPairsRequest& WithFilters(const Aws::Vector<Filter>& value) { SetFilters(value); return *this;}
129 
135  inline DescribeKeyPairsRequest& WithFilters(Aws::Vector<Filter>&& value) { SetFilters(value); return *this;}
136 
142  inline DescribeKeyPairsRequest& AddFilters(const Filter& value) { m_filtersHasBeenSet = true; m_filters.push_back(value); return *this; }
143 
149  inline DescribeKeyPairsRequest& AddFilters(Filter&& value) { m_filtersHasBeenSet = true; m_filters.push_back(value); return *this; }
150 
151  private:
152  bool m_dryRun;
153  bool m_dryRunHasBeenSet;
154  Aws::Vector<Aws::String> m_keyNames;
155  bool m_keyNamesHasBeenSet;
156  Aws::Vector<Filter> m_filters;
157  bool m_filtersHasBeenSet;
158  };
159 
160 } // namespace Model
161 } // namespace EC2
162 } // namespace Aws
void SetKeyNames(const Aws::Vector< Aws::String > &value)
DescribeKeyPairsRequest & WithKeyNames(Aws::Vector< Aws::String > &&value)
DescribeKeyPairsRequest & WithFilters(Aws::Vector< Filter > &&value)
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
const Aws::Vector< Aws::String > & GetKeyNames() const
void SetKeyNames(Aws::Vector< Aws::String > &&value)
void SetFilters(const Aws::Vector< Filter > &value)
DescribeKeyPairsRequest & AddFilters(Filter &&value)
DescribeKeyPairsRequest & WithKeyNames(const Aws::Vector< Aws::String > &value)
DescribeKeyPairsRequest & AddKeyNames(Aws::String &&value)
DescribeKeyPairsRequest & AddFilters(const Filter &value)
DescribeKeyPairsRequest & WithFilters(const Aws::Vector< Filter > &value)
DescribeKeyPairsRequest & AddKeyNames(const Aws::String &value)
DescribeKeyPairsRequest & AddKeyNames(const char *value)
void SetFilters(Aws::Vector< Filter > &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
DescribeKeyPairsRequest & WithDryRun(bool value)
const Aws::Vector< Filter > & GetFilters() const
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:34
JSON (JavaScript Object Notation).