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

commonMain.aws.sdk.kotlin.services.datazone.model.SubscribedPrincipal.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 principal that has the subscription grant for the asset.
 */
public sealed class SubscribedPrincipal {
    /**
     * The project that has the subscription grant.
     */
    public data class Project(val value: aws.sdk.kotlin.services.datazone.model.SubscribedProject) : aws.sdk.kotlin.services.datazone.model.SubscribedPrincipal() {
    }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy