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

commonMain.aws.sdk.kotlin.services.iotfleetwise.model.CreateFleetRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.iotfleetwise.model

import aws.smithy.kotlin.runtime.SdkDsl

public class CreateFleetRequest private constructor(builder: Builder) {
    /**
     * A brief description of the fleet to create.
     */
    public val description: kotlin.String? = builder.description
    /**
     * The unique ID of the fleet to create.
     */
    public val fleetId: kotlin.String = requireNotNull(builder.fleetId) { "A non-null value must be provided for fleetId" }
    /**
     * The Amazon Resource Name (ARN) of a signal catalog.
     */
    public val signalCatalogArn: kotlin.String = requireNotNull(builder.signalCatalogArn) { "A non-null value must be provided for signalCatalogArn" }
    /**
     * Metadata that can be used to manage the fleet.
     */
    public val tags: List? = builder.tags

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

    override fun toString(): kotlin.String = buildString {
        append("CreateFleetRequest(")
        append("description=$description,")
        append("fleetId=$fleetId,")
        append("signalCatalogArn=$signalCatalogArn,")
        append("tags=$tags")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = description?.hashCode() ?: 0
        result = 31 * result + (fleetId.hashCode())
        result = 31 * result + (signalCatalogArn.hashCode())
        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 CreateFleetRequest

        if (description != other.description) return false
        if (fleetId != other.fleetId) return false
        if (signalCatalogArn != other.signalCatalogArn) return false
        if (tags != other.tags) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A brief description of the fleet to create.
         */
        public var description: kotlin.String? = null
        /**
         * The unique ID of the fleet to create.
         */
        public var fleetId: kotlin.String? = null
        /**
         * The Amazon Resource Name (ARN) of a signal catalog.
         */
        public var signalCatalogArn: kotlin.String? = null
        /**
         * Metadata that can be used to manage the fleet.
         */
        public var tags: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iotfleetwise.model.CreateFleetRequest) : this() {
            this.description = x.description
            this.fleetId = x.fleetId
            this.signalCatalogArn = x.signalCatalogArn
            this.tags = x.tags
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy