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

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

/**
 * Contains metadata for notebook, including the notebook name, ID, workgroup, and time created.
 */
public class NotebookMetadata private constructor(builder: Builder) {
    /**
     * The time when the notebook was created.
     */
    public val creationTime: aws.smithy.kotlin.runtime.time.Instant? = builder.creationTime
    /**
     * The time when the notebook was last modified.
     */
    public val lastModifiedTime: aws.smithy.kotlin.runtime.time.Instant? = builder.lastModifiedTime
    /**
     * The name of the notebook.
     */
    public val name: kotlin.String? = builder.name
    /**
     * The notebook ID.
     */
    public val notebookId: kotlin.String? = builder.notebookId
    /**
     * The type of notebook. Currently, the only valid type is `IPYNB`.
     */
    public val type: aws.sdk.kotlin.services.athena.model.NotebookType? = builder.type
    /**
     * The name of the Spark enabled workgroup to which the notebook belongs.
     */
    public val workGroup: kotlin.String? = builder.workGroup

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

    override fun toString(): kotlin.String = buildString {
        append("NotebookMetadata(")
        append("creationTime=$creationTime,")
        append("lastModifiedTime=$lastModifiedTime,")
        append("name=$name,")
        append("notebookId=$notebookId,")
        append("type=$type,")
        append("workGroup=$workGroup")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = creationTime?.hashCode() ?: 0
        result = 31 * result + (lastModifiedTime?.hashCode() ?: 0)
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (notebookId?.hashCode() ?: 0)
        result = 31 * result + (type?.hashCode() ?: 0)
        result = 31 * result + (workGroup?.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 NotebookMetadata

        if (creationTime != other.creationTime) return false
        if (lastModifiedTime != other.lastModifiedTime) return false
        if (name != other.name) return false
        if (notebookId != other.notebookId) return false
        if (type != other.type) return false
        if (workGroup != other.workGroup) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The time when the notebook was created.
         */
        public var creationTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The time when the notebook was last modified.
         */
        public var lastModifiedTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The name of the notebook.
         */
        public var name: kotlin.String? = null
        /**
         * The notebook ID.
         */
        public var notebookId: kotlin.String? = null
        /**
         * The type of notebook. Currently, the only valid type is `IPYNB`.
         */
        public var type: aws.sdk.kotlin.services.athena.model.NotebookType? = null
        /**
         * The name of the Spark enabled workgroup to which the notebook belongs.
         */
        public var workGroup: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.athena.model.NotebookMetadata) : this() {
            this.creationTime = x.creationTime
            this.lastModifiedTime = x.lastModifiedTime
            this.name = x.name
            this.notebookId = x.notebookId
            this.type = x.type
            this.workGroup = x.workGroup
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy