
commonMain.aws.sdk.kotlin.services.route53resolver.model.UpdateFirewallRuleRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.route53resolver.model
public class UpdateFirewallRuleRequest private constructor(builder: Builder) {
/**
* 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`.
*/
public val action: aws.sdk.kotlin.services.route53resolver.model.Action? = builder.action
/**
* 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`.
*/
public val blockOverrideDnsType: aws.sdk.kotlin.services.route53resolver.model.BlockOverrideDnsType? = builder.blockOverrideDnsType
/**
* The custom DNS record to send back in response to the query. Used for the rule action `BLOCK` with a `BlockResponse` setting of `OVERRIDE`.
*/
public val blockOverrideDomain: kotlin.String? = builder.blockOverrideDomain
/**
* 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`.
*/
public val blockOverrideTtl: kotlin.Int? = builder.blockOverrideTtl
/**
* 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.
*/
public val blockResponse: aws.sdk.kotlin.services.route53resolver.model.BlockResponse? = builder.blockResponse
/**
* The ID of the domain list to use in the rule.
*/
public val firewallDomainListId: kotlin.String? = builder.firewallDomainListId
/**
* The unique identifier of the firewall rule group for the rule.
*/
public val firewallRuleGroupId: kotlin.String? = builder.firewallRuleGroupId
/**
* The name of the rule.
*/
public val name: kotlin.String? = builder.name
/**
* 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 val priority: kotlin.Int? = builder.priority
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.route53resolver.model.UpdateFirewallRuleRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateFirewallRuleRequest(")
append("action=$action,")
append("blockOverrideDnsType=$blockOverrideDnsType,")
append("blockOverrideDomain=$blockOverrideDomain,")
append("blockOverrideTtl=$blockOverrideTtl,")
append("blockResponse=$blockResponse,")
append("firewallDomainListId=$firewallDomainListId,")
append("firewallRuleGroupId=$firewallRuleGroupId,")
append("name=$name,")
append("priority=$priority")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = action?.hashCode() ?: 0
result = 31 * result + (blockOverrideDnsType?.hashCode() ?: 0)
result = 31 * result + (blockOverrideDomain?.hashCode() ?: 0)
result = 31 * result + (blockOverrideTtl ?: 0)
result = 31 * result + (blockResponse?.hashCode() ?: 0)
result = 31 * result + (firewallDomainListId?.hashCode() ?: 0)
result = 31 * result + (firewallRuleGroupId?.hashCode() ?: 0)
result = 31 * result + (name?.hashCode() ?: 0)
result = 31 * result + (priority ?: 0)
return result
}
override fun equals(other: kotlin.Any?): kotlin.Boolean {
if (this === other) return true
if (other == null || this::class != other::class) return false
other as UpdateFirewallRuleRequest
if (action != other.action) return false
if (blockOverrideDnsType != other.blockOverrideDnsType) return false
if (blockOverrideDomain != other.blockOverrideDomain) return false
if (blockOverrideTtl != other.blockOverrideTtl) return false
if (blockResponse != other.blockResponse) return false
if (firewallDomainListId != other.firewallDomainListId) return false
if (firewallRuleGroupId != other.firewallRuleGroupId) return false
if (name != other.name) return false
if (priority != other.priority) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.route53resolver.model.UpdateFirewallRuleRequest = Builder(this).apply(block).build()
public class Builder {
/**
* 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`.
*/
public var action: aws.sdk.kotlin.services.route53resolver.model.Action? = null
/**
* 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`.
*/
public var blockOverrideDnsType: aws.sdk.kotlin.services.route53resolver.model.BlockOverrideDnsType? = null
/**
* The custom DNS record to send back in response to the query. Used for the rule action `BLOCK` with a `BlockResponse` setting of `OVERRIDE`.
*/
public var blockOverrideDomain: kotlin.String? = null
/**
* 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`.
*/
public var blockOverrideTtl: kotlin.Int? = null
/**
* 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.
*/
public var blockResponse: aws.sdk.kotlin.services.route53resolver.model.BlockResponse? = null
/**
* The ID of the domain list to use in the rule.
*/
public var firewallDomainListId: kotlin.String? = null
/**
* The unique identifier of the firewall rule group for the rule.
*/
public var firewallRuleGroupId: kotlin.String? = null
/**
* The name of the rule.
*/
public var name: kotlin.String? = null
/**
* 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 var priority: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.route53resolver.model.UpdateFirewallRuleRequest) : this() {
this.action = x.action
this.blockOverrideDnsType = x.blockOverrideDnsType
this.blockOverrideDomain = x.blockOverrideDomain
this.blockOverrideTtl = x.blockOverrideTtl
this.blockResponse = x.blockResponse
this.firewallDomainListId = x.firewallDomainListId
this.firewallRuleGroupId = x.firewallRuleGroupId
this.name = x.name
this.priority = x.priority
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.route53resolver.model.UpdateFirewallRuleRequest = UpdateFirewallRuleRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy