commonMain.aws.sdk.kotlin.services.iotfleetwise.model.Attribute.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
/**
* A signal that represents static information about the vehicle, such as engine type or manufacturing date.
*/
public class Attribute private constructor(builder: Builder) {
/**
* A list of possible values an attribute can be assigned.
*/
public val allowedValues: List? = builder.allowedValues
/**
* A specified value for the attribute.
*/
@Deprecated("assignedValue is no longer in use")
public val assignedValue: kotlin.String? = builder.assignedValue
/**
* A comment in addition to the description.
*/
public val comment: kotlin.String? = builder.comment
/**
* The specified data type of the attribute.
*/
public val dataType: aws.sdk.kotlin.services.iotfleetwise.model.NodeDataType = requireNotNull(builder.dataType) { "A non-null value must be provided for dataType" }
/**
* The default value of the attribute.
*/
public val defaultValue: kotlin.String? = builder.defaultValue
/**
* 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 the attribute.
*/
public val description: kotlin.String? = builder.description
/**
* The fully qualified name of the attribute. For example, the fully qualified name of an attribute might be `Vehicle.Body.Engine.Type`.
*/
public val fullyQualifiedName: kotlin.String = requireNotNull(builder.fullyQualifiedName) { "A non-null value must be provided for fullyQualifiedName" }
/**
* The specified possible maximum value of the attribute.
*/
public val max: kotlin.Double? = builder.max
/**
* The specified possible minimum value of the attribute.
*/
public val min: kotlin.Double? = builder.min
/**
* The scientific unit for the attribute.
*/
public val unit: kotlin.String? = builder.unit
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iotfleetwise.model.Attribute = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Attribute(")
append("allowedValues=$allowedValues,")
append("assignedValue=$assignedValue,")
append("comment=$comment,")
append("dataType=$dataType,")
append("defaultValue=$defaultValue,")
append("deprecationMessage=$deprecationMessage,")
append("description=$description,")
append("fullyQualifiedName=$fullyQualifiedName,")
append("max=$max,")
append("min=$min,")
append("unit=$unit")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = allowedValues?.hashCode() ?: 0
result = 31 * result + (assignedValue?.hashCode() ?: 0)
result = 31 * result + (comment?.hashCode() ?: 0)
result = 31 * result + (dataType.hashCode())
result = 31 * result + (defaultValue?.hashCode() ?: 0)
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 + (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 Attribute
if (allowedValues != other.allowedValues) return false
if (assignedValue != other.assignedValue) return false
if (comment != other.comment) return false
if (dataType != other.dataType) return false
if (defaultValue != other.defaultValue) 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 (unit != other.unit) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iotfleetwise.model.Attribute = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A list of possible values an attribute can be assigned.
*/
public var allowedValues: List? = null
/**
* A specified value for the attribute.
*/
@Deprecated("assignedValue is no longer in use")
public var assignedValue: kotlin.String? = null
/**
* A comment in addition to the description.
*/
public var comment: kotlin.String? = null
/**
* The specified data type of the attribute.
*/
public var dataType: aws.sdk.kotlin.services.iotfleetwise.model.NodeDataType? = null
/**
* The default value of the attribute.
*/
public var defaultValue: kotlin.String? = 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 the attribute.
*/
public var description: kotlin.String? = null
/**
* The fully qualified name of the attribute. For example, the fully qualified name of an attribute might be `Vehicle.Body.Engine.Type`.
*/
public var fullyQualifiedName: kotlin.String? = null
/**
* The specified possible maximum value of the attribute.
*/
public var max: kotlin.Double? = null
/**
* The specified possible minimum value of the attribute.
*/
public var min: kotlin.Double? = null
/**
* The scientific unit for the attribute.
*/
public var unit: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iotfleetwise.model.Attribute) : this() {
this.allowedValues = x.allowedValues
this.assignedValue = x.assignedValue
this.comment = x.comment
this.dataType = x.dataType
this.defaultValue = x.defaultValue
this.deprecationMessage = x.deprecationMessage
this.description = x.description
this.fullyQualifiedName = x.fullyQualifiedName
this.max = x.max
this.min = x.min
this.unit = x.unit
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iotfleetwise.model.Attribute = Attribute(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