commonMain.aws.sdk.kotlin.services.ssmincidents.model.UpdateRelatedItemsRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ssmincidents-jvm Show documentation
Show all versions of ssmincidents-jvm Show documentation
The AWS SDK for Kotlin client for SSM Incidents
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.ssmincidents.model
import aws.smithy.kotlin.runtime.SdkDsl
public class UpdateRelatedItemsRequest private constructor(builder: Builder) {
/**
* A token that ensures that a client calls the operation only once with the specified details.
*/
public val clientToken: kotlin.String? = builder.clientToken
/**
* The Amazon Resource Name (ARN) of the incident record that contains the related items that you update.
*/
public val incidentRecordArn: kotlin.String = requireNotNull(builder.incidentRecordArn) { "A non-null value must be provided for incidentRecordArn" }
/**
* Details about the item that you are add to, or delete from, an incident.
*/
public val relatedItemsUpdate: aws.sdk.kotlin.services.ssmincidents.model.RelatedItemsUpdate? = builder.relatedItemsUpdate
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ssmincidents.model.UpdateRelatedItemsRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateRelatedItemsRequest(")
append("clientToken=$clientToken,")
append("incidentRecordArn=$incidentRecordArn,")
append("relatedItemsUpdate=$relatedItemsUpdate")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = clientToken?.hashCode() ?: 0
result = 31 * result + (incidentRecordArn.hashCode())
result = 31 * result + (relatedItemsUpdate?.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 UpdateRelatedItemsRequest
if (clientToken != other.clientToken) return false
if (incidentRecordArn != other.incidentRecordArn) return false
if (relatedItemsUpdate != other.relatedItemsUpdate) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ssmincidents.model.UpdateRelatedItemsRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A token that ensures that a client calls the operation only once with the specified details.
*/
public var clientToken: kotlin.String? = null
/**
* The Amazon Resource Name (ARN) of the incident record that contains the related items that you update.
*/
public var incidentRecordArn: kotlin.String? = null
/**
* Details about the item that you are add to, or delete from, an incident.
*/
public var relatedItemsUpdate: aws.sdk.kotlin.services.ssmincidents.model.RelatedItemsUpdate? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.ssmincidents.model.UpdateRelatedItemsRequest) : this() {
this.clientToken = x.clientToken
this.incidentRecordArn = x.incidentRecordArn
this.relatedItemsUpdate = x.relatedItemsUpdate
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.ssmincidents.model.UpdateRelatedItemsRequest = UpdateRelatedItemsRequest(this)
internal fun correctErrors(): Builder {
if (incidentRecordArn == null) incidentRecordArn = ""
return this
}
}
}