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

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

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
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy