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

commonMain.aws.sdk.kotlin.services.athena.model.CreatePresignedNotebookUrlResponse.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

public class CreatePresignedNotebookUrlResponse private constructor(builder: Builder) {
    /**
     * The authentication token for the notebook.
     */
    public val authToken: kotlin.String = requireNotNull(builder.authToken) { "A non-null value must be provided for authToken" }
    /**
     * The UTC epoch time when the authentication token expires.
     */
    public val authTokenExpirationTime: kotlin.Long = requireNotNull(builder.authTokenExpirationTime) { "A non-null value must be provided for authTokenExpirationTime" }
    /**
     * The URL of the notebook. The URL includes the authentication token and notebook file name and points directly to the opened notebook.
     */
    public val notebookUrl: kotlin.String = requireNotNull(builder.notebookUrl) { "A non-null value must be provided for notebookUrl" }

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

    override fun toString(): kotlin.String = buildString {
        append("CreatePresignedNotebookUrlResponse(")
        append("authToken=$authToken,")
        append("authTokenExpirationTime=$authTokenExpirationTime,")
        append("notebookUrl=$notebookUrl")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = authToken.hashCode()
        result = 31 * result + (authTokenExpirationTime.hashCode())
        result = 31 * result + (notebookUrl.hashCode())
        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 CreatePresignedNotebookUrlResponse

        if (authToken != other.authToken) return false
        if (authTokenExpirationTime != other.authTokenExpirationTime) return false
        if (notebookUrl != other.notebookUrl) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The authentication token for the notebook.
         */
        public var authToken: kotlin.String? = null
        /**
         * The UTC epoch time when the authentication token expires.
         */
        public var authTokenExpirationTime: kotlin.Long? = null
        /**
         * The URL of the notebook. The URL includes the authentication token and notebook file name and points directly to the opened notebook.
         */
        public var notebookUrl: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.athena.model.CreatePresignedNotebookUrlResponse) : this() {
            this.authToken = x.authToken
            this.authTokenExpirationTime = x.authTokenExpirationTime
            this.notebookUrl = x.notebookUrl
        }

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

        internal fun correctErrors(): Builder {
            if (authToken == null) authToken = ""
            if (authTokenExpirationTime == null) authTokenExpirationTime = 0L
            if (notebookUrl == null) notebookUrl = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy