commonMain.aws.sdk.kotlin.services.iotsitewise.model.BatchGetAssetPropertyValueErrorEntry.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of iotsitewise-jvm Show documentation
Show all versions of iotsitewise-jvm Show documentation
The AWS SDK for Kotlin client for IoTSiteWise
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iotsitewise.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Contains error information for an asset property value entry that is associated with the [BatchGetAssetPropertyValue](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_BatchGetAssetPropertyValue.html) API.
*/
public class BatchGetAssetPropertyValueErrorEntry private constructor(builder: Builder) {
/**
* The ID of the entry.
*/
public val entryId: kotlin.String = requireNotNull(builder.entryId) { "A non-null value must be provided for entryId" }
/**
* The error code.
*/
public val errorCode: aws.sdk.kotlin.services.iotsitewise.model.BatchGetAssetPropertyValueErrorCode = requireNotNull(builder.errorCode) { "A non-null value must be provided for errorCode" }
/**
* The associated error message.
*/
public val errorMessage: kotlin.String = requireNotNull(builder.errorMessage) { "A non-null value must be provided for errorMessage" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iotsitewise.model.BatchGetAssetPropertyValueErrorEntry = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("BatchGetAssetPropertyValueErrorEntry(")
append("entryId=$entryId,")
append("errorCode=$errorCode,")
append("errorMessage=$errorMessage")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = entryId.hashCode()
result = 31 * result + (errorCode.hashCode())
result = 31 * result + (errorMessage.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 BatchGetAssetPropertyValueErrorEntry
if (entryId != other.entryId) return false
if (errorCode != other.errorCode) return false
if (errorMessage != other.errorMessage) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iotsitewise.model.BatchGetAssetPropertyValueErrorEntry = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The ID of the entry.
*/
public var entryId: kotlin.String? = null
/**
* The error code.
*/
public var errorCode: aws.sdk.kotlin.services.iotsitewise.model.BatchGetAssetPropertyValueErrorCode? = null
/**
* The associated error message.
*/
public var errorMessage: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iotsitewise.model.BatchGetAssetPropertyValueErrorEntry) : this() {
this.entryId = x.entryId
this.errorCode = x.errorCode
this.errorMessage = x.errorMessage
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iotsitewise.model.BatchGetAssetPropertyValueErrorEntry = BatchGetAssetPropertyValueErrorEntry(this)
internal fun correctErrors(): Builder {
if (entryId == null) entryId = ""
if (errorCode == null) errorCode = BatchGetAssetPropertyValueErrorCode.SdkUnknown("no value provided")
if (errorMessage == null) errorMessage = ""
return this
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy