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

commonMain.aws.sdk.kotlin.services.elasticbeanstalk.model.UpdateTagsForResourceRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.elasticbeanstalk.model

import aws.smithy.kotlin.runtime.SdkDsl

public class UpdateTagsForResourceRequest private constructor(builder: Builder) {
    /**
     * The Amazon Resource Name (ARN) of the resouce to be updated.
     *
     * Must be the ARN of an Elastic Beanstalk resource.
     */
    public val resourceArn: kotlin.String? = builder.resourceArn
    /**
     * A list of tags to add or update. If a key of an existing tag is added, the tag's value is updated.
     *
     * Specify at least one of these parameters: `TagsToAdd`, `TagsToRemove`.
     */
    public val tagsToAdd: List? = builder.tagsToAdd
    /**
     * A list of tag keys to remove. If a tag key doesn't exist, it is silently ignored.
     *
     * Specify at least one of these parameters: `TagsToAdd`, `TagsToRemove`.
     */
    public val tagsToRemove: List? = builder.tagsToRemove

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

    override fun toString(): kotlin.String = buildString {
        append("UpdateTagsForResourceRequest(")
        append("resourceArn=$resourceArn,")
        append("tagsToAdd=$tagsToAdd,")
        append("tagsToRemove=$tagsToRemove")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = resourceArn?.hashCode() ?: 0
        result = 31 * result + (tagsToAdd?.hashCode() ?: 0)
        result = 31 * result + (tagsToRemove?.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 UpdateTagsForResourceRequest

        if (resourceArn != other.resourceArn) return false
        if (tagsToAdd != other.tagsToAdd) return false
        if (tagsToRemove != other.tagsToRemove) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The Amazon Resource Name (ARN) of the resouce to be updated.
         *
         * Must be the ARN of an Elastic Beanstalk resource.
         */
        public var resourceArn: kotlin.String? = null
        /**
         * A list of tags to add or update. If a key of an existing tag is added, the tag's value is updated.
         *
         * Specify at least one of these parameters: `TagsToAdd`, `TagsToRemove`.
         */
        public var tagsToAdd: List? = null
        /**
         * A list of tag keys to remove. If a tag key doesn't exist, it is silently ignored.
         *
         * Specify at least one of these parameters: `TagsToAdd`, `TagsToRemove`.
         */
        public var tagsToRemove: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.elasticbeanstalk.model.UpdateTagsForResourceRequest) : this() {
            this.resourceArn = x.resourceArn
            this.tagsToAdd = x.tagsToAdd
            this.tagsToRemove = x.tagsToRemove
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy