commonMain.aws.sdk.kotlin.services.ssmincidents.model.Condition.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.time.Instant
/**
* A conditional statement with which to compare a value, after a timestamp, before a timestamp, or equal to a string or integer. If multiple conditions are specified, the conditionals become an `AND`ed statement. If multiple values are specified for a conditional, the values are `OR`d.
*/
public sealed class Condition {
/**
* After the specified timestamp.
*/
public data class After(val value: aws.smithy.kotlin.runtime.time.Instant) : aws.sdk.kotlin.services.ssmincidents.model.Condition() {
}
/**
* Before the specified timestamp
*/
public data class Before(val value: aws.smithy.kotlin.runtime.time.Instant) : aws.sdk.kotlin.services.ssmincidents.model.Condition() {
}
/**
* The value is equal to the provided string or integer.
*/
public data class Equals(val value: aws.sdk.kotlin.services.ssmincidents.model.AttributeValueList) : aws.sdk.kotlin.services.ssmincidents.model.Condition() {
}
public object SdkUnknown : aws.sdk.kotlin.services.ssmincidents.model.Condition() {
}
/**
* Casts this [Condition] as a [After] and retrieves its [aws.smithy.kotlin.runtime.time.Instant] value. Throws an exception if the [Condition] is not a
* [After].
*/
public fun asAfter(): aws.smithy.kotlin.runtime.time.Instant = (this as Condition.After).value
/**
* Casts this [Condition] as a [After] and retrieves its [aws.smithy.kotlin.runtime.time.Instant] value. Returns null if the [Condition] is not a [After].
*/
public fun asAfterOrNull(): aws.smithy.kotlin.runtime.time.Instant? = (this as? Condition.After)?.value
/**
* Casts this [Condition] as a [Before] and retrieves its [aws.smithy.kotlin.runtime.time.Instant] value. Throws an exception if the [Condition] is not a
* [Before].
*/
public fun asBefore(): aws.smithy.kotlin.runtime.time.Instant = (this as Condition.Before).value
/**
* Casts this [Condition] as a [Before] and retrieves its [aws.smithy.kotlin.runtime.time.Instant] value. Returns null if the [Condition] is not a [Before].
*/
public fun asBeforeOrNull(): aws.smithy.kotlin.runtime.time.Instant? = (this as? Condition.Before)?.value
/**
* Casts this [Condition] as a [Equals] and retrieves its [aws.sdk.kotlin.services.ssmincidents.model.AttributeValueList] value. Throws an exception if the [Condition] is not a
* [Equals].
*/
public fun asEquals(): aws.sdk.kotlin.services.ssmincidents.model.AttributeValueList = (this as Condition.Equals).value
/**
* Casts this [Condition] as a [Equals] and retrieves its [aws.sdk.kotlin.services.ssmincidents.model.AttributeValueList] value. Returns null if the [Condition] is not a [Equals].
*/
public fun asEqualsOrNull(): aws.sdk.kotlin.services.ssmincidents.model.AttributeValueList? = (this as? Condition.Equals)?.value
}