commonMain.aws.sdk.kotlin.services.iotfleetwise.model.VehicleSummary.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of iotfleetwise-jvm Show documentation
Show all versions of iotfleetwise-jvm Show documentation
The AWS SDK for Kotlin client for IoTFleetWise
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
import aws.smithy.kotlin.runtime.time.Instant
/**
* Information about a vehicle.
*
* To return this information about vehicles in your account, you can use the API operation.
*/
public class VehicleSummary private constructor(builder: Builder) {
/**
* The Amazon Resource Name (ARN) of the vehicle.
*/
public val arn: kotlin.String = requireNotNull(builder.arn) { "A non-null value must be provided for arn" }
/**
* Static information about a vehicle in a key-value pair. For example:
*
* `"engineType"` : `"1.3 L R2"`
*/
public val attributes: Map? = builder.attributes
/**
* The time the vehicle was created in seconds since epoch (January 1, 1970 at midnight UTC time).
*/
public val creationTime: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.creationTime) { "A non-null value must be provided for creationTime" }
/**
* The ARN of a decoder manifest associated with the vehicle.
*/
public val decoderManifestArn: kotlin.String = requireNotNull(builder.decoderManifestArn) { "A non-null value must be provided for decoderManifestArn" }
/**
* The time the vehicle was last updated in seconds since epoch (January 1, 1970 at midnight UTC time).
*/
public val lastModificationTime: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.lastModificationTime) { "A non-null value must be provided for lastModificationTime" }
/**
* The ARN of a vehicle model (model manifest) associated with the vehicle.
*/
public val modelManifestArn: kotlin.String = requireNotNull(builder.modelManifestArn) { "A non-null value must be provided for modelManifestArn" }
/**
* The unique ID of the vehicle.
*/
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.VehicleSummary = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("VehicleSummary(")
append("arn=$arn,")
append("attributes=$attributes,")
append("creationTime=$creationTime,")
append("decoderManifestArn=$decoderManifestArn,")
append("lastModificationTime=$lastModificationTime,")
append("modelManifestArn=$modelManifestArn,")
append("vehicleName=$vehicleName")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = arn.hashCode()
result = 31 * result + (attributes?.hashCode() ?: 0)
result = 31 * result + (creationTime.hashCode())
result = 31 * result + (decoderManifestArn.hashCode())
result = 31 * result + (lastModificationTime.hashCode())
result = 31 * result + (modelManifestArn.hashCode())
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 VehicleSummary
if (arn != other.arn) return false
if (attributes != other.attributes) return false
if (creationTime != other.creationTime) return false
if (decoderManifestArn != other.decoderManifestArn) return false
if (lastModificationTime != other.lastModificationTime) 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.VehicleSummary = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Amazon Resource Name (ARN) of the vehicle.
*/
public var arn: kotlin.String? = null
/**
* Static information about a vehicle in a key-value pair. For example:
*
* `"engineType"` : `"1.3 L R2"`
*/
public var attributes: Map? = null
/**
* The time the vehicle was created in seconds since epoch (January 1, 1970 at midnight UTC time).
*/
public var creationTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The ARN of a decoder manifest associated with the vehicle.
*/
public var decoderManifestArn: kotlin.String? = null
/**
* The time the vehicle was last updated in seconds since epoch (January 1, 1970 at midnight UTC time).
*/
public var lastModificationTime: aws.smithy.kotlin.runtime.time.Instant? = 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.
*/
public var vehicleName: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iotfleetwise.model.VehicleSummary) : this() {
this.arn = x.arn
this.attributes = x.attributes
this.creationTime = x.creationTime
this.decoderManifestArn = x.decoderManifestArn
this.lastModificationTime = x.lastModificationTime
this.modelManifestArn = x.modelManifestArn
this.vehicleName = x.vehicleName
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iotfleetwise.model.VehicleSummary = VehicleSummary(this)
internal fun correctErrors(): Builder {
if (arn == null) arn = ""
if (creationTime == null) creationTime = Instant.fromEpochSeconds(0)
if (decoderManifestArn == null) decoderManifestArn = ""
if (lastModificationTime == null) lastModificationTime = Instant.fromEpochSeconds(0)
if (modelManifestArn == null) modelManifestArn = ""
if (vehicleName == null) vehicleName = ""
return this
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy