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

commonMain.aws.sdk.kotlin.services.iotsitewise.model.CreateProjectRequest.kt Maven / Gradle / Ivy

There is a newer version: 1.3.99
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.iotsitewise.model

import aws.smithy.kotlin.runtime.SdkDsl

public class CreateProjectRequest private constructor(builder: Builder) {
    /**
     * A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.
     */
    public val clientToken: kotlin.String? = builder.clientToken
    /**
     * The ID of the portal in which to create the project.
     */
    public val portalId: kotlin.String? = builder.portalId
    /**
     * A description for the project.
     */
    public val projectDescription: kotlin.String? = builder.projectDescription
    /**
     * A friendly name for the project.
     */
    public val projectName: kotlin.String? = builder.projectName
    /**
     * A list of key-value pairs that contain metadata for the project. For more information, see [Tagging your IoT SiteWise resources](https://docs.aws.amazon.com/iot-sitewise/latest/userguide/tag-resources.html) in the *IoT SiteWise User Guide*.
     */
    public val tags: Map? = builder.tags

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

    override fun toString(): kotlin.String = buildString {
        append("CreateProjectRequest(")
        append("clientToken=$clientToken,")
        append("portalId=$portalId,")
        append("projectDescription=$projectDescription,")
        append("projectName=$projectName,")
        append("tags=$tags")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = clientToken?.hashCode() ?: 0
        result = 31 * result + (portalId?.hashCode() ?: 0)
        result = 31 * result + (projectDescription?.hashCode() ?: 0)
        result = 31 * result + (projectName?.hashCode() ?: 0)
        result = 31 * result + (tags?.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 CreateProjectRequest

        if (clientToken != other.clientToken) return false
        if (portalId != other.portalId) return false
        if (projectDescription != other.projectDescription) return false
        if (projectName != other.projectName) return false
        if (tags != other.tags) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.
         */
        public var clientToken: kotlin.String? = null
        /**
         * The ID of the portal in which to create the project.
         */
        public var portalId: kotlin.String? = null
        /**
         * A description for the project.
         */
        public var projectDescription: kotlin.String? = null
        /**
         * A friendly name for the project.
         */
        public var projectName: kotlin.String? = null
        /**
         * A list of key-value pairs that contain metadata for the project. For more information, see [Tagging your IoT SiteWise resources](https://docs.aws.amazon.com/iot-sitewise/latest/userguide/tag-resources.html) in the *IoT SiteWise User Guide*.
         */
        public var tags: Map? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iotsitewise.model.CreateProjectRequest) : this() {
            this.clientToken = x.clientToken
            this.portalId = x.portalId
            this.projectDescription = x.projectDescription
            this.projectName = x.projectName
            this.tags = x.tags
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy