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

commonMain.aws.sdk.kotlin.services.datazone.model.DomainUnitOwnerProperties.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.datazone.model



/**
 * The properties of the domain unit owner.
 */
public sealed class DomainUnitOwnerProperties {
    /**
     * Indicates that the domain unit owner is a group.
     */
    public data class Group(val value: aws.sdk.kotlin.services.datazone.model.DomainUnitGroupProperties) : aws.sdk.kotlin.services.datazone.model.DomainUnitOwnerProperties() {
    }

    /**
     * Indicates that the domain unit owner is a user.
     */
    public data class User(val value: aws.sdk.kotlin.services.datazone.model.DomainUnitUserProperties) : aws.sdk.kotlin.services.datazone.model.DomainUnitOwnerProperties() {
    }

    public object SdkUnknown : aws.sdk.kotlin.services.datazone.model.DomainUnitOwnerProperties() {
    }

    /**
     * Casts this [DomainUnitOwnerProperties] as a [Group] and retrieves its [aws.sdk.kotlin.services.datazone.model.DomainUnitGroupProperties] value. Throws an exception if the [DomainUnitOwnerProperties] is not a
     * [Group].
     */
    public fun asGroup(): aws.sdk.kotlin.services.datazone.model.DomainUnitGroupProperties = (this as DomainUnitOwnerProperties.Group).value

    /**
     * Casts this [DomainUnitOwnerProperties] as a [Group] and retrieves its [aws.sdk.kotlin.services.datazone.model.DomainUnitGroupProperties] value. Returns null if the [DomainUnitOwnerProperties] is not a [Group].
     */
    public fun asGroupOrNull(): aws.sdk.kotlin.services.datazone.model.DomainUnitGroupProperties? = (this as? DomainUnitOwnerProperties.Group)?.value

    /**
     * Casts this [DomainUnitOwnerProperties] as a [User] and retrieves its [aws.sdk.kotlin.services.datazone.model.DomainUnitUserProperties] value. Throws an exception if the [DomainUnitOwnerProperties] is not a
     * [User].
     */
    public fun asUser(): aws.sdk.kotlin.services.datazone.model.DomainUnitUserProperties = (this as DomainUnitOwnerProperties.User).value

    /**
     * Casts this [DomainUnitOwnerProperties] as a [User] and retrieves its [aws.sdk.kotlin.services.datazone.model.DomainUnitUserProperties] value. Returns null if the [DomainUnitOwnerProperties] is not a [User].
     */
    public fun asUserOrNull(): aws.sdk.kotlin.services.datazone.model.DomainUnitUserProperties? = (this as? DomainUnitOwnerProperties.User)?.value
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy