com.amazonaws.services.route53resolver.model.CreateFirewallRuleRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-route53resolver Show documentation
/*
* Copyright 2016-2021 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 CreateFirewallRuleRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* A unique string that identifies the request and that allows you to retry failed requests without the risk of
* running the operation twice. CreatorRequestId
can be any unique string, for example, a date/time
* stamp.
*
*/
private String creatorRequestId;
/**
*
* The unique identifier of the firewall rule group where you want to create the rule.
*
*/
private String firewallRuleGroupId;
/**
*
* The ID of the domain list that you want 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 and send metrics and logs to Cloud Watch.
*
*
* -
*
* BLOCK
- Disallow the request. This option requires additional details in the rule's
* BlockResponse
.
*
*
*
*/
private String action;
/**
*
* The way that you want DNS Firewall to block the request, used with 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.
*
*
*
*
* This setting is required if the rule action setting is 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
.
*
*
* This setting is required if the BlockResponse
setting is 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
.
*
*
* This setting is required if the BlockResponse
setting is 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
.
*
*
* This setting is required if the BlockResponse
setting is OVERRIDE
.
*
*/
private Integer blockOverrideTtl;
/**
*
* A name that lets you identify the rule in the rule group.
*
*/
private String name;
/**
*
* A unique string that identifies the request and that allows you to retry failed requests without the risk of
* running the operation twice. CreatorRequestId
can be any unique string, for example, a date/time
* stamp.
*
*
* @param creatorRequestId
* A unique string that identifies the request and that allows you to retry failed requests without the risk
* of running the operation twice. CreatorRequestId
can be any unique string, for example, a
* date/time stamp.
*/
public void setCreatorRequestId(String creatorRequestId) {
this.creatorRequestId = creatorRequestId;
}
/**
*
* A unique string that identifies the request and that allows you to retry failed requests without the risk of
* running the operation twice. CreatorRequestId
can be any unique string, for example, a date/time
* stamp.
*
*
* @return A unique string that identifies the request and that allows you to retry failed requests without the risk
* of running the operation twice. CreatorRequestId
can be any unique string, for example, a
* date/time stamp.
*/
public String getCreatorRequestId() {
return this.creatorRequestId;
}
/**
*
* A unique string that identifies the request and that allows you to retry failed requests without the risk of
* running the operation twice. CreatorRequestId
can be any unique string, for example, a date/time
* stamp.
*
*
* @param creatorRequestId
* A unique string that identifies the request and that allows you to retry failed requests without the risk
* of running the operation twice. CreatorRequestId
can be any unique string, for example, a
* date/time stamp.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateFirewallRuleRequest withCreatorRequestId(String creatorRequestId) {
setCreatorRequestId(creatorRequestId);
return this;
}
/**
*
* The unique identifier of the firewall rule group where you want to create the rule.
*
*
* @param firewallRuleGroupId
* The unique identifier of the firewall rule group where you want to create the rule.
*/
public void setFirewallRuleGroupId(String firewallRuleGroupId) {
this.firewallRuleGroupId = firewallRuleGroupId;
}
/**
*
* The unique identifier of the firewall rule group where you want to create the rule.
*
*
* @return The unique identifier of the firewall rule group where you want to create the rule.
*/
public String getFirewallRuleGroupId() {
return this.firewallRuleGroupId;
}
/**
*
* The unique identifier of the firewall rule group where you want to create the rule.
*
*
* @param firewallRuleGroupId
* The unique identifier of the firewall rule group where you want to create the rule.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateFirewallRuleRequest withFirewallRuleGroupId(String firewallRuleGroupId) {
setFirewallRuleGroupId(firewallRuleGroupId);
return this;
}
/**
*
* The ID of the domain list that you want to use in the rule.
*
*
* @param firewallDomainListId
* The ID of the domain list that you want to use in the rule.
*/
public void setFirewallDomainListId(String firewallDomainListId) {
this.firewallDomainListId = firewallDomainListId;
}
/**
*
* The ID of the domain list that you want to use in the rule.
*
*
* @return The ID of the domain list that you want to use in the rule.
*/
public String getFirewallDomainListId() {
return this.firewallDomainListId;
}
/**
*
* The ID of the domain list that you want to use in the rule.
*
*
* @param firewallDomainListId
* The ID of the domain list that you want to use in the rule.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateFirewallRuleRequest 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 CreateFirewallRuleRequest 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 and send metrics and logs to Cloud Watch.
*
*
* -
*
* BLOCK
- Disallow the request. This option requires additional details in the rule's
* BlockResponse
.
*
*
*
*
* @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:
*
* -
*
* ALLOW
- Permit the request to go through.
*
*
* -
*
* ALERT
- Permit the request and send metrics and logs to Cloud Watch.
*
*
* -
*
* BLOCK
- Disallow the request. This option requires additional details in the rule's
* BlockResponse
.
*
*
* @see Action
*/
public void setAction(String action) {
this.action = 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:
*
*
* -
*
* ALLOW
- Permit the request to go through.
*
*
* -
*
* ALERT
- Permit the request and send metrics and logs to Cloud Watch.
*
*
* -
*
* BLOCK
- Disallow the request. This option requires additional details in the rule's
* BlockResponse
.
*
*
*
*
* @return 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 and send metrics and logs to Cloud Watch.
*
*
* -
*
* BLOCK
- Disallow the request. This option requires additional details in the rule's
* BlockResponse
.
*
*
* @see Action
*/
public String getAction() {
return this.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:
*
*
* -
*
* ALLOW
- Permit the request to go through.
*
*
* -
*
* ALERT
- Permit the request and send metrics and logs to Cloud Watch.
*
*
* -
*
* BLOCK
- Disallow the request. This option requires additional details in the rule's
* BlockResponse
.
*
*
*
*
* @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:
*
* -
*
* ALLOW
- Permit the request to go through.
*
*
* -
*
* ALERT
- Permit the request and send metrics and logs to Cloud Watch.
*
*
* -
*
* BLOCK
- Disallow the request. This option requires additional details in the rule's
* BlockResponse
.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see Action
*/
public CreateFirewallRuleRequest withAction(String action) {
setAction(action);
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 and send metrics and logs to Cloud Watch.
*
*
* -
*
* BLOCK
- Disallow the request. This option requires additional details in the rule's
* BlockResponse
.
*
*
*
*
* @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:
*
* -
*
* ALLOW
- Permit the request to go through.
*
*
* -
*
* ALERT
- Permit the request and send metrics and logs to Cloud Watch.
*
*
* -
*
* BLOCK
- Disallow the request. This option requires additional details in the rule's
* BlockResponse
.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see Action
*/
public CreateFirewallRuleRequest withAction(Action action) {
this.action = action.toString();
return this;
}
/**
*
* The way that you want DNS Firewall to block the request, used with 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.
*
*
*
*
* This setting is required if the rule action setting is BLOCK
.
*
*
* @param blockResponse
* The way that you want DNS Firewall to block the request, used with 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.
*
*
*
*
* This setting is required if the rule action setting is BLOCK
.
* @see BlockResponse
*/
public void setBlockResponse(String blockResponse) {
this.blockResponse = blockResponse;
}
/**
*
* The way that you want DNS Firewall to block the request, used with 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.
*
*
*
*
* This setting is required if the rule action setting is BLOCK
.
*
*
* @return The way that you want DNS Firewall to block the request, used with 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.
*
*
*
*
* This setting is required if the rule action setting is BLOCK
.
* @see BlockResponse
*/
public String getBlockResponse() {
return this.blockResponse;
}
/**
*
* The way that you want DNS Firewall to block the request, used with 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.
*
*
*
*
* This setting is required if the rule action setting is BLOCK
.
*
*
* @param blockResponse
* The way that you want DNS Firewall to block the request, used with 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.
*
*
*
*
* This setting is required if the rule action setting is BLOCK
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see BlockResponse
*/
public CreateFirewallRuleRequest withBlockResponse(String blockResponse) {
setBlockResponse(blockResponse);
return this;
}
/**
*
* The way that you want DNS Firewall to block the request, used with 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.
*
*
*
*
* This setting is required if the rule action setting is BLOCK
.
*
*
* @param blockResponse
* The way that you want DNS Firewall to block the request, used with 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.
*
*
*
*
* This setting is required if the rule action setting is BLOCK
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see BlockResponse
*/
public CreateFirewallRuleRequest withBlockResponse(BlockResponse blockResponse) {
this.blockResponse = blockResponse.toString();
return this;
}
/**
*
* The custom DNS record to send back in response to the query. Used for the rule action BLOCK
with a
* BlockResponse
setting of OVERRIDE
.
*
*
* This setting is required if the BlockResponse
setting is OVERRIDE
.
*
*
* @param 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
.
*
* This setting is required if the BlockResponse
setting is 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
.
*
*
* This setting is required if the BlockResponse
setting is OVERRIDE
.
*
*
* @return The custom DNS record to send back in response to the query. Used for the rule action BLOCK
* with a BlockResponse
setting of OVERRIDE
.
*
* This setting is required if the BlockResponse
setting is 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
.
*
*
* This setting is required if the BlockResponse
setting is OVERRIDE
.
*
*
* @param 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
.
*
* This setting is required if the BlockResponse
setting is OVERRIDE
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateFirewallRuleRequest 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
.
*
*
* This setting is required if the BlockResponse
setting is OVERRIDE
.
*
*
* @param 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
.
*
* This setting is required if the BlockResponse
setting is 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
.
*
*
* This setting is required if the BlockResponse
setting is OVERRIDE
.
*
*
* @return 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
.
*
* This setting is required if the BlockResponse
setting is 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
.
*
*
* This setting is required if the BlockResponse
setting is OVERRIDE
.
*
*
* @param 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
.
*
* This setting is required if the BlockResponse
setting is OVERRIDE
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see BlockOverrideDnsType
*/
public CreateFirewallRuleRequest 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
.
*
*
* This setting is required if the BlockResponse
setting is OVERRIDE
.
*
*
* @param 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
.
*
* This setting is required if the BlockResponse
setting is OVERRIDE
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see BlockOverrideDnsType
*/
public CreateFirewallRuleRequest 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
.
*
*
* This setting is required if the BlockResponse
setting is OVERRIDE
.
*
*
* @param 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
.
*
* This setting is required if the BlockResponse
setting is 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
.
*
*
* This setting is required if the BlockResponse
setting is OVERRIDE
.
*
*
* @return 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
.
*
* This setting is required if the BlockResponse
setting is 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
.
*
*
* This setting is required if the BlockResponse
setting is OVERRIDE
.
*
*
* @param 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
.
*
* This setting is required if the BlockResponse
setting is OVERRIDE
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateFirewallRuleRequest withBlockOverrideTtl(Integer blockOverrideTtl) {
setBlockOverrideTtl(blockOverrideTtl);
return this;
}
/**
*
* A name that lets you identify the rule in the rule group.
*
*
* @param name
* A name that lets you identify the rule in the rule group.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* A name that lets you identify the rule in the rule group.
*
*
* @return A name that lets you identify the rule in the rule group.
*/
public String getName() {
return this.name;
}
/**
*
* A name that lets you identify the rule in the rule group.
*
*
* @param name
* A name that lets you identify the rule in the rule group.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateFirewallRuleRequest 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 (getCreatorRequestId() != null)
sb.append("CreatorRequestId: ").append(getCreatorRequestId()).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 CreateFirewallRuleRequest == false)
return false;
CreateFirewallRuleRequest other = (CreateFirewallRuleRequest) obj;
if (other.getCreatorRequestId() == null ^ this.getCreatorRequestId() == null)
return false;
if (other.getCreatorRequestId() != null && other.getCreatorRequestId().equals(this.getCreatorRequestId()) == false)
return false;
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 + ((getCreatorRequestId() == null) ? 0 : getCreatorRequestId().hashCode());
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 CreateFirewallRuleRequest clone() {
return (CreateFirewallRuleRequest) super.clone();
}
}