1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/network-firewall/NetworkFirewall_EXPORTS.h> 8 #include <aws/core/utils/memory/stl/AWSString.h> 9 #include <aws/network-firewall/model/RuleGroupType.h> 10 #include <aws/network-firewall/model/ResourceStatus.h> 11 #include <aws/core/utils/memory/stl/AWSVector.h> 12 #include <aws/network-firewall/model/Tag.h> 13 #include <utility> 14 15 namespace Aws 16 { 17 namespace Utils 18 { 19 namespace Json 20 { 21 class JsonValue; 22 class JsonView; 23 } // namespace Json 24 } // namespace Utils 25 namespace NetworkFirewall 26 { 27 namespace Model 28 { 29 30 /** 31 * <p>The high-level properties of a rule group. This, along with the 32 * <a>RuleGroup</a>, define the rule group. You can retrieve all objects for a rule 33 * group by calling <a>DescribeRuleGroup</a>. </p><p><h3>See Also:</h3> <a 34 * href="http://docs.aws.amazon.com/goto/WebAPI/network-firewall-2020-11-12/RuleGroupResponse">AWS 35 * API Reference</a></p> 36 */ 37 class AWS_NETWORKFIREWALL_API RuleGroupResponse 38 { 39 public: 40 RuleGroupResponse(); 41 RuleGroupResponse(Aws::Utils::Json::JsonView jsonValue); 42 RuleGroupResponse& operator=(Aws::Utils::Json::JsonView jsonValue); 43 Aws::Utils::Json::JsonValue Jsonize() const; 44 45 46 /** 47 * <p>The Amazon Resource Name (ARN) of the rule group.</p> <p>If this 48 * response is for a create request that had <code>DryRun</code> set to 49 * <code>TRUE</code>, then this ARN is a placeholder that isn't attached to a valid 50 * resource.</p> 51 */ GetRuleGroupArn()52 inline const Aws::String& GetRuleGroupArn() const{ return m_ruleGroupArn; } 53 54 /** 55 * <p>The Amazon Resource Name (ARN) of the rule group.</p> <p>If this 56 * response is for a create request that had <code>DryRun</code> set to 57 * <code>TRUE</code>, then this ARN is a placeholder that isn't attached to a valid 58 * resource.</p> 59 */ RuleGroupArnHasBeenSet()60 inline bool RuleGroupArnHasBeenSet() const { return m_ruleGroupArnHasBeenSet; } 61 62 /** 63 * <p>The Amazon Resource Name (ARN) of the rule group.</p> <p>If this 64 * response is for a create request that had <code>DryRun</code> set to 65 * <code>TRUE</code>, then this ARN is a placeholder that isn't attached to a valid 66 * resource.</p> 67 */ SetRuleGroupArn(const Aws::String & value)68 inline void SetRuleGroupArn(const Aws::String& value) { m_ruleGroupArnHasBeenSet = true; m_ruleGroupArn = value; } 69 70 /** 71 * <p>The Amazon Resource Name (ARN) of the rule group.</p> <p>If this 72 * response is for a create request that had <code>DryRun</code> set to 73 * <code>TRUE</code>, then this ARN is a placeholder that isn't attached to a valid 74 * resource.</p> 75 */ SetRuleGroupArn(Aws::String && value)76 inline void SetRuleGroupArn(Aws::String&& value) { m_ruleGroupArnHasBeenSet = true; m_ruleGroupArn = std::move(value); } 77 78 /** 79 * <p>The Amazon Resource Name (ARN) of the rule group.</p> <p>If this 80 * response is for a create request that had <code>DryRun</code> set to 81 * <code>TRUE</code>, then this ARN is a placeholder that isn't attached to a valid 82 * resource.</p> 83 */ SetRuleGroupArn(const char * value)84 inline void SetRuleGroupArn(const char* value) { m_ruleGroupArnHasBeenSet = true; m_ruleGroupArn.assign(value); } 85 86 /** 87 * <p>The Amazon Resource Name (ARN) of the rule group.</p> <p>If this 88 * response is for a create request that had <code>DryRun</code> set to 89 * <code>TRUE</code>, then this ARN is a placeholder that isn't attached to a valid 90 * resource.</p> 91 */ WithRuleGroupArn(const Aws::String & value)92 inline RuleGroupResponse& WithRuleGroupArn(const Aws::String& value) { SetRuleGroupArn(value); return *this;} 93 94 /** 95 * <p>The Amazon Resource Name (ARN) of the rule group.</p> <p>If this 96 * response is for a create request that had <code>DryRun</code> set to 97 * <code>TRUE</code>, then this ARN is a placeholder that isn't attached to a valid 98 * resource.</p> 99 */ WithRuleGroupArn(Aws::String && value)100 inline RuleGroupResponse& WithRuleGroupArn(Aws::String&& value) { SetRuleGroupArn(std::move(value)); return *this;} 101 102 /** 103 * <p>The Amazon Resource Name (ARN) of the rule group.</p> <p>If this 104 * response is for a create request that had <code>DryRun</code> set to 105 * <code>TRUE</code>, then this ARN is a placeholder that isn't attached to a valid 106 * resource.</p> 107 */ WithRuleGroupArn(const char * value)108 inline RuleGroupResponse& WithRuleGroupArn(const char* value) { SetRuleGroupArn(value); return *this;} 109 110 111 /** 112 * <p>The descriptive name of the rule group. You can't change the name of a rule 113 * group after you create it.</p> 114 */ GetRuleGroupName()115 inline const Aws::String& GetRuleGroupName() const{ return m_ruleGroupName; } 116 117 /** 118 * <p>The descriptive name of the rule group. You can't change the name of a rule 119 * group after you create it.</p> 120 */ RuleGroupNameHasBeenSet()121 inline bool RuleGroupNameHasBeenSet() const { return m_ruleGroupNameHasBeenSet; } 122 123 /** 124 * <p>The descriptive name of the rule group. You can't change the name of a rule 125 * group after you create it.</p> 126 */ SetRuleGroupName(const Aws::String & value)127 inline void SetRuleGroupName(const Aws::String& value) { m_ruleGroupNameHasBeenSet = true; m_ruleGroupName = value; } 128 129 /** 130 * <p>The descriptive name of the rule group. You can't change the name of a rule 131 * group after you create it.</p> 132 */ SetRuleGroupName(Aws::String && value)133 inline void SetRuleGroupName(Aws::String&& value) { m_ruleGroupNameHasBeenSet = true; m_ruleGroupName = std::move(value); } 134 135 /** 136 * <p>The descriptive name of the rule group. You can't change the name of a rule 137 * group after you create it.</p> 138 */ SetRuleGroupName(const char * value)139 inline void SetRuleGroupName(const char* value) { m_ruleGroupNameHasBeenSet = true; m_ruleGroupName.assign(value); } 140 141 /** 142 * <p>The descriptive name of the rule group. You can't change the name of a rule 143 * group after you create it.</p> 144 */ WithRuleGroupName(const Aws::String & value)145 inline RuleGroupResponse& WithRuleGroupName(const Aws::String& value) { SetRuleGroupName(value); return *this;} 146 147 /** 148 * <p>The descriptive name of the rule group. You can't change the name of a rule 149 * group after you create it.</p> 150 */ WithRuleGroupName(Aws::String && value)151 inline RuleGroupResponse& WithRuleGroupName(Aws::String&& value) { SetRuleGroupName(std::move(value)); return *this;} 152 153 /** 154 * <p>The descriptive name of the rule group. You can't change the name of a rule 155 * group after you create it.</p> 156 */ WithRuleGroupName(const char * value)157 inline RuleGroupResponse& WithRuleGroupName(const char* value) { SetRuleGroupName(value); return *this;} 158 159 160 /** 161 * <p>The unique identifier for the rule group. </p> 162 */ GetRuleGroupId()163 inline const Aws::String& GetRuleGroupId() const{ return m_ruleGroupId; } 164 165 /** 166 * <p>The unique identifier for the rule group. </p> 167 */ RuleGroupIdHasBeenSet()168 inline bool RuleGroupIdHasBeenSet() const { return m_ruleGroupIdHasBeenSet; } 169 170 /** 171 * <p>The unique identifier for the rule group. </p> 172 */ SetRuleGroupId(const Aws::String & value)173 inline void SetRuleGroupId(const Aws::String& value) { m_ruleGroupIdHasBeenSet = true; m_ruleGroupId = value; } 174 175 /** 176 * <p>The unique identifier for the rule group. </p> 177 */ SetRuleGroupId(Aws::String && value)178 inline void SetRuleGroupId(Aws::String&& value) { m_ruleGroupIdHasBeenSet = true; m_ruleGroupId = std::move(value); } 179 180 /** 181 * <p>The unique identifier for the rule group. </p> 182 */ SetRuleGroupId(const char * value)183 inline void SetRuleGroupId(const char* value) { m_ruleGroupIdHasBeenSet = true; m_ruleGroupId.assign(value); } 184 185 /** 186 * <p>The unique identifier for the rule group. </p> 187 */ WithRuleGroupId(const Aws::String & value)188 inline RuleGroupResponse& WithRuleGroupId(const Aws::String& value) { SetRuleGroupId(value); return *this;} 189 190 /** 191 * <p>The unique identifier for the rule group. </p> 192 */ WithRuleGroupId(Aws::String && value)193 inline RuleGroupResponse& WithRuleGroupId(Aws::String&& value) { SetRuleGroupId(std::move(value)); return *this;} 194 195 /** 196 * <p>The unique identifier for the rule group. </p> 197 */ WithRuleGroupId(const char * value)198 inline RuleGroupResponse& WithRuleGroupId(const char* value) { SetRuleGroupId(value); return *this;} 199 200 201 /** 202 * <p>A description of the rule group. </p> 203 */ GetDescription()204 inline const Aws::String& GetDescription() const{ return m_description; } 205 206 /** 207 * <p>A description of the rule group. </p> 208 */ DescriptionHasBeenSet()209 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } 210 211 /** 212 * <p>A description of the rule group. </p> 213 */ SetDescription(const Aws::String & value)214 inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } 215 216 /** 217 * <p>A description of the rule group. </p> 218 */ SetDescription(Aws::String && value)219 inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } 220 221 /** 222 * <p>A description of the rule group. </p> 223 */ SetDescription(const char * value)224 inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } 225 226 /** 227 * <p>A description of the rule group. </p> 228 */ WithDescription(const Aws::String & value)229 inline RuleGroupResponse& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} 230 231 /** 232 * <p>A description of the rule group. </p> 233 */ WithDescription(Aws::String && value)234 inline RuleGroupResponse& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} 235 236 /** 237 * <p>A description of the rule group. </p> 238 */ WithDescription(const char * value)239 inline RuleGroupResponse& WithDescription(const char* value) { SetDescription(value); return *this;} 240 241 242 /** 243 * <p>Indicates whether the rule group is stateless or stateful. If the rule group 244 * is stateless, it contains stateless rules. If it is stateful, it contains 245 * stateful rules. </p> 246 */ GetType()247 inline const RuleGroupType& GetType() const{ return m_type; } 248 249 /** 250 * <p>Indicates whether the rule group is stateless or stateful. If the rule group 251 * is stateless, it contains stateless rules. If it is stateful, it contains 252 * stateful rules. </p> 253 */ TypeHasBeenSet()254 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } 255 256 /** 257 * <p>Indicates whether the rule group is stateless or stateful. If the rule group 258 * is stateless, it contains stateless rules. If it is stateful, it contains 259 * stateful rules. </p> 260 */ SetType(const RuleGroupType & value)261 inline void SetType(const RuleGroupType& value) { m_typeHasBeenSet = true; m_type = value; } 262 263 /** 264 * <p>Indicates whether the rule group is stateless or stateful. If the rule group 265 * is stateless, it contains stateless rules. If it is stateful, it contains 266 * stateful rules. </p> 267 */ SetType(RuleGroupType && value)268 inline void SetType(RuleGroupType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } 269 270 /** 271 * <p>Indicates whether the rule group is stateless or stateful. If the rule group 272 * is stateless, it contains stateless rules. If it is stateful, it contains 273 * stateful rules. </p> 274 */ WithType(const RuleGroupType & value)275 inline RuleGroupResponse& WithType(const RuleGroupType& value) { SetType(value); return *this;} 276 277 /** 278 * <p>Indicates whether the rule group is stateless or stateful. If the rule group 279 * is stateless, it contains stateless rules. If it is stateful, it contains 280 * stateful rules. </p> 281 */ WithType(RuleGroupType && value)282 inline RuleGroupResponse& WithType(RuleGroupType&& value) { SetType(std::move(value)); return *this;} 283 284 285 /** 286 * <p>The maximum operating resources that this rule group can use. Rule group 287 * capacity is fixed at creation. When you update a rule group, you are limited to 288 * this capacity. When you reference a rule group from a firewall policy, Network 289 * Firewall reserves this capacity for the rule group. </p> <p>You can retrieve the 290 * capacity that would be required for a rule group before you create the rule 291 * group by calling <a>CreateRuleGroup</a> with <code>DryRun</code> set to 292 * <code>TRUE</code>. </p> 293 */ GetCapacity()294 inline int GetCapacity() const{ return m_capacity; } 295 296 /** 297 * <p>The maximum operating resources that this rule group can use. Rule group 298 * capacity is fixed at creation. When you update a rule group, you are limited to 299 * this capacity. When you reference a rule group from a firewall policy, Network 300 * Firewall reserves this capacity for the rule group. </p> <p>You can retrieve the 301 * capacity that would be required for a rule group before you create the rule 302 * group by calling <a>CreateRuleGroup</a> with <code>DryRun</code> set to 303 * <code>TRUE</code>. </p> 304 */ CapacityHasBeenSet()305 inline bool CapacityHasBeenSet() const { return m_capacityHasBeenSet; } 306 307 /** 308 * <p>The maximum operating resources that this rule group can use. Rule group 309 * capacity is fixed at creation. When you update a rule group, you are limited to 310 * this capacity. When you reference a rule group from a firewall policy, Network 311 * Firewall reserves this capacity for the rule group. </p> <p>You can retrieve the 312 * capacity that would be required for a rule group before you create the rule 313 * group by calling <a>CreateRuleGroup</a> with <code>DryRun</code> set to 314 * <code>TRUE</code>. </p> 315 */ SetCapacity(int value)316 inline void SetCapacity(int value) { m_capacityHasBeenSet = true; m_capacity = value; } 317 318 /** 319 * <p>The maximum operating resources that this rule group can use. Rule group 320 * capacity is fixed at creation. When you update a rule group, you are limited to 321 * this capacity. When you reference a rule group from a firewall policy, Network 322 * Firewall reserves this capacity for the rule group. </p> <p>You can retrieve the 323 * capacity that would be required for a rule group before you create the rule 324 * group by calling <a>CreateRuleGroup</a> with <code>DryRun</code> set to 325 * <code>TRUE</code>. </p> 326 */ WithCapacity(int value)327 inline RuleGroupResponse& WithCapacity(int value) { SetCapacity(value); return *this;} 328 329 330 /** 331 * <p>Detailed information about the current status of a rule group. </p> 332 */ GetRuleGroupStatus()333 inline const ResourceStatus& GetRuleGroupStatus() const{ return m_ruleGroupStatus; } 334 335 /** 336 * <p>Detailed information about the current status of a rule group. </p> 337 */ RuleGroupStatusHasBeenSet()338 inline bool RuleGroupStatusHasBeenSet() const { return m_ruleGroupStatusHasBeenSet; } 339 340 /** 341 * <p>Detailed information about the current status of a rule group. </p> 342 */ SetRuleGroupStatus(const ResourceStatus & value)343 inline void SetRuleGroupStatus(const ResourceStatus& value) { m_ruleGroupStatusHasBeenSet = true; m_ruleGroupStatus = value; } 344 345 /** 346 * <p>Detailed information about the current status of a rule group. </p> 347 */ SetRuleGroupStatus(ResourceStatus && value)348 inline void SetRuleGroupStatus(ResourceStatus&& value) { m_ruleGroupStatusHasBeenSet = true; m_ruleGroupStatus = std::move(value); } 349 350 /** 351 * <p>Detailed information about the current status of a rule group. </p> 352 */ WithRuleGroupStatus(const ResourceStatus & value)353 inline RuleGroupResponse& WithRuleGroupStatus(const ResourceStatus& value) { SetRuleGroupStatus(value); return *this;} 354 355 /** 356 * <p>Detailed information about the current status of a rule group. </p> 357 */ WithRuleGroupStatus(ResourceStatus && value)358 inline RuleGroupResponse& WithRuleGroupStatus(ResourceStatus&& value) { SetRuleGroupStatus(std::move(value)); return *this;} 359 360 361 /** 362 * <p>The key:value pairs to associate with the resource.</p> 363 */ GetTags()364 inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; } 365 366 /** 367 * <p>The key:value pairs to associate with the resource.</p> 368 */ TagsHasBeenSet()369 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } 370 371 /** 372 * <p>The key:value pairs to associate with the resource.</p> 373 */ SetTags(const Aws::Vector<Tag> & value)374 inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; } 375 376 /** 377 * <p>The key:value pairs to associate with the resource.</p> 378 */ SetTags(Aws::Vector<Tag> && value)379 inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } 380 381 /** 382 * <p>The key:value pairs to associate with the resource.</p> 383 */ WithTags(const Aws::Vector<Tag> & value)384 inline RuleGroupResponse& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;} 385 386 /** 387 * <p>The key:value pairs to associate with the resource.</p> 388 */ WithTags(Aws::Vector<Tag> && value)389 inline RuleGroupResponse& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;} 390 391 /** 392 * <p>The key:value pairs to associate with the resource.</p> 393 */ AddTags(const Tag & value)394 inline RuleGroupResponse& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } 395 396 /** 397 * <p>The key:value pairs to associate with the resource.</p> 398 */ AddTags(Tag && value)399 inline RuleGroupResponse& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } 400 401 402 /** 403 * <p>The number of capacity units currently consumed by the rule group rules. </p> 404 */ GetConsumedCapacity()405 inline int GetConsumedCapacity() const{ return m_consumedCapacity; } 406 407 /** 408 * <p>The number of capacity units currently consumed by the rule group rules. </p> 409 */ ConsumedCapacityHasBeenSet()410 inline bool ConsumedCapacityHasBeenSet() const { return m_consumedCapacityHasBeenSet; } 411 412 /** 413 * <p>The number of capacity units currently consumed by the rule group rules. </p> 414 */ SetConsumedCapacity(int value)415 inline void SetConsumedCapacity(int value) { m_consumedCapacityHasBeenSet = true; m_consumedCapacity = value; } 416 417 /** 418 * <p>The number of capacity units currently consumed by the rule group rules. </p> 419 */ WithConsumedCapacity(int value)420 inline RuleGroupResponse& WithConsumedCapacity(int value) { SetConsumedCapacity(value); return *this;} 421 422 423 /** 424 * <p>The number of firewall policies that use this rule group.</p> 425 */ GetNumberOfAssociations()426 inline int GetNumberOfAssociations() const{ return m_numberOfAssociations; } 427 428 /** 429 * <p>The number of firewall policies that use this rule group.</p> 430 */ NumberOfAssociationsHasBeenSet()431 inline bool NumberOfAssociationsHasBeenSet() const { return m_numberOfAssociationsHasBeenSet; } 432 433 /** 434 * <p>The number of firewall policies that use this rule group.</p> 435 */ SetNumberOfAssociations(int value)436 inline void SetNumberOfAssociations(int value) { m_numberOfAssociationsHasBeenSet = true; m_numberOfAssociations = value; } 437 438 /** 439 * <p>The number of firewall policies that use this rule group.</p> 440 */ WithNumberOfAssociations(int value)441 inline RuleGroupResponse& WithNumberOfAssociations(int value) { SetNumberOfAssociations(value); return *this;} 442 443 private: 444 445 Aws::String m_ruleGroupArn; 446 bool m_ruleGroupArnHasBeenSet; 447 448 Aws::String m_ruleGroupName; 449 bool m_ruleGroupNameHasBeenSet; 450 451 Aws::String m_ruleGroupId; 452 bool m_ruleGroupIdHasBeenSet; 453 454 Aws::String m_description; 455 bool m_descriptionHasBeenSet; 456 457 RuleGroupType m_type; 458 bool m_typeHasBeenSet; 459 460 int m_capacity; 461 bool m_capacityHasBeenSet; 462 463 ResourceStatus m_ruleGroupStatus; 464 bool m_ruleGroupStatusHasBeenSet; 465 466 Aws::Vector<Tag> m_tags; 467 bool m_tagsHasBeenSet; 468 469 int m_consumedCapacity; 470 bool m_consumedCapacityHasBeenSet; 471 472 int m_numberOfAssociations; 473 bool m_numberOfAssociationsHasBeenSet; 474 }; 475 476 } // namespace Model 477 } // namespace NetworkFirewall 478 } // namespace Aws 479