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

commonMain.aws.sdk.kotlin.services.datazone.model.OwnerProperties.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 a domain unit's owner.
 */
public sealed class OwnerProperties {
    /**
     * Specifies that the domain unit owner is a group.
     */
    public data class Group(val value: aws.sdk.kotlin.services.datazone.model.OwnerGroupProperties) : aws.sdk.kotlin.services.datazone.model.OwnerProperties() {
    }

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

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

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy