AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
CreateRuleRequest.h
1
6#pragma once
7#include <aws/vpc-lattice/VPCLattice_EXPORTS.h>
8#include <aws/vpc-lattice/VPCLatticeRequest.h>
9#include <aws/vpc-lattice/model/RuleAction.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11#include <aws/vpc-lattice/model/RuleMatch.h>
12#include <aws/core/utils/memory/stl/AWSMap.h>
13#include <utility>
14#include <aws/core/utils/UUID.h>
15
16namespace Aws
17{
18namespace VPCLattice
19{
20namespace Model
21{
22
26 {
27 public:
28 AWS_VPCLATTICE_API CreateRuleRequest() = default;
29
30 // Service request name is the Operation name which will send this request out,
31 // each operation should has unique request name, so that we can get operation's name from this request.
32 // Note: this is not true for response, multiple operations may have the same response name,
33 // so we can not get operation's name from response.
34 inline virtual const char* GetServiceRequestName() const override { return "CreateRule"; }
35
36 AWS_VPCLATTICE_API Aws::String SerializePayload() const override;
37
38
40
43 inline const RuleAction& GetAction() const { return m_action; }
44 inline bool ActionHasBeenSet() const { return m_actionHasBeenSet; }
45 template<typename ActionT = RuleAction>
46 void SetAction(ActionT&& value) { m_actionHasBeenSet = true; m_action = std::forward<ActionT>(value); }
47 template<typename ActionT = RuleAction>
48 CreateRuleRequest& WithAction(ActionT&& value) { SetAction(std::forward<ActionT>(value)); return *this;}
50
52
58 inline const Aws::String& GetClientToken() const { return m_clientToken; }
59 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
60 template<typename ClientTokenT = Aws::String>
61 void SetClientToken(ClientTokenT&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::forward<ClientTokenT>(value); }
62 template<typename ClientTokenT = Aws::String>
63 CreateRuleRequest& WithClientToken(ClientTokenT&& value) { SetClientToken(std::forward<ClientTokenT>(value)); return *this;}
65
67
70 inline const Aws::String& GetListenerIdentifier() const { return m_listenerIdentifier; }
71 inline bool ListenerIdentifierHasBeenSet() const { return m_listenerIdentifierHasBeenSet; }
72 template<typename ListenerIdentifierT = Aws::String>
73 void SetListenerIdentifier(ListenerIdentifierT&& value) { m_listenerIdentifierHasBeenSet = true; m_listenerIdentifier = std::forward<ListenerIdentifierT>(value); }
74 template<typename ListenerIdentifierT = Aws::String>
75 CreateRuleRequest& WithListenerIdentifier(ListenerIdentifierT&& value) { SetListenerIdentifier(std::forward<ListenerIdentifierT>(value)); return *this;}
77
79
82 inline const RuleMatch& GetMatch() const { return m_match; }
83 inline bool MatchHasBeenSet() const { return m_matchHasBeenSet; }
84 template<typename MatchT = RuleMatch>
85 void SetMatch(MatchT&& value) { m_matchHasBeenSet = true; m_match = std::forward<MatchT>(value); }
86 template<typename MatchT = RuleMatch>
87 CreateRuleRequest& WithMatch(MatchT&& value) { SetMatch(std::forward<MatchT>(value)); return *this;}
89
91
96 inline const Aws::String& GetName() const { return m_name; }
97 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
98 template<typename NameT = Aws::String>
99 void SetName(NameT&& value) { m_nameHasBeenSet = true; m_name = std::forward<NameT>(value); }
100 template<typename NameT = Aws::String>
101 CreateRuleRequest& WithName(NameT&& value) { SetName(std::forward<NameT>(value)); return *this;}
103
105
110 inline int GetPriority() const { return m_priority; }
111 inline bool PriorityHasBeenSet() const { return m_priorityHasBeenSet; }
112 inline void SetPriority(int value) { m_priorityHasBeenSet = true; m_priority = value; }
113 inline CreateRuleRequest& WithPriority(int value) { SetPriority(value); return *this;}
115
117
120 inline const Aws::String& GetServiceIdentifier() const { return m_serviceIdentifier; }
121 inline bool ServiceIdentifierHasBeenSet() const { return m_serviceIdentifierHasBeenSet; }
122 template<typename ServiceIdentifierT = Aws::String>
123 void SetServiceIdentifier(ServiceIdentifierT&& value) { m_serviceIdentifierHasBeenSet = true; m_serviceIdentifier = std::forward<ServiceIdentifierT>(value); }
124 template<typename ServiceIdentifierT = Aws::String>
125 CreateRuleRequest& WithServiceIdentifier(ServiceIdentifierT&& value) { SetServiceIdentifier(std::forward<ServiceIdentifierT>(value)); return *this;}
127
129
132 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
133 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
134 template<typename TagsT = Aws::Map<Aws::String, Aws::String>>
135 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
136 template<typename TagsT = Aws::Map<Aws::String, Aws::String>>
137 CreateRuleRequest& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
138 template<typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
139 CreateRuleRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
140 m_tagsHasBeenSet = true; m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value)); return *this;
141 }
143 private:
144
145 RuleAction m_action;
146 bool m_actionHasBeenSet = false;
147
149 bool m_clientTokenHasBeenSet = true;
150
151 Aws::String m_listenerIdentifier;
152 bool m_listenerIdentifierHasBeenSet = false;
153
154 RuleMatch m_match;
155 bool m_matchHasBeenSet = false;
156
157 Aws::String m_name;
158 bool m_nameHasBeenSet = false;
159
160 int m_priority{0};
161 bool m_priorityHasBeenSet = false;
162
163 Aws::String m_serviceIdentifier;
164 bool m_serviceIdentifierHasBeenSet = false;
165
167 bool m_tagsHasBeenSet = false;
168 };
169
170} // namespace Model
171} // namespace VPCLattice
172} // namespace Aws
static Aws::Utils::UUID PseudoRandomUUID()
CreateRuleRequest & WithName(NameT &&value)
CreateRuleRequest & WithListenerIdentifier(ListenerIdentifierT &&value)
const Aws::String & GetServiceIdentifier() const
CreateRuleRequest & WithServiceIdentifier(ServiceIdentifierT &&value)
CreateRuleRequest & AddTags(TagsKeyT &&key, TagsValueT &&value)
void SetListenerIdentifier(ListenerIdentifierT &&value)
CreateRuleRequest & WithTags(TagsT &&value)
virtual const char * GetServiceRequestName() const override
CreateRuleRequest & WithPriority(int value)
void SetServiceIdentifier(ServiceIdentifierT &&value)
const Aws::String & GetListenerIdentifier() const
CreateRuleRequest & WithAction(ActionT &&value)
const Aws::Map< Aws::String, Aws::String > & GetTags() const
CreateRuleRequest & WithMatch(MatchT &&value)
const Aws::String & GetClientToken() const
AWS_VPCLATTICE_API Aws::String SerializePayload() const override
AWS_VPCLATTICE_API CreateRuleRequest()=default
CreateRuleRequest & WithClientToken(ClientTokenT &&value)
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