AWS SDK for C++  1.9.40
AWS SDK for C++
CreateProtectionRequest.h
Go to the documentation of this file.
1 
6 #pragma once
11 #include <aws/shield/model/Tag.h>
12 #include <utility>
13 
14 namespace Aws
15 {
16 namespace Shield
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 "CreateProtection"; }
33 
34  Aws::String SerializePayload() const override;
35 
37 
38 
42  inline const Aws::String& GetName() const{ return m_name; }
43 
47  inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
48 
52  inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
53 
57  inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
58 
62  inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
63 
67  inline CreateProtectionRequest& WithName(const Aws::String& value) { SetName(value); return *this;}
68 
72  inline CreateProtectionRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
73 
77  inline CreateProtectionRequest& WithName(const char* value) { SetName(value); return *this;}
78 
79 
97  inline const Aws::String& GetResourceArn() const{ return m_resourceArn; }
98 
116  inline bool ResourceArnHasBeenSet() const { return m_resourceArnHasBeenSet; }
117 
135  inline void SetResourceArn(const Aws::String& value) { m_resourceArnHasBeenSet = true; m_resourceArn = value; }
136 
154  inline void SetResourceArn(Aws::String&& value) { m_resourceArnHasBeenSet = true; m_resourceArn = std::move(value); }
155 
173  inline void SetResourceArn(const char* value) { m_resourceArnHasBeenSet = true; m_resourceArn.assign(value); }
174 
192  inline CreateProtectionRequest& WithResourceArn(const Aws::String& value) { SetResourceArn(value); return *this;}
193 
211  inline CreateProtectionRequest& WithResourceArn(Aws::String&& value) { SetResourceArn(std::move(value)); return *this;}
212 
230  inline CreateProtectionRequest& WithResourceArn(const char* value) { SetResourceArn(value); return *this;}
231 
232 
237  inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
238 
243  inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
244 
249  inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
250 
255  inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
256 
261  inline CreateProtectionRequest& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
262 
267  inline CreateProtectionRequest& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
268 
273  inline CreateProtectionRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
274 
279  inline CreateProtectionRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
280 
281  private:
282 
283  Aws::String m_name;
284  bool m_nameHasBeenSet;
285 
286  Aws::String m_resourceArn;
287  bool m_resourceArnHasBeenSet;
288 
289  Aws::Vector<Tag> m_tags;
290  bool m_tagsHasBeenSet;
291  };
292 
293 } // namespace Model
294 } // namespace Shield
295 } // namespace Aws
Aws::Shield::Model::CreateProtectionRequest::WithName
CreateProtectionRequest & WithName(const char *value)
Definition: CreateProtectionRequest.h:77
ShieldRequest.h
AWS_SHIELD_API
#define AWS_SHIELD_API
Definition: Shield_EXPORTS.h:28
Aws::Shield::Model::CreateProtectionRequest::GetTags
const Aws::Vector< Tag > & GetTags() const
Definition: CreateProtectionRequest.h:237
Aws::Http::HeaderValueCollection
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:53
Aws::Shield::Model::CreateProtectionRequest::SetTags
void SetTags(const Aws::Vector< Tag > &value)
Definition: CreateProtectionRequest.h:249
Aws::Shield::Model::CreateProtectionRequest::SetResourceArn
void SetResourceArn(const Aws::String &value)
Definition: CreateProtectionRequest.h:135
Aws::Shield::Model::CreateProtectionRequest::SerializePayload
Aws::String SerializePayload() const override
Aws::Shield::Model::CreateProtectionRequest::GetName
const Aws::String & GetName() const
Definition: CreateProtectionRequest.h:42
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
Aws::Shield::Model::Tag
Definition: Tag.h:39
Aws::Shield::Model::CreateProtectionRequest::AddTags
CreateProtectionRequest & AddTags(const Tag &value)
Definition: CreateProtectionRequest.h:273
AWSVector.h
Aws::Shield::Model::CreateProtectionRequest
Definition: CreateProtectionRequest.h:24
Aws::Shield::Model::CreateProtectionRequest::SetName
void SetName(const Aws::String &value)
Definition: CreateProtectionRequest.h:52
Aws::Shield::Model::CreateProtectionRequest::SetResourceArn
void SetResourceArn(const char *value)
Definition: CreateProtectionRequest.h:173
Aws::Shield::ShieldRequest
Definition: ShieldRequest.h:17
Aws::Shield::Model::CreateProtectionRequest::SetName
void SetName(const char *value)
Definition: CreateProtectionRequest.h:62
Aws::Shield::Model::CreateProtectionRequest::TagsHasBeenSet
bool TagsHasBeenSet() const
Definition: CreateProtectionRequest.h:243
Aws::Shield::Model::CreateProtectionRequest::WithTags
CreateProtectionRequest & WithTags(Aws::Vector< Tag > &&value)
Definition: CreateProtectionRequest.h:267
Tag.h
Aws::Shield::Model::CreateProtectionRequest::WithName
CreateProtectionRequest & WithName(const Aws::String &value)
Definition: CreateProtectionRequest.h:67
Aws::Shield::Model::CreateProtectionRequest::WithResourceArn
CreateProtectionRequest & WithResourceArn(const char *value)
Definition: CreateProtectionRequest.h:230
Aws::Shield::Model::CreateProtectionRequest::WithName
CreateProtectionRequest & WithName(Aws::String &&value)
Definition: CreateProtectionRequest.h:72
Aws::Shield::Model::CreateProtectionRequest::SetResourceArn
void SetResourceArn(Aws::String &&value)
Definition: CreateProtectionRequest.h:154
Aws::Shield::Model::CreateProtectionRequest::SetTags
void SetTags(Aws::Vector< Tag > &&value)
Definition: CreateProtectionRequest.h:255
Shield_EXPORTS.h
Aws::Shield::Model::CreateProtectionRequest::GetResourceArn
const Aws::String & GetResourceArn() const
Definition: CreateProtectionRequest.h:97
Aws::Shield::Model::CreateProtectionRequest::AddTags
CreateProtectionRequest & AddTags(Tag &&value)
Definition: CreateProtectionRequest.h:279
AWSString.h
Aws::Shield::Model::CreateProtectionRequest::WithTags
CreateProtectionRequest & WithTags(const Aws::Vector< Tag > &value)
Definition: CreateProtectionRequest.h:261
Aws::Shield::Model::CreateProtectionRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: CreateProtectionRequest.h:32
Aws::Shield::Model::CreateProtectionRequest::NameHasBeenSet
bool NameHasBeenSet() const
Definition: CreateProtectionRequest.h:47
Aws
Definition: AccessManagementClient.h:15
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::Shield::Model::CreateProtectionRequest::CreateProtectionRequest
CreateProtectionRequest()
Aws::Shield::Model::CreateProtectionRequest::GetRequestSpecificHeaders
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
Aws::Shield::Model::CreateProtectionRequest::SetName
void SetName(Aws::String &&value)
Definition: CreateProtectionRequest.h:57
Aws::Shield::Model::CreateProtectionRequest::ResourceArnHasBeenSet
bool ResourceArnHasBeenSet() const
Definition: CreateProtectionRequest.h:116
Aws::Shield::Model::CreateProtectionRequest::WithResourceArn
CreateProtectionRequest & WithResourceArn(Aws::String &&value)
Definition: CreateProtectionRequest.h:211
Aws::Shield::Model::CreateProtectionRequest::WithResourceArn
CreateProtectionRequest & WithResourceArn(const Aws::String &value)
Definition: CreateProtectionRequest.h:192