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

commonMain.aws.sdk.kotlin.services.iotfleetwise.model.UpdateVehicleRequest.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 UpdateVehicleRequest private constructor(builder: Builder) {
    /**
     * The method the specified attributes will update the existing attributes on the vehicle. Use`Overwite` to replace the vehicle attributes with the specified attributes. Or use `Merge` to combine all attributes.
     *
     * This is required if attributes are present in the input.
     */
    public val attributeUpdateMode: aws.sdk.kotlin.services.iotfleetwise.model.UpdateMode? = builder.attributeUpdateMode
    /**
     * Static information about a vehicle in a key-value pair. For example:
     *
     * `"engineType"` : `"1.3 L R2"`
     */
    public val attributes: Map? = builder.attributes
    /**
     * The ARN of the decoder manifest associated with this vehicle.
     */
    public val decoderManifestArn: kotlin.String? = builder.decoderManifestArn
    /**
     * The ARN of a vehicle model (model manifest) associated with the vehicle.
     */
    public val modelManifestArn: kotlin.String? = builder.modelManifestArn
    /**
     * The unique ID of the vehicle to update.
     */
    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.UpdateVehicleRequest = Builder().apply(block).build()
    }

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

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

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

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The method the specified attributes will update the existing attributes on the vehicle. Use`Overwite` to replace the vehicle attributes with the specified attributes. Or use `Merge` to combine all attributes.
         *
         * This is required if attributes are present in the input.
         */
        public var attributeUpdateMode: aws.sdk.kotlin.services.iotfleetwise.model.UpdateMode? = null
        /**
         * Static information about a vehicle in a key-value pair. For example:
         *
         * `"engineType"` : `"1.3 L R2"`
         */
        public var attributes: Map? = null
        /**
         * The ARN of the decoder manifest associated with this vehicle.
         */
        public var decoderManifestArn: kotlin.String? = null
        /**
         * The ARN of a vehicle model (model manifest) associated with the vehicle.
         */
        public var modelManifestArn: kotlin.String? = null
        /**
         * The unique ID of the vehicle to update.
         */
        public var vehicleName: kotlin.String? = null

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy