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

commonMain.aws.sdk.kotlin.services.datazone.model.MemberDetails.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 details about a project member.
 */
public sealed class MemberDetails {
    /**
     * The group details of a project member.
     */
    public data class Group(val value: aws.sdk.kotlin.services.datazone.model.GroupDetails) : aws.sdk.kotlin.services.datazone.model.MemberDetails() {
    }

    /**
     * The user details of a project member.
     */
    public data class User(val value: aws.sdk.kotlin.services.datazone.model.UserDetails) : aws.sdk.kotlin.services.datazone.model.MemberDetails() {
    }

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

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy