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

commonMain.aws.sdk.kotlin.services.emr.model.GetClusterSessionCredentialsResponse.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.emr.model

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

public class GetClusterSessionCredentialsResponse private constructor(builder: Builder) {
    /**
     * The credentials that you can use to connect to cluster endpoints that support username and password authentication.
     */
    public val credentials: aws.sdk.kotlin.services.emr.model.Credentials? = builder.credentials
    /**
     * The time when the credentials that are returned by the `GetClusterSessionCredentials` API expire.
     */
    public val expiresAt: aws.smithy.kotlin.runtime.time.Instant? = builder.expiresAt

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

    override fun toString(): kotlin.String = buildString {
        append("GetClusterSessionCredentialsResponse(")
        append("credentials=$credentials,")
        append("expiresAt=$expiresAt")
        append(")")
    }

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

        if (credentials != other.credentials) return false
        if (expiresAt != other.expiresAt) return false

        return true
    }

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

    public class Builder {
        /**
         * The credentials that you can use to connect to cluster endpoints that support username and password authentication.
         */
        public var credentials: aws.sdk.kotlin.services.emr.model.Credentials? = null
        /**
         * The time when the credentials that are returned by the `GetClusterSessionCredentials` API expire.
         */
        public var expiresAt: aws.smithy.kotlin.runtime.time.Instant? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.emr.model.GetClusterSessionCredentialsResponse) : this() {
            this.credentials = x.credentials
            this.expiresAt = x.expiresAt
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.emr.model.GetClusterSessionCredentialsResponse = GetClusterSessionCredentialsResponse(this)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy