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

commonMain.aws.sdk.kotlin.services.datazone.model.UserPolicyGrantPrincipal.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 user policy grant principal.
 */
public sealed class UserPolicyGrantPrincipal {
    /**
     * The all users grant filter of the user policy grant principal.
     */
    public data class AllUsersGrantFilter(val value: aws.sdk.kotlin.services.datazone.model.AllUsersGrantFilter) : aws.sdk.kotlin.services.datazone.model.UserPolicyGrantPrincipal() {
    }

    /**
     * The user ID of the user policy grant principal.
     */
    public data class UserIdentifier(val value: kotlin.String) : aws.sdk.kotlin.services.datazone.model.UserPolicyGrantPrincipal() {
    }

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

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy