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

commonMain.aws.sdk.kotlin.services.iottwinmaker.model.GetWorkspaceResponse.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.iottwinmaker.model

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

public class GetWorkspaceResponse private constructor(builder: Builder) {
    /**
     * The ARN of the workspace.
     */
    public val arn: kotlin.String = requireNotNull(builder.arn) { "A non-null value must be provided for arn" }
    /**
     * The date and time when the workspace was created.
     */
    public val creationDateTime: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.creationDateTime) { "A non-null value must be provided for creationDateTime" }
    /**
     * The description of the workspace.
     */
    public val description: kotlin.String? = builder.description
    /**
     * A list of services that are linked to the workspace.
     */
    public val linkedServices: List? = builder.linkedServices
    /**
     * The ARN of the execution role associated with the workspace.
     */
    public val role: kotlin.String? = builder.role
    /**
     * The ARN of the S3 bucket where resources associated with the workspace are stored.
     */
    public val s3Location: kotlin.String? = builder.s3Location
    /**
     * The date and time when the workspace was last updated.
     */
    public val updateDateTime: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.updateDateTime) { "A non-null value must be provided for updateDateTime" }
    /**
     * The ID of the workspace.
     */
    public val workspaceId: kotlin.String = requireNotNull(builder.workspaceId) { "A non-null value must be provided for workspaceId" }

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

    override fun toString(): kotlin.String = buildString {
        append("GetWorkspaceResponse(")
        append("arn=$arn,")
        append("creationDateTime=$creationDateTime,")
        append("description=$description,")
        append("linkedServices=$linkedServices,")
        append("role=$role,")
        append("s3Location=$s3Location,")
        append("updateDateTime=$updateDateTime,")
        append("workspaceId=$workspaceId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = arn.hashCode()
        result = 31 * result + (creationDateTime.hashCode())
        result = 31 * result + (description?.hashCode() ?: 0)
        result = 31 * result + (linkedServices?.hashCode() ?: 0)
        result = 31 * result + (role?.hashCode() ?: 0)
        result = 31 * result + (s3Location?.hashCode() ?: 0)
        result = 31 * result + (updateDateTime.hashCode())
        result = 31 * result + (workspaceId.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 GetWorkspaceResponse

        if (arn != other.arn) return false
        if (creationDateTime != other.creationDateTime) return false
        if (description != other.description) return false
        if (linkedServices != other.linkedServices) return false
        if (role != other.role) return false
        if (s3Location != other.s3Location) return false
        if (updateDateTime != other.updateDateTime) return false
        if (workspaceId != other.workspaceId) return false

        return true
    }

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

    public class Builder {
        /**
         * The ARN of the workspace.
         */
        public var arn: kotlin.String? = null
        /**
         * The date and time when the workspace was created.
         */
        public var creationDateTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The description of the workspace.
         */
        public var description: kotlin.String? = null
        /**
         * A list of services that are linked to the workspace.
         */
        public var linkedServices: List? = null
        /**
         * The ARN of the execution role associated with the workspace.
         */
        public var role: kotlin.String? = null
        /**
         * The ARN of the S3 bucket where resources associated with the workspace are stored.
         */
        public var s3Location: kotlin.String? = null
        /**
         * The date and time when the workspace was last updated.
         */
        public var updateDateTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The ID of the workspace.
         */
        public var workspaceId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iottwinmaker.model.GetWorkspaceResponse) : this() {
            this.arn = x.arn
            this.creationDateTime = x.creationDateTime
            this.description = x.description
            this.linkedServices = x.linkedServices
            this.role = x.role
            this.s3Location = x.s3Location
            this.updateDateTime = x.updateDateTime
            this.workspaceId = x.workspaceId
        }

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

        internal fun correctErrors(): Builder {
            if (arn == null) arn = ""
            if (creationDateTime == null) creationDateTime = Instant.fromEpochSeconds(0)
            if (updateDateTime == null) updateDateTime = Instant.fromEpochSeconds(0)
            if (workspaceId == null) workspaceId = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy