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

commonMain.aws.sdk.kotlin.services.elasticloadbalancingv2.model.CreateRuleRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.elasticloadbalancingv2.model

import aws.smithy.kotlin.runtime.SdkDsl

public class CreateRuleRequest private constructor(builder: Builder) {
    /**
     * The actions.
     */
    public val actions: List? = builder.actions
    /**
     * The conditions.
     */
    public val conditions: List? = builder.conditions
    /**
     * The Amazon Resource Name (ARN) of the listener.
     */
    public val listenerArn: kotlin.String? = builder.listenerArn
    /**
     * The rule priority. A listener can't have multiple rules with the same priority.
     */
    public val priority: kotlin.Int? = builder.priority
    /**
     * The tags to assign to the rule.
     */
    public val tags: List? = builder.tags

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

    override fun toString(): kotlin.String = buildString {
        append("CreateRuleRequest(")
        append("actions=$actions,")
        append("conditions=$conditions,")
        append("listenerArn=$listenerArn,")
        append("priority=$priority,")
        append("tags=$tags")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = actions?.hashCode() ?: 0
        result = 31 * result + (conditions?.hashCode() ?: 0)
        result = 31 * result + (listenerArn?.hashCode() ?: 0)
        result = 31 * result + (priority ?: 0)
        result = 31 * result + (tags?.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 CreateRuleRequest

        if (actions != other.actions) return false
        if (conditions != other.conditions) return false
        if (listenerArn != other.listenerArn) return false
        if (priority != other.priority) return false
        if (tags != other.tags) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The actions.
         */
        public var actions: List? = null
        /**
         * The conditions.
         */
        public var conditions: List? = null
        /**
         * The Amazon Resource Name (ARN) of the listener.
         */
        public var listenerArn: kotlin.String? = null
        /**
         * The rule priority. A listener can't have multiple rules with the same priority.
         */
        public var priority: kotlin.Int? = null
        /**
         * The tags to assign to the rule.
         */
        public var tags: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.elasticloadbalancingv2.model.CreateRuleRequest) : this() {
            this.actions = x.actions
            this.conditions = x.conditions
            this.listenerArn = x.listenerArn
            this.priority = x.priority
            this.tags = x.tags
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy