commonMain.aws.sdk.kotlin.services.iotsitewise.model.UpdateAssetRequest.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
public class UpdateAssetRequest private constructor(builder: Builder) {
/**
* A description for the asset.
*/
public val assetDescription: kotlin.String? = builder.assetDescription
/**
* An external ID to assign to the asset. The asset must not already have an external ID. The external ID must be unique within your Amazon Web Services account. For more information, see [Using external IDs](https://docs.aws.amazon.com/iot-sitewise/latest/userguide/object-ids.html#external-ids) in the *IoT SiteWise User Guide*.
*/
public val assetExternalId: kotlin.String? = builder.assetExternalId
/**
* The ID of the asset to update. This can be either the actual ID in UUID format, or else `externalId:` followed by the external ID, if it has one. For more information, see [Referencing objects with external IDs](https://docs.aws.amazon.com/iot-sitewise/latest/userguide/object-ids.html#external-id-references) in the *IoT SiteWise User Guide*.
*/
public val assetId: kotlin.String? = builder.assetId
/**
* A friendly name for the asset.
*/
public val assetName: kotlin.String? = builder.assetName
/**
* A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.
*/
public val clientToken: kotlin.String? = builder.clientToken
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iotsitewise.model.UpdateAssetRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateAssetRequest(")
append("assetDescription=$assetDescription,")
append("assetExternalId=$assetExternalId,")
append("assetId=$assetId,")
append("assetName=$assetName,")
append("clientToken=$clientToken")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = assetDescription?.hashCode() ?: 0
result = 31 * result + (assetExternalId?.hashCode() ?: 0)
result = 31 * result + (assetId?.hashCode() ?: 0)
result = 31 * result + (assetName?.hashCode() ?: 0)
result = 31 * result + (clientToken?.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 UpdateAssetRequest
if (assetDescription != other.assetDescription) return false
if (assetExternalId != other.assetExternalId) return false
if (assetId != other.assetId) return false
if (assetName != other.assetName) return false
if (clientToken != other.clientToken) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iotsitewise.model.UpdateAssetRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A description for the asset.
*/
public var assetDescription: kotlin.String? = null
/**
* An external ID to assign to the asset. The asset must not already have an external ID. The external ID must be unique within your Amazon Web Services account. For more information, see [Using external IDs](https://docs.aws.amazon.com/iot-sitewise/latest/userguide/object-ids.html#external-ids) in the *IoT SiteWise User Guide*.
*/
public var assetExternalId: kotlin.String? = null
/**
* The ID of the asset to update. This can be either the actual ID in UUID format, or else `externalId:` followed by the external ID, if it has one. For more information, see [Referencing objects with external IDs](https://docs.aws.amazon.com/iot-sitewise/latest/userguide/object-ids.html#external-id-references) in the *IoT SiteWise User Guide*.
*/
public var assetId: kotlin.String? = null
/**
* A friendly name for the asset.
*/
public var assetName: kotlin.String? = null
/**
* A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.
*/
public var clientToken: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iotsitewise.model.UpdateAssetRequest) : this() {
this.assetDescription = x.assetDescription
this.assetExternalId = x.assetExternalId
this.assetId = x.assetId
this.assetName = x.assetName
this.clientToken = x.clientToken
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iotsitewise.model.UpdateAssetRequest = UpdateAssetRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy