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

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

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

package aws.sdk.kotlin.services.iot1clickprojects.model

import aws.smithy.kotlin.runtime.SdkDsl

public class CreateProjectRequest private constructor(builder: Builder) {
    /**
     * An optional description for the project.
     */
    public val description: kotlin.String? = builder.description
    /**
     * The schema defining the placement to be created. A placement template defines placement default attributes and device templates. You cannot add or remove device templates after the project has been created. However, you can update `callbackOverrides` for the device templates using the `UpdateProject` API.
     */
    public val placementTemplate: aws.sdk.kotlin.services.iot1clickprojects.model.PlacementTemplate? = builder.placementTemplate
    /**
     * The name of the project to create.
     */
    public val projectName: kotlin.String? = builder.projectName
    /**
     * Optional tags (metadata key/value pairs) to be associated with the project. For example, `{ {"key1": "value1", "key2": "value2"} }`. For more information, see [AWS Tagging Strategies](https://aws.amazon.com/answers/account-management/aws-tagging-strategies/).
     */
    public val tags: Map? = builder.tags

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

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

    override fun hashCode(): kotlin.Int {
        var result = description?.hashCode() ?: 0
        result = 31 * result + (placementTemplate?.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 (description != other.description) return false
        if (placementTemplate != other.placementTemplate) 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.iot1clickprojects.model.CreateProjectRequest = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * An optional description for the project.
         */
        public var description: kotlin.String? = null
        /**
         * The schema defining the placement to be created. A placement template defines placement default attributes and device templates. You cannot add or remove device templates after the project has been created. However, you can update `callbackOverrides` for the device templates using the `UpdateProject` API.
         */
        public var placementTemplate: aws.sdk.kotlin.services.iot1clickprojects.model.PlacementTemplate? = null
        /**
         * The name of the project to create.
         */
        public var projectName: kotlin.String? = null
        /**
         * Optional tags (metadata key/value pairs) to be associated with the project. For example, `{ {"key1": "value1", "key2": "value2"} }`. For more information, see [AWS Tagging Strategies](https://aws.amazon.com/answers/account-management/aws-tagging-strategies/).
         */
        public var tags: Map? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iot1clickprojects.model.CreateProjectRequest) : this() {
            this.description = x.description
            this.placementTemplate = x.placementTemplate
            this.projectName = x.projectName
            this.tags = x.tags
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.iot1clickprojects.model.PlacementTemplate] inside the given [block]
         */
        public fun placementTemplate(block: aws.sdk.kotlin.services.iot1clickprojects.model.PlacementTemplate.Builder.() -> kotlin.Unit) {
            this.placementTemplate = aws.sdk.kotlin.services.iot1clickprojects.model.PlacementTemplate.invoke(block)
        }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy