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

commonMain.aws.sdk.kotlin.services.iotfleetwise.model.CreateVehicleRequest.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 CreateVehicleRequest private constructor(builder: Builder) {
    /**
     * An option to create a new Amazon Web Services IoT thing when creating a vehicle, or to validate an existing Amazon Web Services IoT thing as a vehicle.
     *
     * Default: ``
     */
    public val associationBehavior: aws.sdk.kotlin.services.iotfleetwise.model.VehicleAssociationBehavior? = builder.associationBehavior
    /**
     * Static information about a vehicle in a key-value pair. For example: `"engineType"` : `"1.3 L R2"`
     *
     * A campaign must include the keys (attribute names) in `dataExtraDimensions` for them to display in Amazon Timestream.
     */
    public val attributes: Map? = builder.attributes
    /**
     * The ARN of a decoder manifest.
     */
    public val decoderManifestArn: kotlin.String = requireNotNull(builder.decoderManifestArn) { "A non-null value must be provided for decoderManifestArn" }
    /**
     * The Amazon Resource Name ARN of a vehicle model.
     */
    public val modelManifestArn: kotlin.String = requireNotNull(builder.modelManifestArn) { "A non-null value must be provided for modelManifestArn" }
    /**
     * Metadata that can be used to manage the vehicle.
     */
    public val tags: List? = builder.tags
    /**
     * The unique ID of the vehicle to create.
     */
    public val vehicleName: kotlin.String = requireNotNull(builder.vehicleName) { "A non-null value must be provided for vehicleName" }

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

    override fun toString(): kotlin.String = buildString {
        append("CreateVehicleRequest(")
        append("associationBehavior=$associationBehavior,")
        append("attributes=$attributes,")
        append("decoderManifestArn=$decoderManifestArn,")
        append("modelManifestArn=$modelManifestArn,")
        append("tags=$tags,")
        append("vehicleName=$vehicleName")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = associationBehavior?.hashCode() ?: 0
        result = 31 * result + (attributes?.hashCode() ?: 0)
        result = 31 * result + (decoderManifestArn.hashCode())
        result = 31 * result + (modelManifestArn.hashCode())
        result = 31 * result + (tags?.hashCode() ?: 0)
        result = 31 * result + (vehicleName.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 CreateVehicleRequest

        if (associationBehavior != other.associationBehavior) return false
        if (attributes != other.attributes) return false
        if (decoderManifestArn != other.decoderManifestArn) return false
        if (modelManifestArn != other.modelManifestArn) return false
        if (tags != other.tags) return false
        if (vehicleName != other.vehicleName) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * An option to create a new Amazon Web Services IoT thing when creating a vehicle, or to validate an existing Amazon Web Services IoT thing as a vehicle.
         *
         * Default: ``
         */
        public var associationBehavior: aws.sdk.kotlin.services.iotfleetwise.model.VehicleAssociationBehavior? = null
        /**
         * Static information about a vehicle in a key-value pair. For example: `"engineType"` : `"1.3 L R2"`
         *
         * A campaign must include the keys (attribute names) in `dataExtraDimensions` for them to display in Amazon Timestream.
         */
        public var attributes: Map? = null
        /**
         * The ARN of a decoder manifest.
         */
        public var decoderManifestArn: kotlin.String? = null
        /**
         * The Amazon Resource Name ARN of a vehicle model.
         */
        public var modelManifestArn: kotlin.String? = null
        /**
         * Metadata that can be used to manage the vehicle.
         */
        public var tags: List? = null
        /**
         * The unique ID of the vehicle to create.
         */
        public var vehicleName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iotfleetwise.model.CreateVehicleRequest) : this() {
            this.associationBehavior = x.associationBehavior
            this.attributes = x.attributes
            this.decoderManifestArn = x.decoderManifestArn
            this.modelManifestArn = x.modelManifestArn
            this.tags = x.tags
            this.vehicleName = x.vehicleName
        }

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

        internal fun correctErrors(): Builder {
            if (decoderManifestArn == null) decoderManifestArn = ""
            if (modelManifestArn == null) modelManifestArn = ""
            if (vehicleName == null) vehicleName = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy