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

commonMain.aws.sdk.kotlin.services.connectcases.model.AuditEventFieldValueUnion.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.connectcases.model



/**
 * Object to store union of Field values.
 *
 * This data type is a UNION, so only one of the following members can be specified when used or returned.
 */
public sealed class AuditEventFieldValueUnion {
    /**
     * Can be either null, or have a Boolean value type. Only one value can be provided.
     */
    public data class BooleanValue(val value: kotlin.Boolean) : aws.sdk.kotlin.services.connectcases.model.AuditEventFieldValueUnion() {
    }

    /**
     * Can be either null, or have a Double value type. Only one value can be provided.
     */
    public data class DoubleValue(val value: kotlin.Double) : aws.sdk.kotlin.services.connectcases.model.AuditEventFieldValueUnion() {
    }

    /**
     * An empty value. You cannot set `EmptyFieldValue` on a field that is required on a case template.
     *
     * This structure will never have any data members. It signifies an empty value on a case field.
     */
    public data class EmptyValue(val value: aws.sdk.kotlin.services.connectcases.model.EmptyFieldValue) : aws.sdk.kotlin.services.connectcases.model.AuditEventFieldValueUnion() {
    }

    /**
     * Can be either null, or have a String value type. Only one value can be provided.
     */
    public data class StringValue(val value: kotlin.String) : aws.sdk.kotlin.services.connectcases.model.AuditEventFieldValueUnion() {
    }

    /**
     * Can be either null, or have a String value type formatted as an ARN. Only one value can be provided.
     */
    public data class UserArnValue(val value: kotlin.String) : aws.sdk.kotlin.services.connectcases.model.AuditEventFieldValueUnion() {
    }

    public object SdkUnknown : aws.sdk.kotlin.services.connectcases.model.AuditEventFieldValueUnion() {
    }

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

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

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

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

    /**
     * Casts this [AuditEventFieldValueUnion] as a [EmptyValue] and retrieves its [aws.sdk.kotlin.services.connectcases.model.EmptyFieldValue] value. Throws an exception if the [AuditEventFieldValueUnion] is not a
     * [EmptyValue].
     */
    public fun asEmptyValue(): aws.sdk.kotlin.services.connectcases.model.EmptyFieldValue = (this as AuditEventFieldValueUnion.EmptyValue).value

    /**
     * Casts this [AuditEventFieldValueUnion] as a [EmptyValue] and retrieves its [aws.sdk.kotlin.services.connectcases.model.EmptyFieldValue] value. Returns null if the [AuditEventFieldValueUnion] is not a [EmptyValue].
     */
    public fun asEmptyValueOrNull(): aws.sdk.kotlin.services.connectcases.model.EmptyFieldValue? = (this as? AuditEventFieldValueUnion.EmptyValue)?.value

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy