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

commonMain.aws.sdk.kotlin.services.iotfleetwise.model.UpdateVehicleError.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

/**
 * An HTTP error resulting from updating the description for a vehicle.
 */
public class UpdateVehicleError private constructor(builder: Builder) {
    /**
     * The relevant HTTP error code (400+).
     */
    public val code: kotlin.Int = builder.code
    /**
     * A message associated with the error.
     */
    public val message: kotlin.String? = builder.message
    /**
     * The ID of the vehicle with the error.
     */
    public val vehicleName: kotlin.String? = builder.vehicleName

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

    override fun toString(): kotlin.String = buildString {
        append("UpdateVehicleError(")
        append("code=$code,")
        append("message=$message,")
        append("vehicleName=$vehicleName")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = code
        result = 31 * result + (message?.hashCode() ?: 0)
        result = 31 * result + (vehicleName?.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 UpdateVehicleError

        if (code != other.code) return false
        if (message != other.message) return false
        if (vehicleName != other.vehicleName) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The relevant HTTP error code (400+).
         */
        public var code: kotlin.Int = 0
        /**
         * A message associated with the error.
         */
        public var message: kotlin.String? = null
        /**
         * The ID of the vehicle with the error.
         */
        public var vehicleName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iotfleetwise.model.UpdateVehicleError) : this() {
            this.code = x.code
            this.message = x.message
            this.vehicleName = x.vehicleName
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy