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

commonMain.aws.sdk.kotlin.services.iotfleetwise.model.CollectionScheme.kt Maven / Gradle / Ivy

The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.iotfleetwise.model



/**
 * Specifies what data to collect and how often or when to collect it.
 */
public sealed class CollectionScheme {
    /**
     * Information about a collection scheme that uses a simple logical expression to recognize what data to collect.
     */
    public data class ConditionBasedCollectionScheme(val value: aws.sdk.kotlin.services.iotfleetwise.model.ConditionBasedCollectionScheme) : aws.sdk.kotlin.services.iotfleetwise.model.CollectionScheme() {
    }

    /**
     * Information about a collection scheme that uses a time period to decide how often to collect data.
     */
    public data class TimeBasedCollectionScheme(val value: aws.sdk.kotlin.services.iotfleetwise.model.TimeBasedCollectionScheme) : aws.sdk.kotlin.services.iotfleetwise.model.CollectionScheme() {
    }

    public object SdkUnknown : aws.sdk.kotlin.services.iotfleetwise.model.CollectionScheme() {
    }

    /**
     * Casts this [CollectionScheme] as a [ConditionBasedCollectionScheme] and retrieves its [aws.sdk.kotlin.services.iotfleetwise.model.ConditionBasedCollectionScheme] value. Throws an exception if the [CollectionScheme] is not a
     * [ConditionBasedCollectionScheme].
     */
    public fun asConditionBasedCollectionScheme(): aws.sdk.kotlin.services.iotfleetwise.model.ConditionBasedCollectionScheme = (this as CollectionScheme.ConditionBasedCollectionScheme).value

    /**
     * Casts this [CollectionScheme] as a [ConditionBasedCollectionScheme] and retrieves its [aws.sdk.kotlin.services.iotfleetwise.model.ConditionBasedCollectionScheme] value. Returns null if the [CollectionScheme] is not a [ConditionBasedCollectionScheme].
     */
    public fun asConditionBasedCollectionSchemeOrNull(): aws.sdk.kotlin.services.iotfleetwise.model.ConditionBasedCollectionScheme? = (this as? CollectionScheme.ConditionBasedCollectionScheme)?.value

    /**
     * Casts this [CollectionScheme] as a [TimeBasedCollectionScheme] and retrieves its [aws.sdk.kotlin.services.iotfleetwise.model.TimeBasedCollectionScheme] value. Throws an exception if the [CollectionScheme] is not a
     * [TimeBasedCollectionScheme].
     */
    public fun asTimeBasedCollectionScheme(): aws.sdk.kotlin.services.iotfleetwise.model.TimeBasedCollectionScheme = (this as CollectionScheme.TimeBasedCollectionScheme).value

    /**
     * Casts this [CollectionScheme] as a [TimeBasedCollectionScheme] and retrieves its [aws.sdk.kotlin.services.iotfleetwise.model.TimeBasedCollectionScheme] value. Returns null if the [CollectionScheme] is not a [TimeBasedCollectionScheme].
     */
    public fun asTimeBasedCollectionSchemeOrNull(): aws.sdk.kotlin.services.iotfleetwise.model.TimeBasedCollectionScheme? = (this as? CollectionScheme.TimeBasedCollectionScheme)?.value
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy