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

commonMain.aws.sdk.kotlin.services.devopsguru.model.UpdateResourceCollectionRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.devopsguru.model

import aws.smithy.kotlin.runtime.SdkDsl

public class UpdateResourceCollectionRequest private constructor(builder: Builder) {
    /**
     * Specifies if the resource collection in the request is added or deleted to the resource collection.
     */
    public val action: aws.sdk.kotlin.services.devopsguru.model.UpdateResourceCollectionAction? = builder.action
    /**
     * Contains information used to update a collection of Amazon Web Services resources.
     */
    public val resourceCollection: aws.sdk.kotlin.services.devopsguru.model.UpdateResourceCollectionFilter? = builder.resourceCollection

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

    override fun toString(): kotlin.String = buildString {
        append("UpdateResourceCollectionRequest(")
        append("action=$action,")
        append("resourceCollection=$resourceCollection")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = action?.hashCode() ?: 0
        result = 31 * result + (resourceCollection?.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 UpdateResourceCollectionRequest

        if (action != other.action) return false
        if (resourceCollection != other.resourceCollection) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Specifies if the resource collection in the request is added or deleted to the resource collection.
         */
        public var action: aws.sdk.kotlin.services.devopsguru.model.UpdateResourceCollectionAction? = null
        /**
         * Contains information used to update a collection of Amazon Web Services resources.
         */
        public var resourceCollection: aws.sdk.kotlin.services.devopsguru.model.UpdateResourceCollectionFilter? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.devopsguru.model.UpdateResourceCollectionRequest) : this() {
            this.action = x.action
            this.resourceCollection = x.resourceCollection
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.devopsguru.model.UpdateResourceCollectionFilter] inside the given [block]
         */
        public fun resourceCollection(block: aws.sdk.kotlin.services.devopsguru.model.UpdateResourceCollectionFilter.Builder.() -> kotlin.Unit) {
            this.resourceCollection = aws.sdk.kotlin.services.devopsguru.model.UpdateResourceCollectionFilter.invoke(block)
        }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy