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

commonMain.aws.sdk.kotlin.services.iot.model.AssetPropertyVariant.kt Maven / Gradle / Ivy

There is a newer version: 1.3.99
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.iot.model



/**
 * Contains an asset property value (of a single type).
 */
public sealed class AssetPropertyVariant {
    /**
     * Optional. A string that contains the boolean value (`true` or `false`) of the value entry. Accepts substitution templates.
     */
    public data class BooleanValue(val value: kotlin.String) : aws.sdk.kotlin.services.iot.model.AssetPropertyVariant() {
    }

    /**
     * Optional. A string that contains the double value of the value entry. Accepts substitution templates.
     */
    public data class DoubleValue(val value: kotlin.String) : aws.sdk.kotlin.services.iot.model.AssetPropertyVariant() {
    }

    /**
     * Optional. A string that contains the integer value of the value entry. Accepts substitution templates.
     */
    public data class IntegerValue(val value: kotlin.String) : aws.sdk.kotlin.services.iot.model.AssetPropertyVariant() {
    }

    /**
     * Optional. The string value of the value entry. Accepts substitution templates.
     */
    public data class StringValue(val value: kotlin.String) : aws.sdk.kotlin.services.iot.model.AssetPropertyVariant() {
    }

    public object SdkUnknown : aws.sdk.kotlin.services.iot.model.AssetPropertyVariant() {
    }

    /**
     * Casts this [AssetPropertyVariant] as a [BooleanValue] and retrieves its [kotlin.String] value. Throws an exception if the [AssetPropertyVariant] is not a
     * [BooleanValue].
     */
    public fun asBooleanValue(): kotlin.String = (this as AssetPropertyVariant.BooleanValue).value

    /**
     * Casts this [AssetPropertyVariant] as a [BooleanValue] and retrieves its [kotlin.String] value. Returns null if the [AssetPropertyVariant] is not a [BooleanValue].
     */
    public fun asBooleanValueOrNull(): kotlin.String? = (this as? AssetPropertyVariant.BooleanValue)?.value

    /**
     * Casts this [AssetPropertyVariant] as a [DoubleValue] and retrieves its [kotlin.String] value. Throws an exception if the [AssetPropertyVariant] is not a
     * [DoubleValue].
     */
    public fun asDoubleValue(): kotlin.String = (this as AssetPropertyVariant.DoubleValue).value

    /**
     * Casts this [AssetPropertyVariant] as a [DoubleValue] and retrieves its [kotlin.String] value. Returns null if the [AssetPropertyVariant] is not a [DoubleValue].
     */
    public fun asDoubleValueOrNull(): kotlin.String? = (this as? AssetPropertyVariant.DoubleValue)?.value

    /**
     * Casts this [AssetPropertyVariant] as a [IntegerValue] and retrieves its [kotlin.String] value. Throws an exception if the [AssetPropertyVariant] is not a
     * [IntegerValue].
     */
    public fun asIntegerValue(): kotlin.String = (this as AssetPropertyVariant.IntegerValue).value

    /**
     * Casts this [AssetPropertyVariant] as a [IntegerValue] and retrieves its [kotlin.String] value. Returns null if the [AssetPropertyVariant] is not a [IntegerValue].
     */
    public fun asIntegerValueOrNull(): kotlin.String? = (this as? AssetPropertyVariant.IntegerValue)?.value

    /**
     * Casts this [AssetPropertyVariant] as a [StringValue] and retrieves its [kotlin.String] value. Throws an exception if the [AssetPropertyVariant] is not a
     * [StringValue].
     */
    public fun asStringValue(): kotlin.String = (this as AssetPropertyVariant.StringValue).value

    /**
     * Casts this [AssetPropertyVariant] as a [StringValue] and retrieves its [kotlin.String] value. Returns null if the [AssetPropertyVariant] is not a [StringValue].
     */
    public fun asStringValueOrNull(): kotlin.String? = (this as? AssetPropertyVariant.StringValue)?.value
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy