commonMain.aws.sdk.kotlin.services.ssmincidents.model.ItemValue.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
/**
* Describes a related item.
*/
public sealed class ItemValue {
/**
* The Amazon Resource Name (ARN) of the related item, if the related item is an Amazon resource.
*/
public data class Arn(val value: kotlin.String) : aws.sdk.kotlin.services.ssmincidents.model.ItemValue() {
}
/**
* The metric definition, if the related item is a metric in Amazon CloudWatch.
*/
public data class MetricDefinition(val value: kotlin.String) : aws.sdk.kotlin.services.ssmincidents.model.ItemValue() {
}
/**
* Details about an incident that is associated with a PagerDuty incident.
*/
public data class PagerDutyIncidentDetail(val value: aws.sdk.kotlin.services.ssmincidents.model.PagerDutyIncidentDetail) : aws.sdk.kotlin.services.ssmincidents.model.ItemValue() {
}
/**
* The URL, if the related item is a non-Amazon Web Services resource.
*/
public data class Url(val value: kotlin.String) : aws.sdk.kotlin.services.ssmincidents.model.ItemValue() {
}
public object SdkUnknown : aws.sdk.kotlin.services.ssmincidents.model.ItemValue() {
}
/**
* Casts this [ItemValue] as a [Arn] and retrieves its [kotlin.String] value. Throws an exception if the [ItemValue] is not a
* [Arn].
*/
public fun asArn(): kotlin.String = (this as ItemValue.Arn).value
/**
* Casts this [ItemValue] as a [Arn] and retrieves its [kotlin.String] value. Returns null if the [ItemValue] is not a [Arn].
*/
public fun asArnOrNull(): kotlin.String? = (this as? ItemValue.Arn)?.value
/**
* Casts this [ItemValue] as a [MetricDefinition] and retrieves its [kotlin.String] value. Throws an exception if the [ItemValue] is not a
* [MetricDefinition].
*/
public fun asMetricDefinition(): kotlin.String = (this as ItemValue.MetricDefinition).value
/**
* Casts this [ItemValue] as a [MetricDefinition] and retrieves its [kotlin.String] value. Returns null if the [ItemValue] is not a [MetricDefinition].
*/
public fun asMetricDefinitionOrNull(): kotlin.String? = (this as? ItemValue.MetricDefinition)?.value
/**
* Casts this [ItemValue] as a [PagerDutyIncidentDetail] and retrieves its [aws.sdk.kotlin.services.ssmincidents.model.PagerDutyIncidentDetail] value. Throws an exception if the [ItemValue] is not a
* [PagerDutyIncidentDetail].
*/
public fun asPagerDutyIncidentDetail(): aws.sdk.kotlin.services.ssmincidents.model.PagerDutyIncidentDetail = (this as ItemValue.PagerDutyIncidentDetail).value
/**
* Casts this [ItemValue] as a [PagerDutyIncidentDetail] and retrieves its [aws.sdk.kotlin.services.ssmincidents.model.PagerDutyIncidentDetail] value. Returns null if the [ItemValue] is not a [PagerDutyIncidentDetail].
*/
public fun asPagerDutyIncidentDetailOrNull(): aws.sdk.kotlin.services.ssmincidents.model.PagerDutyIncidentDetail? = (this as? ItemValue.PagerDutyIncidentDetail)?.value
/**
* Casts this [ItemValue] as a [Url] and retrieves its [kotlin.String] value. Throws an exception if the [ItemValue] is not a
* [Url].
*/
public fun asUrl(): kotlin.String = (this as ItemValue.Url).value
/**
* Casts this [ItemValue] as a [Url] and retrieves its [kotlin.String] value. Returns null if the [ItemValue] is not a [Url].
*/
public fun asUrlOrNull(): kotlin.String? = (this as? ItemValue.Url)?.value
}