/* * 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.AmazonWebServiceRequest; /** * * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class UpdateFirewallRuleRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The unique identifier of the firewall rule group for the rule. *
*/ private String firewallRuleGroupId; /** ** The ID of the domain list to use in the rule. *
*/ private String firewallDomainListId; /** ** The setting that determines the processing order of the rule in the rule group. DNS Firewall processes the rules * in a rule group by order of priority, starting from the lowest setting. *
** You must specify a unique priority for each rule in a rule group. To make it easier to insert rules later, leave * space between the numbers, for example, use 100, 200, and so on. You can change the priority setting for the * rules in a rule group at any time. *
*/ 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: *
*
* ALLOW
- Permit the request to go through.
*
* ALERT
- Permit the request to go through but send an alert to the logs.
*
* BLOCK
- Disallow the request. This option requires additional details in the rule's
* BlockResponse
.
*
* The way that you want DNS Firewall to block the request. Used for the rule action setting BLOCK
.
*
* NODATA
- Respond indicating that the query was successful, but no response is available for it.
*
* NXDOMAIN
- Respond indicating that the domain name that's in the query doesn't exist.
*
* OVERRIDE
- Provide a custom override in the response. This option requires custom handling details
* in the rule's BlockOverride*
settings.
*
* The custom DNS record to send back in response to the query. Used for the rule action BLOCK
with a
* BlockResponse
setting of OVERRIDE
.
*
* 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
.
*
* 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
.
*
* The name of the rule. *
*/ private String name; /** ** The unique identifier of the firewall rule group for the rule. *
* * @param firewallRuleGroupId * The unique identifier of the firewall rule group for the rule. */ public void setFirewallRuleGroupId(String firewallRuleGroupId) { this.firewallRuleGroupId = firewallRuleGroupId; } /** ** The unique identifier of the firewall rule group for the rule. *
* * @return The unique identifier of the firewall rule group for the rule. */ public String getFirewallRuleGroupId() { return this.firewallRuleGroupId; } /** ** The unique identifier of the firewall rule group for the rule. *
* * @param firewallRuleGroupId * The unique identifier of the firewall rule group for the rule. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateFirewallRuleRequest withFirewallRuleGroupId(String firewallRuleGroupId) { setFirewallRuleGroupId(firewallRuleGroupId); return this; } /** ** The ID of the domain list to use in the rule. *
* * @param firewallDomainListId * The ID of the domain list to use in the rule. */ public void setFirewallDomainListId(String firewallDomainListId) { this.firewallDomainListId = firewallDomainListId; } /** ** The ID of the domain list to use in the rule. *
* * @return The ID of the domain list to use in the rule. */ public String getFirewallDomainListId() { return this.firewallDomainListId; } /** ** The ID of the domain list to use in the rule. *
* * @param firewallDomainListId * The ID of the domain list to use in the rule. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateFirewallRuleRequest withFirewallDomainListId(String firewallDomainListId) { setFirewallDomainListId(firewallDomainListId); return this; } /** ** The setting that determines the processing order of the rule in the rule group. DNS Firewall processes the rules * in a rule group by order of priority, starting from the lowest setting. *
** You must specify a unique priority for each rule in a rule group. To make it easier to insert rules later, leave * space between the numbers, for example, use 100, 200, and so on. You can change the priority setting for the * rules in a rule group at any time. *
* * @param priority * The setting that determines the processing order of the rule in the rule group. DNS Firewall processes the * rules in a rule group by order of priority, starting from the lowest setting. ** You must specify a unique priority for each rule in a rule group. To make it easier to insert rules later, * leave space between the numbers, for example, use 100, 200, and so on. You can change the priority setting * for the rules in a rule group at any time. */ public void setPriority(Integer priority) { this.priority = priority; } /** *
* The setting that determines the processing order of the rule in the rule group. DNS Firewall processes the rules * in a rule group by order of priority, starting from the lowest setting. *
** You must specify a unique priority for each rule in a rule group. To make it easier to insert rules later, leave * space between the numbers, for example, use 100, 200, and so on. You can change the priority setting for the * rules in a rule group at any time. *
* * @return The setting that determines the processing order of the rule in the rule group. DNS Firewall processes * the rules in a rule group by order of priority, starting from the lowest setting. ** You must specify a unique priority for each rule in a rule group. To make it easier to insert rules * later, leave space between the numbers, for example, use 100, 200, and so on. You can change the priority * setting for the rules in a rule group at any time. */ public Integer getPriority() { return this.priority; } /** *
* The setting that determines the processing order of the rule in the rule group. DNS Firewall processes the rules * in a rule group by order of priority, starting from the lowest setting. *
** You must specify a unique priority for each rule in a rule group. To make it easier to insert rules later, leave * space between the numbers, for example, use 100, 200, and so on. You can change the priority setting for the * rules in a rule group at any time. *
* * @param priority * The setting that determines the processing order of the rule in the rule group. DNS Firewall processes the * rules in a rule group by order of priority, starting from the lowest setting. ** You must specify a unique priority for each rule in a rule group. To make it easier to insert rules later, * leave space between the numbers, for example, use 100, 200, and so on. You can change the priority setting * for the rules in a rule group at any time. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateFirewallRuleRequest 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: *
*
* ALLOW
- Permit the request to go through.
*
* ALERT
- Permit the request to go through but send an alert to the logs.
*
* BLOCK
- Disallow the request. This option requires additional details in the rule's
* BlockResponse
.
*
* ALLOW
- Permit the request to go through.
*
* ALERT
- Permit the request to go through but send an alert to the logs.
*
* BLOCK
- Disallow the request. This option requires additional details in the rule's
* BlockResponse
.
*
* The action that DNS Firewall should take on a DNS query when it matches one of the domains in the rule's domain * list: *
*
* ALLOW
- Permit the request to go through.
*
* ALERT
- Permit the request to go through but send an alert to the logs.
*
* BLOCK
- Disallow the request. This option requires additional details in the rule's
* BlockResponse
.
*
* ALLOW
- Permit the request to go through.
*
* ALERT
- Permit the request to go through but send an alert to the logs.
*
* BLOCK
- Disallow the request. This option requires additional details in the rule's
* BlockResponse
.
*
* The action that DNS Firewall should take on a DNS query when it matches one of the domains in the rule's domain * list: *
*
* ALLOW
- Permit the request to go through.
*
* ALERT
- Permit the request to go through but send an alert to the logs.
*
* BLOCK
- Disallow the request. This option requires additional details in the rule's
* BlockResponse
.
*
* ALLOW
- Permit the request to go through.
*
* ALERT
- Permit the request to go through but send an alert to the logs.
*
* BLOCK
- Disallow the request. This option requires additional details in the rule's
* BlockResponse
.
*
* The action that DNS Firewall should take on a DNS query when it matches one of the domains in the rule's domain * list: *
*
* ALLOW
- Permit the request to go through.
*
* ALERT
- Permit the request to go through but send an alert to the logs.
*
* BLOCK
- Disallow the request. This option requires additional details in the rule's
* BlockResponse
.
*
* ALLOW
- Permit the request to go through.
*
* ALERT
- Permit the request to go through but send an alert to the logs.
*
* BLOCK
- Disallow the request. This option requires additional details in the rule's
* BlockResponse
.
*
* The way that you want DNS Firewall to block the request. Used for the rule action setting BLOCK
.
*
* NODATA
- Respond indicating that the query was successful, but no response is available for it.
*
* NXDOMAIN
- Respond indicating that the domain name that's in the query doesn't exist.
*
* OVERRIDE
- Provide a custom override in the response. This option requires custom handling details
* in the rule's BlockOverride*
settings.
*
BLOCK
.
*
* NODATA
- Respond indicating that the query was successful, but no response is available for
* it.
*
* NXDOMAIN
- Respond indicating that the domain name that's in the query doesn't exist.
*
* OVERRIDE
- Provide a custom override in the response. This option requires custom handling
* details in the rule's BlockOverride*
settings.
*
* The way that you want DNS Firewall to block the request. Used for the rule action setting BLOCK
.
*
* NODATA
- Respond indicating that the query was successful, but no response is available for it.
*
* NXDOMAIN
- Respond indicating that the domain name that's in the query doesn't exist.
*
* OVERRIDE
- Provide a custom override in the response. This option requires custom handling details
* in the rule's BlockOverride*
settings.
*
BLOCK
.
*
* NODATA
- Respond indicating that the query was successful, but no response is available for
* it.
*
* NXDOMAIN
- Respond indicating that the domain name that's in the query doesn't exist.
*
* OVERRIDE
- Provide a custom override in the response. This option requires custom handling
* details in the rule's BlockOverride*
settings.
*
* The way that you want DNS Firewall to block the request. Used for the rule action setting BLOCK
.
*
* NODATA
- Respond indicating that the query was successful, but no response is available for it.
*
* NXDOMAIN
- Respond indicating that the domain name that's in the query doesn't exist.
*
* OVERRIDE
- Provide a custom override in the response. This option requires custom handling details
* in the rule's BlockOverride*
settings.
*
BLOCK
.
*
* NODATA
- Respond indicating that the query was successful, but no response is available for
* it.
*
* NXDOMAIN
- Respond indicating that the domain name that's in the query doesn't exist.
*
* OVERRIDE
- Provide a custom override in the response. This option requires custom handling
* details in the rule's BlockOverride*
settings.
*
* The way that you want DNS Firewall to block the request. Used for the rule action setting BLOCK
.
*
* NODATA
- Respond indicating that the query was successful, but no response is available for it.
*
* NXDOMAIN
- Respond indicating that the domain name that's in the query doesn't exist.
*
* OVERRIDE
- Provide a custom override in the response. This option requires custom handling details
* in the rule's BlockOverride*
settings.
*
BLOCK
.
*
* NODATA
- Respond indicating that the query was successful, but no response is available for
* it.
*
* NXDOMAIN
- Respond indicating that the domain name that's in the query doesn't exist.
*
* OVERRIDE
- Provide a custom override in the response. This option requires custom handling
* details in the rule's BlockOverride*
settings.
*
* The custom DNS record to send back in response to the query. Used for the rule action BLOCK
with a
* BlockResponse
setting of OVERRIDE
.
*
BLOCK
* with a BlockResponse
setting of OVERRIDE
.
*/
public void setBlockOverrideDomain(String blockOverrideDomain) {
this.blockOverrideDomain = blockOverrideDomain;
}
/**
*
* The custom DNS record to send back in response to the query. Used for the rule action BLOCK
with a
* BlockResponse
setting of OVERRIDE
.
*
BLOCK
* with a BlockResponse
setting of OVERRIDE
.
*/
public String getBlockOverrideDomain() {
return this.blockOverrideDomain;
}
/**
*
* The custom DNS record to send back in response to the query. Used for the rule action BLOCK
with a
* BlockResponse
setting of OVERRIDE
.
*
BLOCK
* with a BlockResponse
setting of OVERRIDE
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateFirewallRuleRequest withBlockOverrideDomain(String blockOverrideDomain) {
setBlockOverrideDomain(blockOverrideDomain);
return this;
}
/**
*
* 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
.
*
BlockOverrideDomain
. Used for the rule action BLOCK
with a
* BlockResponse
setting of OVERRIDE
.
* @see BlockOverrideDnsType
*/
public void setBlockOverrideDnsType(String blockOverrideDnsType) {
this.blockOverrideDnsType = blockOverrideDnsType;
}
/**
*
* 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
.
*
BlockOverrideDomain
. Used for the rule action BLOCK
with a
* BlockResponse
setting of OVERRIDE
.
* @see BlockOverrideDnsType
*/
public String getBlockOverrideDnsType() {
return this.blockOverrideDnsType;
}
/**
*
* 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
.
*
BlockOverrideDomain
. Used for the rule action BLOCK
with a
* BlockResponse
setting of OVERRIDE
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see BlockOverrideDnsType
*/
public UpdateFirewallRuleRequest withBlockOverrideDnsType(String blockOverrideDnsType) {
setBlockOverrideDnsType(blockOverrideDnsType);
return this;
}
/**
*
* 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
.
*
BlockOverrideDomain
. Used for the rule action BLOCK
with a
* BlockResponse
setting of OVERRIDE
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see BlockOverrideDnsType
*/
public UpdateFirewallRuleRequest withBlockOverrideDnsType(BlockOverrideDnsType blockOverrideDnsType) {
this.blockOverrideDnsType = blockOverrideDnsType.toString();
return this;
}
/**
*
* 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
.
*
BLOCK
with a BlockResponse
setting of
* OVERRIDE
.
*/
public void setBlockOverrideTtl(Integer blockOverrideTtl) {
this.blockOverrideTtl = blockOverrideTtl;
}
/**
*
* 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
.
*
BLOCK
with a BlockResponse
setting of
* OVERRIDE
.
*/
public Integer getBlockOverrideTtl() {
return this.blockOverrideTtl;
}
/**
*
* 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
.
*
BLOCK
with a BlockResponse
setting of
* OVERRIDE
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateFirewallRuleRequest withBlockOverrideTtl(Integer blockOverrideTtl) {
setBlockOverrideTtl(blockOverrideTtl);
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 UpdateFirewallRuleRequest withName(String name) { setName(name); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getFirewallRuleGroupId() != null) sb.append("FirewallRuleGroupId: ").append(getFirewallRuleGroupId()).append(","); if (getFirewallDomainListId() != null) sb.append("FirewallDomainListId: ").append(getFirewallDomainListId()).append(","); if (getPriority() != null) sb.append("Priority: ").append(getPriority()).append(","); if (getAction() != null) sb.append("Action: ").append(getAction()).append(","); if (getBlockResponse() != null) sb.append("BlockResponse: ").append(getBlockResponse()).append(","); if (getBlockOverrideDomain() != null) sb.append("BlockOverrideDomain: ").append(getBlockOverrideDomain()).append(","); if (getBlockOverrideDnsType() != null) sb.append("BlockOverrideDnsType: ").append(getBlockOverrideDnsType()).append(","); if (getBlockOverrideTtl() != null) sb.append("BlockOverrideTtl: ").append(getBlockOverrideTtl()).append(","); if (getName() != null) sb.append("Name: ").append(getName()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof UpdateFirewallRuleRequest == false) return false; UpdateFirewallRuleRequest other = (UpdateFirewallRuleRequest) obj; if (other.getFirewallRuleGroupId() == null ^ this.getFirewallRuleGroupId() == null) return false; if (other.getFirewallRuleGroupId() != null && other.getFirewallRuleGroupId().equals(this.getFirewallRuleGroupId()) == false) return false; if (other.getFirewallDomainListId() == null ^ this.getFirewallDomainListId() == null) return false; if (other.getFirewallDomainListId() != null && other.getFirewallDomainListId().equals(this.getFirewallDomainListId()) == false) return false; if (other.getPriority() == null ^ this.getPriority() == null) return false; if (other.getPriority() != null && other.getPriority().equals(this.getPriority()) == false) return false; if (other.getAction() == null ^ this.getAction() == null) return false; if (other.getAction() != null && other.getAction().equals(this.getAction()) == false) return false; if (other.getBlockResponse() == null ^ this.getBlockResponse() == null) return false; if (other.getBlockResponse() != null && other.getBlockResponse().equals(this.getBlockResponse()) == false) return false; if (other.getBlockOverrideDomain() == null ^ this.getBlockOverrideDomain() == null) return false; if (other.getBlockOverrideDomain() != null && other.getBlockOverrideDomain().equals(this.getBlockOverrideDomain()) == false) return false; if (other.getBlockOverrideDnsType() == null ^ this.getBlockOverrideDnsType() == null) return false; if (other.getBlockOverrideDnsType() != null && other.getBlockOverrideDnsType().equals(this.getBlockOverrideDnsType()) == false) return false; if (other.getBlockOverrideTtl() == null ^ this.getBlockOverrideTtl() == null) return false; if (other.getBlockOverrideTtl() != null && other.getBlockOverrideTtl().equals(this.getBlockOverrideTtl()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getFirewallRuleGroupId() == null) ? 0 : getFirewallRuleGroupId().hashCode()); hashCode = prime * hashCode + ((getFirewallDomainListId() == null) ? 0 : getFirewallDomainListId().hashCode()); hashCode = prime * hashCode + ((getPriority() == null) ? 0 : getPriority().hashCode()); hashCode = prime * hashCode + ((getAction() == null) ? 0 : getAction().hashCode()); hashCode = prime * hashCode + ((getBlockResponse() == null) ? 0 : getBlockResponse().hashCode()); hashCode = prime * hashCode + ((getBlockOverrideDomain() == null) ? 0 : getBlockOverrideDomain().hashCode()); hashCode = prime * hashCode + ((getBlockOverrideDnsType() == null) ? 0 : getBlockOverrideDnsType().hashCode()); hashCode = prime * hashCode + ((getBlockOverrideTtl() == null) ? 0 : getBlockOverrideTtl().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); return hashCode; } @Override public UpdateFirewallRuleRequest clone() { return (UpdateFirewallRuleRequest) super.clone(); } }