All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.ssmincidents.model.EventReference.kt Maven / Gradle / Ivy

There is a newer version: 1.3.79
Show newest version
// 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
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy