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

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

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

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



public class CreateWorkspaceRequest private constructor(builder: Builder) {
    /**
     * The description of the workspace.
     */
    public val description: kotlin.String? = builder.description
    /**
     * 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
    /**
     * Metadata that you can use to manage the workspace
     */
    public val tags: Map? = builder.tags
    /**
     * 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.CreateWorkspaceRequest = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("CreateWorkspaceRequest(")
        append("description=$description,")
        append("role=$role,")
        append("s3Location=$s3Location,")
        append("tags=$tags,")
        append("workspaceId=$workspaceId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = description?.hashCode() ?: 0
        result = 31 * result + (role?.hashCode() ?: 0)
        result = 31 * result + (s3Location?.hashCode() ?: 0)
        result = 31 * result + (tags?.hashCode() ?: 0)
        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 CreateWorkspaceRequest

        if (description != other.description) return false
        if (role != other.role) return false
        if (s3Location != other.s3Location) return false
        if (tags != other.tags) return false
        if (workspaceId != other.workspaceId) return false

        return true
    }

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

    public class Builder {
        /**
         * The description of the workspace.
         */
        public var description: kotlin.String? = 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
        /**
         * Metadata that you can use to manage the workspace
         */
        public var tags: Map? = 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.CreateWorkspaceRequest) : this() {
            this.description = x.description
            this.role = x.role
            this.s3Location = x.s3Location
            this.tags = x.tags
            this.workspaceId = x.workspaceId
        }

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

        internal fun correctErrors(): Builder {
            if (workspaceId == null) workspaceId = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy