commonMain.aws.sdk.kotlin.services.ssmincidents.model.GetTimelineEventRequest.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 GetTimelineEventRequest private constructor(builder: Builder) {
/**
* The ID of the event. You can get an event's ID when you create it, or by using `ListTimelineEvents`.
*/
public val eventId: kotlin.String = requireNotNull(builder.eventId) { "A non-null value must be provided for eventId" }
/**
* The Amazon Resource Name (ARN) of the incident that includes the timeline event.
*/
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.GetTimelineEventRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetTimelineEventRequest(")
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 GetTimelineEventRequest
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.GetTimelineEventRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The ID of the event. You can get an event's ID when you create it, or by using `ListTimelineEvents`.
*/
public var eventId: kotlin.String? = null
/**
* The Amazon Resource Name (ARN) of the incident that includes the timeline event.
*/
public var incidentRecordArn: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.ssmincidents.model.GetTimelineEventRequest) : this() {
this.eventId = x.eventId
this.incidentRecordArn = x.incidentRecordArn
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.ssmincidents.model.GetTimelineEventRequest = GetTimelineEventRequest(this)
internal fun correctErrors(): Builder {
if (eventId == null) eventId = ""
if (incidentRecordArn == null) incidentRecordArn = ""
return this
}
}
}