
commonMain.aws.sdk.kotlin.services.iot.model.UpdateThingGroupRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iot.model
public class UpdateThingGroupRequest private constructor(builder: Builder) {
/**
* The expected version of the thing group. If this does not match the version of the thing group being updated, the update will fail.
*/
public val expectedVersion: kotlin.Long? = builder.expectedVersion
/**
* The thing group to update.
*/
public val thingGroupName: kotlin.String? = builder.thingGroupName
/**
* The thing group properties.
*/
public val thingGroupProperties: aws.sdk.kotlin.services.iot.model.ThingGroupProperties? = builder.thingGroupProperties
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iot.model.UpdateThingGroupRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateThingGroupRequest(")
append("expectedVersion=$expectedVersion,")
append("thingGroupName=$thingGroupName,")
append("thingGroupProperties=$thingGroupProperties")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = expectedVersion?.hashCode() ?: 0
result = 31 * result + (thingGroupName?.hashCode() ?: 0)
result = 31 * result + (thingGroupProperties?.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 UpdateThingGroupRequest
if (expectedVersion != other.expectedVersion) return false
if (thingGroupName != other.thingGroupName) return false
if (thingGroupProperties != other.thingGroupProperties) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iot.model.UpdateThingGroupRequest = Builder(this).apply(block).build()
public class Builder {
/**
* The expected version of the thing group. If this does not match the version of the thing group being updated, the update will fail.
*/
public var expectedVersion: kotlin.Long? = null
/**
* The thing group to update.
*/
public var thingGroupName: kotlin.String? = null
/**
* The thing group properties.
*/
public var thingGroupProperties: aws.sdk.kotlin.services.iot.model.ThingGroupProperties? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iot.model.UpdateThingGroupRequest) : this() {
this.expectedVersion = x.expectedVersion
this.thingGroupName = x.thingGroupName
this.thingGroupProperties = x.thingGroupProperties
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iot.model.UpdateThingGroupRequest = UpdateThingGroupRequest(this)
/**
* construct an [aws.sdk.kotlin.services.iot.model.ThingGroupProperties] inside the given [block]
*/
public fun thingGroupProperties(block: aws.sdk.kotlin.services.iot.model.ThingGroupProperties.Builder.() -> kotlin.Unit) {
this.thingGroupProperties = aws.sdk.kotlin.services.iot.model.ThingGroupProperties.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy