commonMain.aws.sdk.kotlin.services.ssmincidents.model.CreateTimelineEventResponse.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 CreateTimelineEventResponse private constructor(builder: Builder) {
/**
* The ID of the event for easy reference later.
*/
public val eventId: kotlin.String = requireNotNull(builder.eventId) { "A non-null value must be provided for eventId" }
/**
* The ARN of the incident record that you added the event to.
*/
public val incidentRecordArn: kotlin.String = requireNotNull(builder.incidentRecordArn) { "A non-null value must be provided for incidentRecordArn" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ssmincidents.model.CreateTimelineEventResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateTimelineEventResponse(")
append("eventId=$eventId,")
append("incidentRecordArn=$incidentRecordArn")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = eventId.hashCode()
result = 31 * result + (incidentRecordArn.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 CreateTimelineEventResponse
if (eventId != other.eventId) return false
if (incidentRecordArn != other.incidentRecordArn) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ssmincidents.model.CreateTimelineEventResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The ID of the event for easy reference later.
*/
public var eventId: kotlin.String? = null
/**
* The ARN of the incident record that you added the event to.
*/
public var incidentRecordArn: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.ssmincidents.model.CreateTimelineEventResponse) : this() {
this.eventId = x.eventId
this.incidentRecordArn = x.incidentRecordArn
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.ssmincidents.model.CreateTimelineEventResponse = CreateTimelineEventResponse(this)
internal fun correctErrors(): Builder {
if (eventId == null) eventId = ""
if (incidentRecordArn == null) incidentRecordArn = ""
return this
}
}
}