commonMain.aws.sdk.kotlin.services.iotfleetwise.model.Ros2PrimitiveMessageDefinition.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
/**
* Represents a ROS 2 compliant primitive type message of the complex data structure.
*/
public class Ros2PrimitiveMessageDefinition private constructor(builder: Builder) {
/**
* The offset used to calculate the signal value. Combined with scaling, the calculation is `value = raw_value * scaling + offset`.
*/
public val offset: kotlin.Double? = builder.offset
/**
* The primitive type (integer, floating point, boolean, etc.) for the ROS 2 primitive message definition.
*/
public val primitiveType: aws.sdk.kotlin.services.iotfleetwise.model.Ros2PrimitiveType = requireNotNull(builder.primitiveType) { "A non-null value must be provided for primitiveType" }
/**
* A multiplier used to decode the message.
*/
public val scaling: kotlin.Double? = builder.scaling
/**
* An optional attribute specifying the upper bound for `STRING` and `WSTRING`.
*/
public val upperBound: kotlin.Long? = builder.upperBound
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iotfleetwise.model.Ros2PrimitiveMessageDefinition = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Ros2PrimitiveMessageDefinition(")
append("offset=$offset,")
append("primitiveType=$primitiveType,")
append("scaling=$scaling,")
append("upperBound=$upperBound")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = offset?.hashCode() ?: 0
result = 31 * result + (primitiveType.hashCode())
result = 31 * result + (scaling?.hashCode() ?: 0)
result = 31 * result + (upperBound?.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 Ros2PrimitiveMessageDefinition
if (!(offset?.equals(other.offset) ?: (other.offset == null))) return false
if (primitiveType != other.primitiveType) return false
if (!(scaling?.equals(other.scaling) ?: (other.scaling == null))) return false
if (upperBound != other.upperBound) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iotfleetwise.model.Ros2PrimitiveMessageDefinition = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The offset used to calculate the signal value. Combined with scaling, the calculation is `value = raw_value * scaling + offset`.
*/
public var offset: kotlin.Double? = null
/**
* The primitive type (integer, floating point, boolean, etc.) for the ROS 2 primitive message definition.
*/
public var primitiveType: aws.sdk.kotlin.services.iotfleetwise.model.Ros2PrimitiveType? = null
/**
* A multiplier used to decode the message.
*/
public var scaling: kotlin.Double? = null
/**
* An optional attribute specifying the upper bound for `STRING` and `WSTRING`.
*/
public var upperBound: kotlin.Long? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iotfleetwise.model.Ros2PrimitiveMessageDefinition) : this() {
this.offset = x.offset
this.primitiveType = x.primitiveType
this.scaling = x.scaling
this.upperBound = x.upperBound
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iotfleetwise.model.Ros2PrimitiveMessageDefinition = Ros2PrimitiveMessageDefinition(this)
internal fun correctErrors(): Builder {
if (primitiveType == null) primitiveType = Ros2PrimitiveType.SdkUnknown("no value provided")
return this
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy