commonMain.aws.sdk.kotlin.services.iotfleetwise.model.Sensor.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
/**
* An input component that reports the environmental condition of a vehicle.
*
* You can collect data about fluid levels, temperatures, vibrations, or battery voltage from sensors.
*/
public class Sensor private constructor(builder: Builder) {
/**
* A list of possible values a sensor can take.
*/
public val allowedValues: List? = builder.allowedValues
/**
* A comment in addition to the description.
*/
public val comment: kotlin.String? = builder.comment
/**
* The specified data type of the sensor.
*/
public val dataType: aws.sdk.kotlin.services.iotfleetwise.model.NodeDataType = requireNotNull(builder.dataType) { "A non-null value must be provided for dataType" }
/**
* The deprecation message for the node or the branch that was moved or deleted.
*/
public val deprecationMessage: kotlin.String? = builder.deprecationMessage
/**
* A brief description of a sensor.
*/
public val description: kotlin.String? = builder.description
/**
* The fully qualified name of the sensor. For example, the fully qualified name of a sensor might be `Vehicle.Body.Engine.Battery`.
*/
public val fullyQualifiedName: kotlin.String = requireNotNull(builder.fullyQualifiedName) { "A non-null value must be provided for fullyQualifiedName" }
/**
* The specified possible maximum value of the sensor.
*/
public val max: kotlin.Double? = builder.max
/**
* The specified possible minimum value of the sensor.
*/
public val min: kotlin.Double? = builder.min
/**
* The fully qualified name of the struct node for a sensor if the data type of the actuator is `Struct` or `StructArray`. For example, the struct fully qualified name of a sensor might be `Vehicle.ADAS.CameraStruct`.
*/
public val structFullyQualifiedName: kotlin.String? = builder.structFullyQualifiedName
/**
* The scientific unit of measurement for data collected by the sensor.
*/
public val unit: kotlin.String? = builder.unit
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iotfleetwise.model.Sensor = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Sensor(")
append("allowedValues=$allowedValues,")
append("comment=$comment,")
append("dataType=$dataType,")
append("deprecationMessage=$deprecationMessage,")
append("description=$description,")
append("fullyQualifiedName=$fullyQualifiedName,")
append("max=$max,")
append("min=$min,")
append("structFullyQualifiedName=$structFullyQualifiedName,")
append("unit=$unit")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = allowedValues?.hashCode() ?: 0
result = 31 * result + (comment?.hashCode() ?: 0)
result = 31 * result + (dataType.hashCode())
result = 31 * result + (deprecationMessage?.hashCode() ?: 0)
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (fullyQualifiedName.hashCode())
result = 31 * result + (max?.hashCode() ?: 0)
result = 31 * result + (min?.hashCode() ?: 0)
result = 31 * result + (structFullyQualifiedName?.hashCode() ?: 0)
result = 31 * result + (unit?.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 Sensor
if (allowedValues != other.allowedValues) return false
if (comment != other.comment) return false
if (dataType != other.dataType) return false
if (deprecationMessage != other.deprecationMessage) return false
if (description != other.description) return false
if (fullyQualifiedName != other.fullyQualifiedName) return false
if (!(max?.equals(other.max) ?: (other.max == null))) return false
if (!(min?.equals(other.min) ?: (other.min == null))) return false
if (structFullyQualifiedName != other.structFullyQualifiedName) return false
if (unit != other.unit) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iotfleetwise.model.Sensor = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A list of possible values a sensor can take.
*/
public var allowedValues: List? = null
/**
* A comment in addition to the description.
*/
public var comment: kotlin.String? = null
/**
* The specified data type of the sensor.
*/
public var dataType: aws.sdk.kotlin.services.iotfleetwise.model.NodeDataType? = null
/**
* The deprecation message for the node or the branch that was moved or deleted.
*/
public var deprecationMessage: kotlin.String? = null
/**
* A brief description of a sensor.
*/
public var description: kotlin.String? = null
/**
* The fully qualified name of the sensor. For example, the fully qualified name of a sensor might be `Vehicle.Body.Engine.Battery`.
*/
public var fullyQualifiedName: kotlin.String? = null
/**
* The specified possible maximum value of the sensor.
*/
public var max: kotlin.Double? = null
/**
* The specified possible minimum value of the sensor.
*/
public var min: kotlin.Double? = null
/**
* The fully qualified name of the struct node for a sensor if the data type of the actuator is `Struct` or `StructArray`. For example, the struct fully qualified name of a sensor might be `Vehicle.ADAS.CameraStruct`.
*/
public var structFullyQualifiedName: kotlin.String? = null
/**
* The scientific unit of measurement for data collected by the sensor.
*/
public var unit: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iotfleetwise.model.Sensor) : this() {
this.allowedValues = x.allowedValues
this.comment = x.comment
this.dataType = x.dataType
this.deprecationMessage = x.deprecationMessage
this.description = x.description
this.fullyQualifiedName = x.fullyQualifiedName
this.max = x.max
this.min = x.min
this.structFullyQualifiedName = x.structFullyQualifiedName
this.unit = x.unit
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iotfleetwise.model.Sensor = Sensor(this)
internal fun correctErrors(): Builder {
if (dataType == null) dataType = NodeDataType.SdkUnknown("no value provided")
if (fullyQualifiedName == null) fullyQualifiedName = ""
return this
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy