AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
CreateProtectionRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/shield/ShieldRequest.h>
10#include <aws/shield/Shield_EXPORTS.h>
11#include <aws/shield/model/Tag.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Shield {
17namespace Model {
18
22 public:
23 AWS_SHIELD_API CreateProtectionRequest() = default;
24
25 // Service request name is the Operation name which will send this request out,
26 // each operation should has unique request name, so that we can get operation's name from this request.
27 // Note: this is not true for response, multiple operations may have the same response name,
28 // so we can not get operation's name from response.
29 inline virtual const char* GetServiceRequestName() const override { return "CreateProtection"; }
30
31 AWS_SHIELD_API Aws::String SerializePayload() const override;
32
34
36
39 inline const Aws::String& GetName() const { return m_name; }
40 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
41 template <typename NameT = Aws::String>
42 void SetName(NameT&& value) {
43 m_nameHasBeenSet = true;
44 m_name = std::forward<NameT>(value);
45 }
46 template <typename NameT = Aws::String>
48 SetName(std::forward<NameT>(value));
49 return *this;
50 }
52
54
71 inline const Aws::String& GetResourceArn() const { return m_resourceArn; }
72 inline bool ResourceArnHasBeenSet() const { return m_resourceArnHasBeenSet; }
73 template <typename ResourceArnT = Aws::String>
74 void SetResourceArn(ResourceArnT&& value) {
75 m_resourceArnHasBeenSet = true;
76 m_resourceArn = std::forward<ResourceArnT>(value);
77 }
78 template <typename ResourceArnT = Aws::String>
80 SetResourceArn(std::forward<ResourceArnT>(value));
81 return *this;
82 }
84
86
90 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
91 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
92 template <typename TagsT = Aws::Vector<Tag>>
93 void SetTags(TagsT&& value) {
94 m_tagsHasBeenSet = true;
95 m_tags = std::forward<TagsT>(value);
96 }
97 template <typename TagsT = Aws::Vector<Tag>>
99 SetTags(std::forward<TagsT>(value));
100 return *this;
101 }
102 template <typename TagsT = Tag>
104 m_tagsHasBeenSet = true;
105 m_tags.emplace_back(std::forward<TagsT>(value));
106 return *this;
107 }
109 private:
110 Aws::String m_name;
111
112 Aws::String m_resourceArn;
113
114 Aws::Vector<Tag> m_tags;
115 bool m_nameHasBeenSet = false;
116 bool m_resourceArnHasBeenSet = false;
117 bool m_tagsHasBeenSet = false;
118};
119
120} // namespace Model
121} // namespace Shield
122} // 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