AWS SDK for C++

AWS SDK for C++ Version 1.11.612

Loading...
Searching...
No Matches
CreateProtectionRequest.h
1
6#pragma once
7#include <aws/shield/Shield_EXPORTS.h>
8#include <aws/shield/ShieldRequest.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/shield/model/Tag.h>
12#include <utility>
13
14namespace Aws
15{
16namespace Shield
17{
18namespace Model
19{
20
24 {
25 public:
26 AWS_SHIELD_API CreateProtectionRequest() = default;
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_SHIELD_API Aws::String SerializePayload() const override;
35
37
38
40
43 inline const Aws::String& GetName() const { return m_name; }
44 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
45 template<typename NameT = Aws::String>
46 void SetName(NameT&& value) { m_nameHasBeenSet = true; m_name = std::forward<NameT>(value); }
47 template<typename NameT = Aws::String>
48 CreateProtectionRequest& WithName(NameT&& value) { SetName(std::forward<NameT>(value)); return *this;}
50
52
69 inline const Aws::String& GetResourceArn() const { return m_resourceArn; }
70 inline bool ResourceArnHasBeenSet() const { return m_resourceArnHasBeenSet; }
71 template<typename ResourceArnT = Aws::String>
72 void SetResourceArn(ResourceArnT&& value) { m_resourceArnHasBeenSet = true; m_resourceArn = std::forward<ResourceArnT>(value); }
73 template<typename ResourceArnT = Aws::String>
74 CreateProtectionRequest& WithResourceArn(ResourceArnT&& value) { SetResourceArn(std::forward<ResourceArnT>(value)); return *this;}
76
78
82 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
83 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
84 template<typename TagsT = Aws::Vector<Tag>>
85 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
86 template<typename TagsT = Aws::Vector<Tag>>
87 CreateProtectionRequest& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
88 template<typename TagsT = Tag>
89 CreateProtectionRequest& AddTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags.emplace_back(std::forward<TagsT>(value)); return *this; }
91 private:
92
93 Aws::String m_name;
94 bool m_nameHasBeenSet = false;
95
96 Aws::String m_resourceArn;
97 bool m_resourceArnHasBeenSet = false;
98
99 Aws::Vector<Tag> m_tags;
100 bool m_tagsHasBeenSet = false;
101 };
102
103} // namespace Model
104} // namespace Shield
105} // namespace Aws
AWS_SHIELD_API CreateProtectionRequest()=default
CreateProtectionRequest & AddTags(TagsT &&value)
AWS_SHIELD_API Aws::String SerializePayload() const override
AWS_SHIELD_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
CreateProtectionRequest & WithTags(TagsT &&value)
CreateProtectionRequest & WithResourceArn(ResourceArnT &&value)
CreateProtectionRequest & WithName(NameT &&value)
virtual const char * GetServiceRequestName() const override
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector