commonMain.aws.sdk.kotlin.services.ssmincidents.model.RelatedItem.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
/**
* Resources that responders use to triage and mitigate the incident.
*/
public class RelatedItem private constructor(builder: Builder) {
/**
* A unique ID for a `RelatedItem`.
*
* Don't specify this parameter when you add a `RelatedItem` by using the UpdateRelatedItems API action.
*/
public val generatedId: kotlin.String? = builder.generatedId
/**
* Details about the related item.
*/
public val identifier: aws.sdk.kotlin.services.ssmincidents.model.ItemIdentifier? = builder.identifier
/**
* The title of the related item.
*/
public val title: kotlin.String? = builder.title
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ssmincidents.model.RelatedItem = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("RelatedItem(")
append("generatedId=$generatedId,")
append("identifier=$identifier,")
append("title=$title")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = generatedId?.hashCode() ?: 0
result = 31 * result + (identifier?.hashCode() ?: 0)
result = 31 * result + (title?.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 RelatedItem
if (generatedId != other.generatedId) return false
if (identifier != other.identifier) return false
if (title != other.title) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ssmincidents.model.RelatedItem = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A unique ID for a `RelatedItem`.
*
* Don't specify this parameter when you add a `RelatedItem` by using the UpdateRelatedItems API action.
*/
public var generatedId: kotlin.String? = null
/**
* Details about the related item.
*/
public var identifier: aws.sdk.kotlin.services.ssmincidents.model.ItemIdentifier? = null
/**
* The title of the related item.
*/
public var title: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.ssmincidents.model.RelatedItem) : this() {
this.generatedId = x.generatedId
this.identifier = x.identifier
this.title = x.title
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.ssmincidents.model.RelatedItem = RelatedItem(this)
/**
* construct an [aws.sdk.kotlin.services.ssmincidents.model.ItemIdentifier] inside the given [block]
*/
public fun identifier(block: aws.sdk.kotlin.services.ssmincidents.model.ItemIdentifier.Builder.() -> kotlin.Unit) {
this.identifier = aws.sdk.kotlin.services.ssmincidents.model.ItemIdentifier.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}