All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.securityhub.model.AwsEc2NetworkAclAssociation.kt Maven / Gradle / Ivy

There is a newer version: 1.3.35
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.securityhub.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * An association between the network ACL and a subnet.
 */
public class AwsEc2NetworkAclAssociation private constructor(builder: Builder) {
    /**
     * The identifier of the association between the network ACL and the subnet.
     */
    public val networkAclAssociationId: kotlin.String? = builder.networkAclAssociationId
    /**
     * The identifier of the network ACL.
     */
    public val networkAclId: kotlin.String? = builder.networkAclId
    /**
     * The identifier of the subnet that is associated with the network ACL.
     */
    public val subnetId: kotlin.String? = builder.subnetId

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.securityhub.model.AwsEc2NetworkAclAssociation = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("AwsEc2NetworkAclAssociation(")
        append("networkAclAssociationId=$networkAclAssociationId,")
        append("networkAclId=$networkAclId,")
        append("subnetId=$subnetId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = networkAclAssociationId?.hashCode() ?: 0
        result = 31 * result + (networkAclId?.hashCode() ?: 0)
        result = 31 * result + (subnetId?.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 AwsEc2NetworkAclAssociation

        if (networkAclAssociationId != other.networkAclAssociationId) return false
        if (networkAclId != other.networkAclId) return false
        if (subnetId != other.subnetId) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.securityhub.model.AwsEc2NetworkAclAssociation = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The identifier of the association between the network ACL and the subnet.
         */
        public var networkAclAssociationId: kotlin.String? = null
        /**
         * The identifier of the network ACL.
         */
        public var networkAclId: kotlin.String? = null
        /**
         * The identifier of the subnet that is associated with the network ACL.
         */
        public var subnetId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.securityhub.model.AwsEc2NetworkAclAssociation) : this() {
            this.networkAclAssociationId = x.networkAclAssociationId
            this.networkAclId = x.networkAclId
            this.subnetId = x.subnetId
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.securityhub.model.AwsEc2NetworkAclAssociation = AwsEc2NetworkAclAssociation(this)

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy