commonMain.aws.sdk.kotlin.services.wafv2.model.AssociateWebAclRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of wafv2-jvm Show documentation
Show all versions of wafv2-jvm Show documentation
The AWS Kotlin client for WAFV2
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.wafv2.model
import aws.smithy.kotlin.runtime.SdkDsl
public class AssociateWebAclRequest private constructor(builder: Builder) {
/**
* The Amazon Resource Name (ARN) of the resource to associate with the web ACL.
*
* The ARN must be in one of the following formats:
* + For an Application Load Balancer: `arn:partition:elasticloadbalancing:region:account-id:loadbalancer/app/load-balancer-name/load-balancer-id `
* + For an Amazon API Gateway REST API: `arn:partition:apigateway:region::/restapis/api-id/stages/stage-name `
* + For an AppSync GraphQL API: `arn:partition:appsync:region:account-id:apis/GraphQLApiId `
* + For an Amazon Cognito user pool: `arn:partition:cognito-idp:region:account-id:userpool/user-pool-id `
* + For an App Runner service: `arn:partition:apprunner:region:account-id:service/apprunner-service-name/apprunner-service-id `
* + For an Amazon Web Services Verified Access instance: `arn:partition:ec2:region:account-id:verified-access-instance/instance-id `
*/
public val resourceArn: kotlin.String? = builder.resourceArn
/**
* The Amazon Resource Name (ARN) of the web ACL that you want to associate with the resource.
*/
public val webAclArn: kotlin.String? = builder.webAclArn
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.wafv2.model.AssociateWebAclRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AssociateWebAclRequest(")
append("resourceArn=$resourceArn,")
append("webAclArn=$webAclArn")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = resourceArn?.hashCode() ?: 0
result = 31 * result + (webAclArn?.hashCode() ?: 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 AssociateWebAclRequest
if (resourceArn != other.resourceArn) return false
if (webAclArn != other.webAclArn) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.wafv2.model.AssociateWebAclRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Amazon Resource Name (ARN) of the resource to associate with the web ACL.
*
* The ARN must be in one of the following formats:
* + For an Application Load Balancer: `arn:partition:elasticloadbalancing:region:account-id:loadbalancer/app/load-balancer-name/load-balancer-id `
* + For an Amazon API Gateway REST API: `arn:partition:apigateway:region::/restapis/api-id/stages/stage-name `
* + For an AppSync GraphQL API: `arn:partition:appsync:region:account-id:apis/GraphQLApiId `
* + For an Amazon Cognito user pool: `arn:partition:cognito-idp:region:account-id:userpool/user-pool-id `
* + For an App Runner service: `arn:partition:apprunner:region:account-id:service/apprunner-service-name/apprunner-service-id `
* + For an Amazon Web Services Verified Access instance: `arn:partition:ec2:region:account-id:verified-access-instance/instance-id `
*/
public var resourceArn: kotlin.String? = null
/**
* The Amazon Resource Name (ARN) of the web ACL that you want to associate with the resource.
*/
public var webAclArn: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.wafv2.model.AssociateWebAclRequest) : this() {
this.resourceArn = x.resourceArn
this.webAclArn = x.webAclArn
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.wafv2.model.AssociateWebAclRequest = AssociateWebAclRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy