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

commonMain.aws.sdk.kotlin.services.athena.model.WorkGroupSummary.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.athena.model

import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant

/**
 * The summary information for the workgroup, which includes its name, state, description, and the date and time it was created.
 */
public class WorkGroupSummary private constructor(builder: Builder) {
    /**
     * The workgroup creation date and time.
     */
    public val creationTime: aws.smithy.kotlin.runtime.time.Instant? = builder.creationTime
    /**
     * The workgroup description.
     */
    public val description: kotlin.String? = builder.description
    /**
     * The engine version setting for all queries on the workgroup. Queries on the `AmazonAthenaPreviewFunctionality` workgroup run on the preview engine regardless of this setting.
     */
    public val engineVersion: aws.sdk.kotlin.services.athena.model.EngineVersion? = builder.engineVersion
    /**
     * The ARN of the IAM Identity Center enabled application associated with the workgroup.
     */
    public val identityCenterApplicationArn: kotlin.String? = builder.identityCenterApplicationArn
    /**
     * The name of the workgroup.
     */
    public val name: kotlin.String? = builder.name
    /**
     * The state of the workgroup.
     */
    public val state: aws.sdk.kotlin.services.athena.model.WorkGroupState? = builder.state

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

    override fun toString(): kotlin.String = buildString {
        append("WorkGroupSummary(")
        append("creationTime=$creationTime,")
        append("description=$description,")
        append("engineVersion=$engineVersion,")
        append("identityCenterApplicationArn=$identityCenterApplicationArn,")
        append("name=$name,")
        append("state=$state")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = creationTime?.hashCode() ?: 0
        result = 31 * result + (description?.hashCode() ?: 0)
        result = 31 * result + (engineVersion?.hashCode() ?: 0)
        result = 31 * result + (identityCenterApplicationArn?.hashCode() ?: 0)
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (state?.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 WorkGroupSummary

        if (creationTime != other.creationTime) return false
        if (description != other.description) return false
        if (engineVersion != other.engineVersion) return false
        if (identityCenterApplicationArn != other.identityCenterApplicationArn) return false
        if (name != other.name) return false
        if (state != other.state) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The workgroup creation date and time.
         */
        public var creationTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The workgroup description.
         */
        public var description: kotlin.String? = null
        /**
         * The engine version setting for all queries on the workgroup. Queries on the `AmazonAthenaPreviewFunctionality` workgroup run on the preview engine regardless of this setting.
         */
        public var engineVersion: aws.sdk.kotlin.services.athena.model.EngineVersion? = null
        /**
         * The ARN of the IAM Identity Center enabled application associated with the workgroup.
         */
        public var identityCenterApplicationArn: kotlin.String? = null
        /**
         * The name of the workgroup.
         */
        public var name: kotlin.String? = null
        /**
         * The state of the workgroup.
         */
        public var state: aws.sdk.kotlin.services.athena.model.WorkGroupState? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.athena.model.WorkGroupSummary) : this() {
            this.creationTime = x.creationTime
            this.description = x.description
            this.engineVersion = x.engineVersion
            this.identityCenterApplicationArn = x.identityCenterApplicationArn
            this.name = x.name
            this.state = x.state
        }

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy