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

commonMain.aws.sdk.kotlin.services.ssmincidents.model.RelatedItemsUpdate.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



/**
 * Details about the related item you're adding.
 */
public sealed class RelatedItemsUpdate {
    /**
     * Details about the related item you're adding.
     */
    public data class ItemToAdd(val value: aws.sdk.kotlin.services.ssmincidents.model.RelatedItem) : aws.sdk.kotlin.services.ssmincidents.model.RelatedItemsUpdate() {
    }

    /**
     * Details about the related item you're deleting.
     */
    public data class ItemToRemove(val value: aws.sdk.kotlin.services.ssmincidents.model.ItemIdentifier) : aws.sdk.kotlin.services.ssmincidents.model.RelatedItemsUpdate() {
    }

    public object SdkUnknown : aws.sdk.kotlin.services.ssmincidents.model.RelatedItemsUpdate() {
    }

    /**
     * Casts this [RelatedItemsUpdate] as a [ItemToAdd] and retrieves its [aws.sdk.kotlin.services.ssmincidents.model.RelatedItem] value. Throws an exception if the [RelatedItemsUpdate] is not a
     * [ItemToAdd].
     */
    public fun asItemToAdd(): aws.sdk.kotlin.services.ssmincidents.model.RelatedItem = (this as RelatedItemsUpdate.ItemToAdd).value

    /**
     * Casts this [RelatedItemsUpdate] as a [ItemToAdd] and retrieves its [aws.sdk.kotlin.services.ssmincidents.model.RelatedItem] value. Returns null if the [RelatedItemsUpdate] is not a [ItemToAdd].
     */
    public fun asItemToAddOrNull(): aws.sdk.kotlin.services.ssmincidents.model.RelatedItem? = (this as? RelatedItemsUpdate.ItemToAdd)?.value

    /**
     * Casts this [RelatedItemsUpdate] as a [ItemToRemove] and retrieves its [aws.sdk.kotlin.services.ssmincidents.model.ItemIdentifier] value. Throws an exception if the [RelatedItemsUpdate] is not a
     * [ItemToRemove].
     */
    public fun asItemToRemove(): aws.sdk.kotlin.services.ssmincidents.model.ItemIdentifier = (this as RelatedItemsUpdate.ItemToRemove).value

    /**
     * Casts this [RelatedItemsUpdate] as a [ItemToRemove] and retrieves its [aws.sdk.kotlin.services.ssmincidents.model.ItemIdentifier] value. Returns null if the [RelatedItemsUpdate] is not a [ItemToRemove].
     */
    public fun asItemToRemoveOrNull(): aws.sdk.kotlin.services.ssmincidents.model.ItemIdentifier? = (this as? RelatedItemsUpdate.ItemToRemove)?.value
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy