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

commonMain.aws.sdk.kotlin.services.route53resolver.model.AssociateResolverRuleRequest.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.route53resolver.model



public class AssociateResolverRuleRequest private constructor(builder: Builder) {
    /**
     * A name for the association that you're creating between a Resolver rule and a VPC.
     */
    public val name: kotlin.String? = builder.name
    /**
     * The ID of the Resolver rule that you want to associate with the VPC. To list the existing Resolver rules, use [ListResolverRules](https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverRules.html).
     */
    public val resolverRuleId: kotlin.String? = builder.resolverRuleId
    /**
     * The ID of the VPC that you want to associate the Resolver rule with.
     */
    public val vpcId: kotlin.String? = builder.vpcId

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

    override fun toString(): kotlin.String = buildString {
        append("AssociateResolverRuleRequest(")
        append("name=$name,")
        append("resolverRuleId=$resolverRuleId,")
        append("vpcId=$vpcId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = name?.hashCode() ?: 0
        result = 31 * result + (resolverRuleId?.hashCode() ?: 0)
        result = 31 * result + (vpcId?.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 AssociateResolverRuleRequest

        if (name != other.name) return false
        if (resolverRuleId != other.resolverRuleId) return false
        if (vpcId != other.vpcId) return false

        return true
    }

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

    public class Builder {
        /**
         * A name for the association that you're creating between a Resolver rule and a VPC.
         */
        public var name: kotlin.String? = null
        /**
         * The ID of the Resolver rule that you want to associate with the VPC. To list the existing Resolver rules, use [ListResolverRules](https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverRules.html).
         */
        public var resolverRuleId: kotlin.String? = null
        /**
         * The ID of the VPC that you want to associate the Resolver rule with.
         */
        public var vpcId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.route53resolver.model.AssociateResolverRuleRequest) : this() {
            this.name = x.name
            this.resolverRuleId = x.resolverRuleId
            this.vpcId = x.vpcId
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy