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

commonMain.aws.sdk.kotlin.services.rolesanywhere.model.SourceData.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.rolesanywhere.model



/**
 * The data field of the trust anchor depending on its type.
 */
public sealed class SourceData {
    /**
     * The root certificate of the Private Certificate Authority specified by this ARN is used in trust validation for temporary credential requests. Included for trust anchors of type `AWS_ACM_PCA`.
     */
    public data class AcmPcaArn(val value: kotlin.String) : aws.sdk.kotlin.services.rolesanywhere.model.SourceData() {
    }

    /**
     * The PEM-encoded data for the certificate anchor. Included for trust anchors of type `CERTIFICATE_BUNDLE`.
     */
    public data class X509CertificateData(val value: kotlin.String) : aws.sdk.kotlin.services.rolesanywhere.model.SourceData() {
    }

    public object SdkUnknown : aws.sdk.kotlin.services.rolesanywhere.model.SourceData() {
    }

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy