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

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

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

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



/**
 * The structured message for the message signal. It can be defined with either a `primitiveMessageDefinition`, `structuredMessageListDefinition`, or `structuredMessageDefinition` recursively.
 */
public sealed class StructuredMessage {
    /**
     * Represents a primitive type node of the complex data structure.
     */
    public data class PrimitiveMessageDefinition(val value: aws.sdk.kotlin.services.iotfleetwise.model.PrimitiveMessageDefinition) : aws.sdk.kotlin.services.iotfleetwise.model.StructuredMessage() {
    }

    /**
     * Represents a struct type node of the complex data structure.
     */
    public data class StructuredMessageDefinition(val value: List) : aws.sdk.kotlin.services.iotfleetwise.model.StructuredMessage() {
    }

    /**
     * Represents a list type node of the complex data structure.
     */
    public data class StructuredMessageListDefinition(val value: aws.sdk.kotlin.services.iotfleetwise.model.StructuredMessageListDefinition) : aws.sdk.kotlin.services.iotfleetwise.model.StructuredMessage() {
    }

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

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

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

    /**
     * Casts this [StructuredMessage] as a [StructuredMessageDefinition] and retrieves its [List] value. Throws an exception if the [StructuredMessage] is not a
     * [StructuredMessageDefinition].
     */
    public fun asStructuredMessageDefinition(): List = (this as StructuredMessage.StructuredMessageDefinition).value

    /**
     * Casts this [StructuredMessage] as a [StructuredMessageDefinition] and retrieves its [List] value. Returns null if the [StructuredMessage] is not a [StructuredMessageDefinition].
     */
    public fun asStructuredMessageDefinitionOrNull(): List? = (this as? StructuredMessage.StructuredMessageDefinition)?.value

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy