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

commonMain.aws.sdk.kotlin.services.appmesh.model.LoggingFormat.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.appmesh.model



/**
 * An object that represents the format for the logs.
 */
public sealed class LoggingFormat {
    /**
     *
     */
    public data class Json(val value: List) : aws.sdk.kotlin.services.appmesh.model.LoggingFormat() {
    }

    /**
     *
     */
    public data class Text(val value: kotlin.String) : aws.sdk.kotlin.services.appmesh.model.LoggingFormat() {
    }

    public object SdkUnknown : aws.sdk.kotlin.services.appmesh.model.LoggingFormat() {
    }

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy