/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.route53resolver.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *

* A single firewall rule in a rule group. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class FirewallRule implements Serializable, Cloneable, StructuredPojo { /** *

* The unique identifier of the firewall rule group of the rule. *

*/ private String firewallRuleGroupId; /** *

* The ID of the domain list that's used in the rule. *

*/ private String firewallDomainListId; /** *

* The name of the rule. *

*/ private String name; /** *

* The priority of the rule in the rule group. This value must be unique within the rule group. DNS Firewall * processes the rules in a rule group by order of priority, starting from the lowest setting. *

*/ private Integer priority; /** *

* The action that DNS Firewall should take on a DNS query when it matches one of the domains in the rule's domain * list: *

* */ private String action; /** *

* The way that you want DNS Firewall to block the request. Used for the rule action setting BLOCK. *

* */ private String blockResponse; /** *

* The custom DNS record to send back in response to the query. Used for the rule action BLOCK with a * BlockResponse setting of OVERRIDE. *

*/ private String blockOverrideDomain; /** *

* The DNS record's type. This determines the format of the record value that you provided in * BlockOverrideDomain. Used for the rule action BLOCK with a BlockResponse * setting of OVERRIDE. *

*/ private String blockOverrideDnsType; /** *

* The recommended amount of time, in seconds, for the DNS resolver or web browser to cache the provided override * record. Used for the rule action BLOCK with a BlockResponse setting of * OVERRIDE. *

*/ private Integer blockOverrideTtl; /** *

* A unique string defined by you to identify the request. This allows you to retry failed requests without the risk * of executing the operation twice. This can be any unique string, for example, a timestamp. *

*/ private String creatorRequestId; /** *

* The date and time that the rule was created, in Unix time format and Coordinated Universal Time (UTC). *

*/ private String creationTime; /** *

* The date and time that the rule was last modified, in Unix time format and Coordinated Universal Time (UTC). *

*/ private String modificationTime; /** *

* The unique identifier of the firewall rule group of the rule. *

* * @param firewallRuleGroupId * The unique identifier of the firewall rule group of the rule. */ public void setFirewallRuleGroupId(String firewallRuleGroupId) { this.firewallRuleGroupId = firewallRuleGroupId; } /** *

* The unique identifier of the firewall rule group of the rule. *

* * @return The unique identifier of the firewall rule group of the rule. */ public String getFirewallRuleGroupId() { return this.firewallRuleGroupId; } /** *

* The unique identifier of the firewall rule group of the rule. *

* * @param firewallRuleGroupId * The unique identifier of the firewall rule group of the rule. * @return Returns a reference to this object so that method calls can be chained together. */ public FirewallRule withFirewallRuleGroupId(String firewallRuleGroupId) { setFirewallRuleGroupId(firewallRuleGroupId); return this; } /** *

* The ID of the domain list that's used in the rule. *

* * @param firewallDomainListId * The ID of the domain list that's used in the rule. */ public void setFirewallDomainListId(String firewallDomainListId) { this.firewallDomainListId = firewallDomainListId; } /** *

* The ID of the domain list that's used in the rule. *

* * @return The ID of the domain list that's used in the rule. */ public String getFirewallDomainListId() { return this.firewallDomainListId; } /** *

* The ID of the domain list that's used in the rule. *

* * @param firewallDomainListId * The ID of the domain list that's used in the rule. * @return Returns a reference to this object so that method calls can be chained together. */ public FirewallRule withFirewallDomainListId(String firewallDomainListId) { setFirewallDomainListId(firewallDomainListId); return this; } /** *

* The name of the rule. *

* * @param name * The name of the rule. */ public void setName(String name) { this.name = name; } /** *

* The name of the rule. *

* * @return The name of the rule. */ public String getName() { return this.name; } /** *

* The name of the rule. *

* * @param name * The name of the rule. * @return Returns a reference to this object so that method calls can be chained together. */ public FirewallRule withName(String name) { setName(name); return this; } /** *

* The priority of the rule in the rule group. This value must be unique within the rule group. DNS Firewall * processes the rules in a rule group by order of priority, starting from the lowest setting. *

* * @param priority * The priority of the rule in the rule group. This value must be unique within the rule group. DNS Firewall * processes the rules in a rule group by order of priority, starting from the lowest setting. */ public void setPriority(Integer priority) { this.priority = priority; } /** *

* The priority of the rule in the rule group. This value must be unique within the rule group. DNS Firewall * processes the rules in a rule group by order of priority, starting from the lowest setting. *

* * @return The priority of the rule in the rule group. This value must be unique within the rule group. DNS Firewall * processes the rules in a rule group by order of priority, starting from the lowest setting. */ public Integer getPriority() { return this.priority; } /** *

* The priority of the rule in the rule group. This value must be unique within the rule group. DNS Firewall * processes the rules in a rule group by order of priority, starting from the lowest setting. *

* * @param priority * The priority of the rule in the rule group. This value must be unique within the rule group. DNS Firewall * processes the rules in a rule group by order of priority, starting from the lowest setting. * @return Returns a reference to this object so that method calls can be chained together. */ public FirewallRule withPriority(Integer priority) { setPriority(priority); return this; } /** *

* The action that DNS Firewall should take on a DNS query when it matches one of the domains in the rule's domain * list: *

* * * @param action * The action that DNS Firewall should take on a DNS query when it matches one of the domains in the rule's * domain list:

*