AWS SDK for C++  1.9.16
AWS SDK for C++
CreateKeyPairRequest.h
Go to the documentation of this file.
1 
6 #pragma once
12 #include <utility>
13 
14 namespace Aws
15 {
16 namespace Lightsail
17 {
18 namespace Model
19 {
20 
24  {
25  public:
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.
32  inline virtual const char* GetServiceRequestName() const override { return "CreateKeyPair"; }
33 
34  Aws::String SerializePayload() const override;
35 
37 
38 
42  inline const Aws::String& GetKeyPairName() const{ return m_keyPairName; }
43 
47  inline bool KeyPairNameHasBeenSet() const { return m_keyPairNameHasBeenSet; }
48 
52  inline void SetKeyPairName(const Aws::String& value) { m_keyPairNameHasBeenSet = true; m_keyPairName = value; }
53 
57  inline void SetKeyPairName(Aws::String&& value) { m_keyPairNameHasBeenSet = true; m_keyPairName = std::move(value); }
58 
62  inline void SetKeyPairName(const char* value) { m_keyPairNameHasBeenSet = true; m_keyPairName.assign(value); }
63 
67  inline CreateKeyPairRequest& WithKeyPairName(const Aws::String& value) { SetKeyPairName(value); return *this;}
68 
72  inline CreateKeyPairRequest& WithKeyPairName(Aws::String&& value) { SetKeyPairName(std::move(value)); return *this;}
73 
77  inline CreateKeyPairRequest& WithKeyPairName(const char* value) { SetKeyPairName(value); return *this;}
78 
79 
85  inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
86 
92  inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
93 
99  inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
100 
106  inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
107 
113  inline CreateKeyPairRequest& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
114 
120  inline CreateKeyPairRequest& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
121 
127  inline CreateKeyPairRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
128 
134  inline CreateKeyPairRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
135 
136  private:
137 
138  Aws::String m_keyPairName;
139  bool m_keyPairNameHasBeenSet;
140 
141  Aws::Vector<Tag> m_tags;
142  bool m_tagsHasBeenSet;
143  };
144 
145 } // namespace Model
146 } // namespace Lightsail
147 } // namespace Aws
Aws::Lightsail::Model::CreateKeyPairRequest::SerializePayload
Aws::String SerializePayload() const override
Aws::Lightsail::Model::CreateKeyPairRequest::SetKeyPairName
void SetKeyPairName(Aws::String &&value)
Definition: CreateKeyPairRequest.h:57
Aws::Lightsail::Model::CreateKeyPairRequest::GetKeyPairName
const Aws::String & GetKeyPairName() const
Definition: CreateKeyPairRequest.h:42
Aws::Http::HeaderValueCollection
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:53
Aws::Lightsail::Model::CreateKeyPairRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: CreateKeyPairRequest.h:32
Aws::Lightsail::Model::CreateKeyPairRequest::AddTags
CreateKeyPairRequest & AddTags(const Tag &value)
Definition: CreateKeyPairRequest.h:127
Aws::Lightsail::Model::CreateKeyPairRequest::AddTags
CreateKeyPairRequest & AddTags(Tag &&value)
Definition: CreateKeyPairRequest.h:134
Aws::Lightsail::Model::CreateKeyPairRequest::WithKeyPairName
CreateKeyPairRequest & WithKeyPairName(const Aws::String &value)
Definition: CreateKeyPairRequest.h:67
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
Aws::Lightsail::Model::CreateKeyPairRequest::KeyPairNameHasBeenSet
bool KeyPairNameHasBeenSet() const
Definition: CreateKeyPairRequest.h:47
AWSVector.h
Aws::Lightsail::Model::CreateKeyPairRequest::TagsHasBeenSet
bool TagsHasBeenSet() const
Definition: CreateKeyPairRequest.h:92
Aws::Lightsail::Model::CreateKeyPairRequest::SetKeyPairName
void SetKeyPairName(const Aws::String &value)
Definition: CreateKeyPairRequest.h:52
LightsailRequest.h
Aws::Lightsail::Model::CreateKeyPairRequest::CreateKeyPairRequest
CreateKeyPairRequest()
Aws::Lightsail::Model::CreateKeyPairRequest::WithKeyPairName
CreateKeyPairRequest & WithKeyPairName(const char *value)
Definition: CreateKeyPairRequest.h:77
Aws::Lightsail::Model::CreateKeyPairRequest::SetKeyPairName
void SetKeyPairName(const char *value)
Definition: CreateKeyPairRequest.h:62
Aws::Lightsail::Model::CreateKeyPairRequest::WithKeyPairName
CreateKeyPairRequest & WithKeyPairName(Aws::String &&value)
Definition: CreateKeyPairRequest.h:72
Aws::Lightsail::Model::CreateKeyPairRequest::WithTags
CreateKeyPairRequest & WithTags(const Aws::Vector< Tag > &value)
Definition: CreateKeyPairRequest.h:113
Tag.h
Aws::Lightsail::LightsailRequest
Definition: LightsailRequest.h:17
Aws::Lightsail::Model::CreateKeyPairRequest::GetTags
const Aws::Vector< Tag > & GetTags() const
Definition: CreateKeyPairRequest.h:85
Aws::Lightsail::Model::CreateKeyPairRequest
Definition: CreateKeyPairRequest.h:24
Aws::Lightsail::Model::Tag
Definition: Tag.h:35
AWSString.h
Lightsail_EXPORTS.h
Aws::Lightsail::Model::CreateKeyPairRequest::SetTags
void SetTags(Aws::Vector< Tag > &&value)
Definition: CreateKeyPairRequest.h:106
Aws::Lightsail::Model::CreateKeyPairRequest::GetRequestSpecificHeaders
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
Aws
Definition: AccessManagementClient.h:15
Aws::Lightsail::Model::CreateKeyPairRequest::SetTags
void SetTags(const Aws::Vector< Tag > &value)
Definition: CreateKeyPairRequest.h:99
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
AWS_LIGHTSAIL_API
#define AWS_LIGHTSAIL_API
Definition: Lightsail_EXPORTS.h:28
Aws::Lightsail::Model::CreateKeyPairRequest::WithTags
CreateKeyPairRequest & WithTags(Aws::Vector< Tag > &&value)
Definition: CreateKeyPairRequest.h:120