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

commonMain.aws.sdk.kotlin.services.appfabric.model.Credential.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.appfabric.model



/**
 * Contains credential information for an application.
 */
public sealed class Credential {
    /**
     * Contains API key credential information.
     */
    public data class ApiKeyCredential(val value: aws.sdk.kotlin.services.appfabric.model.ApiKeyCredential) : aws.sdk.kotlin.services.appfabric.model.Credential() {
    }

    /**
     * Contains OAuth2 client credential information.
     */
    public data class Oauth2Credential(val value: aws.sdk.kotlin.services.appfabric.model.Oauth2Credential) : aws.sdk.kotlin.services.appfabric.model.Credential() {
    }

    public object SdkUnknown : aws.sdk.kotlin.services.appfabric.model.Credential() {
    }

    /**
     * Casts this [Credential] as a [ApiKeyCredential] and retrieves its [aws.sdk.kotlin.services.appfabric.model.ApiKeyCredential] value. Throws an exception if the [Credential] is not a
     * [ApiKeyCredential].
     */
    public fun asApiKeyCredential(): aws.sdk.kotlin.services.appfabric.model.ApiKeyCredential = (this as Credential.ApiKeyCredential).value

    /**
     * Casts this [Credential] as a [ApiKeyCredential] and retrieves its [aws.sdk.kotlin.services.appfabric.model.ApiKeyCredential] value. Returns null if the [Credential] is not a [ApiKeyCredential].
     */
    public fun asApiKeyCredentialOrNull(): aws.sdk.kotlin.services.appfabric.model.ApiKeyCredential? = (this as? Credential.ApiKeyCredential)?.value

    /**
     * Casts this [Credential] as a [Oauth2Credential] and retrieves its [aws.sdk.kotlin.services.appfabric.model.Oauth2Credential] value. Throws an exception if the [Credential] is not a
     * [Oauth2Credential].
     */
    public fun asOauth2Credential(): aws.sdk.kotlin.services.appfabric.model.Oauth2Credential = (this as Credential.Oauth2Credential).value

    /**
     * Casts this [Credential] as a [Oauth2Credential] and retrieves its [aws.sdk.kotlin.services.appfabric.model.Oauth2Credential] value. Returns null if the [Credential] is not a [Oauth2Credential].
     */
    public fun asOauth2CredentialOrNull(): aws.sdk.kotlin.services.appfabric.model.Oauth2Credential? = (this as? Credential.Oauth2Credential)?.value
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy