AWS SDK for C++

AWS SDK for C++ Version 1.11.941

Loading...
Searching...
No Matches
CreateTemplateRequest.h
1
6#pragma once
7#include <aws/core/utils/UUID.h>
8#include <aws/core/utils/memory/stl/AWSMap.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/network-security-manager/NetworkSecurityManagerRequest.h>
12#include <aws/network-security-manager/NetworkSecurityManager_EXPORTS.h>
13#include <aws/network-security-manager/model/RuleReference.h>
14#include <aws/network-security-manager/model/TemplateFirewallType.h>
15
16#include <utility>
17
18namespace Aws {
19namespace NetworkSecurityManager {
20namespace Model {
21
25 public:
26 AWS_NETWORKSECURITYMANAGER_API CreateTemplateRequest() = 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 "CreateTemplate"; }
33
34 AWS_NETWORKSECURITYMANAGER_API Aws::String SerializePayload() const override;
35
37
43 inline const Aws::String& GetClientToken() const { return m_clientToken; }
44 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
45 template <typename ClientTokenT = Aws::String>
46 void SetClientToken(ClientTokenT&& value) {
47 m_clientTokenHasBeenSet = true;
48 m_clientToken = std::forward<ClientTokenT>(value);
49 }
50 template <typename ClientTokenT = Aws::String>
51 CreateTemplateRequest& WithClientToken(ClientTokenT&& value) {
52 SetClientToken(std::forward<ClientTokenT>(value));
53 return *this;
54 }
56
58
61 inline const Aws::String& GetTemplateName() const { return m_templateName; }
62 inline bool TemplateNameHasBeenSet() const { return m_templateNameHasBeenSet; }
63 template <typename TemplateNameT = Aws::String>
64 void SetTemplateName(TemplateNameT&& value) {
65 m_templateNameHasBeenSet = true;
66 m_templateName = std::forward<TemplateNameT>(value);
67 }
68 template <typename TemplateNameT = Aws::String>
69 CreateTemplateRequest& WithTemplateName(TemplateNameT&& value) {
70 SetTemplateName(std::forward<TemplateNameT>(value));
71 return *this;
72 }
74
76
79 inline const Aws::String& GetTemplateDescription() const { return m_templateDescription; }
80 inline bool TemplateDescriptionHasBeenSet() const { return m_templateDescriptionHasBeenSet; }
81 template <typename TemplateDescriptionT = Aws::String>
82 void SetTemplateDescription(TemplateDescriptionT&& value) {
83 m_templateDescriptionHasBeenSet = true;
84 m_templateDescription = std::forward<TemplateDescriptionT>(value);
85 }
86 template <typename TemplateDescriptionT = Aws::String>
87 CreateTemplateRequest& WithTemplateDescription(TemplateDescriptionT&& value) {
88 SetTemplateDescription(std::forward<TemplateDescriptionT>(value));
89 return *this;
90 }
92
94
97 inline const Aws::Vector<RuleReference>& GetAssociatedRuleList() const { return m_associatedRuleList; }
98 inline bool AssociatedRuleListHasBeenSet() const { return m_associatedRuleListHasBeenSet; }
99 template <typename AssociatedRuleListT = Aws::Vector<RuleReference>>
100 void SetAssociatedRuleList(AssociatedRuleListT&& value) {
101 m_associatedRuleListHasBeenSet = true;
102 m_associatedRuleList = std::forward<AssociatedRuleListT>(value);
103 }
104 template <typename AssociatedRuleListT = Aws::Vector<RuleReference>>
105 CreateTemplateRequest& WithAssociatedRuleList(AssociatedRuleListT&& value) {
106 SetAssociatedRuleList(std::forward<AssociatedRuleListT>(value));
107 return *this;
108 }
109 template <typename AssociatedRuleListT = RuleReference>
110 CreateTemplateRequest& AddAssociatedRuleList(AssociatedRuleListT&& value) {
111 m_associatedRuleListHasBeenSet = true;
112 m_associatedRuleList.emplace_back(std::forward<AssociatedRuleListT>(value));
113 return *this;
114 }
116
118
121 inline TemplateFirewallType GetFirewallType() const { return m_firewallType; }
122 inline bool FirewallTypeHasBeenSet() const { return m_firewallTypeHasBeenSet; }
124 m_firewallTypeHasBeenSet = true;
125 m_firewallType = value;
126 }
128 SetFirewallType(value);
129 return *this;
130 }
132
134
140 inline bool GetIsPublished() const { return m_isPublished; }
141 inline bool IsPublishedHasBeenSet() const { return m_isPublishedHasBeenSet; }
142 inline void SetIsPublished(bool value) {
143 m_isPublishedHasBeenSet = true;
144 m_isPublished = value;
145 }
147 SetIsPublished(value);
148 return *this;
149 }
151
153
156 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
157 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
158 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
159 void SetTags(TagsT&& value) {
160 m_tagsHasBeenSet = true;
161 m_tags = std::forward<TagsT>(value);
162 }
163 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
165 SetTags(std::forward<TagsT>(value));
166 return *this;
167 }
168 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
169 CreateTemplateRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
170 m_tagsHasBeenSet = true;
171 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
172 return *this;
173 }
175 private:
177
178 Aws::String m_templateName;
179
180 Aws::String m_templateDescription;
181
182 Aws::Vector<RuleReference> m_associatedRuleList;
183
185
186 bool m_isPublished{false};
187
189 bool m_clientTokenHasBeenSet = true;
190 bool m_templateNameHasBeenSet = false;
191 bool m_templateDescriptionHasBeenSet = false;
192 bool m_associatedRuleListHasBeenSet = false;
193 bool m_firewallTypeHasBeenSet = false;
194 bool m_isPublishedHasBeenSet = false;
195 bool m_tagsHasBeenSet = false;
196};
197
198} // namespace Model
199} // namespace NetworkSecurityManager
200} // namespace Aws
CreateTemplateRequest & AddAssociatedRuleList(AssociatedRuleListT &&value)
CreateTemplateRequest & WithTemplateDescription(TemplateDescriptionT &&value)
const Aws::Vector< RuleReference > & GetAssociatedRuleList() const
const Aws::Map< Aws::String, Aws::String > & GetTags() const
AWS_NETWORKSECURITYMANAGER_API CreateTemplateRequest()=default
CreateTemplateRequest & WithAssociatedRuleList(AssociatedRuleListT &&value)
CreateTemplateRequest & WithClientToken(ClientTokenT &&value)
CreateTemplateRequest & WithTemplateName(TemplateNameT &&value)
AWS_NETWORKSECURITYMANAGER_API Aws::String SerializePayload() const override
CreateTemplateRequest & AddTags(TagsKeyT &&key, TagsValueT &&value)
CreateTemplateRequest & WithFirewallType(TemplateFirewallType value)
static Aws::Utils::UUID PseudoRandomUUID()
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector