commonMain.aws.sdk.kotlin.services.ssmincidents.model.EventReference.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
/**
* An item referenced in a `TimelineEvent` that is involved in or somehow associated with an incident. You can specify an Amazon Resource Name (ARN) for an Amazon Web Services resource or a `RelatedItem` ID.
*/
public sealed class EventReference {
/**
* The ID of a `RelatedItem` referenced in a `TimelineEvent`.
*/
public data class RelatedItemId(val value: kotlin.String) : aws.sdk.kotlin.services.ssmincidents.model.EventReference() {
}
/**
* The Amazon Resource Name (ARN) of an Amazon Web Services resource referenced in a `TimelineEvent`.
*/
public data class Resource(val value: kotlin.String) : aws.sdk.kotlin.services.ssmincidents.model.EventReference() {
}
public object SdkUnknown : aws.sdk.kotlin.services.ssmincidents.model.EventReference() {
}
/**
* Casts this [EventReference] as a [RelatedItemId] and retrieves its [kotlin.String] value. Throws an exception if the [EventReference] is not a
* [RelatedItemId].
*/
public fun asRelatedItemId(): kotlin.String = (this as EventReference.RelatedItemId).value
/**
* Casts this [EventReference] as a [RelatedItemId] and retrieves its [kotlin.String] value. Returns null if the [EventReference] is not a [RelatedItemId].
*/
public fun asRelatedItemIdOrNull(): kotlin.String? = (this as? EventReference.RelatedItemId)?.value
/**
* Casts this [EventReference] as a [Resource] and retrieves its [kotlin.String] value. Throws an exception if the [EventReference] is not a
* [Resource].
*/
public fun asResource(): kotlin.String = (this as EventReference.Resource).value
/**
* Casts this [EventReference] as a [Resource] and retrieves its [kotlin.String] value. Returns null if the [EventReference] is not a [Resource].
*/
public fun asResourceOrNull(): kotlin.String? = (this as? EventReference.Resource)?.value
}