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

commonMain.aws.sdk.kotlin.services.outposts.model.BlockingInstance.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.outposts.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * A running Amazon EC2 instance that can be stopped to free up capacity needed to run the capacity task.
 */
public class BlockingInstance private constructor(builder: Builder) {
    /**
     * The ID of the Amazon Web Services account.
     */
    public val accountId: kotlin.String? = builder.accountId
    /**
     * The Amazon Web Services service name that owns the specified blocking instance.
     */
    public val awsServiceName: aws.sdk.kotlin.services.outposts.model.AwsServiceName? = builder.awsServiceName
    /**
     * The ID of the blocking instance.
     */
    public val instanceId: kotlin.String? = builder.instanceId

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

    override fun toString(): kotlin.String = buildString {
        append("BlockingInstance(")
        append("accountId=$accountId,")
        append("awsServiceName=$awsServiceName,")
        append("instanceId=$instanceId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = accountId?.hashCode() ?: 0
        result = 31 * result + (awsServiceName?.hashCode() ?: 0)
        result = 31 * result + (instanceId?.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 BlockingInstance

        if (accountId != other.accountId) return false
        if (awsServiceName != other.awsServiceName) return false
        if (instanceId != other.instanceId) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The ID of the Amazon Web Services account.
         */
        public var accountId: kotlin.String? = null
        /**
         * The Amazon Web Services service name that owns the specified blocking instance.
         */
        public var awsServiceName: aws.sdk.kotlin.services.outposts.model.AwsServiceName? = null
        /**
         * The ID of the blocking instance.
         */
        public var instanceId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.outposts.model.BlockingInstance) : this() {
            this.accountId = x.accountId
            this.awsServiceName = x.awsServiceName
            this.instanceId = x.instanceId
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy