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

commonMain.aws.sdk.kotlin.services.grafana.model.IdpMetadata.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.grafana.model



/**
 * A structure containing the identity provider (IdP) metadata used to integrate the identity provider with this workspace. You can specify the metadata either by providing a URL to its location in the `url` parameter, or by specifying the full metadata in XML format in the `xml` parameter. Specifying both will cause an error.
 */
public sealed class IdpMetadata {
    /**
     * The URL of the location containing the IdP metadata.
     */
    public data class Url(val value: kotlin.String) : aws.sdk.kotlin.services.grafana.model.IdpMetadata() {
    }

    /**
     * The full IdP metadata, in XML format.
     */
    public data class Xml(val value: kotlin.String) : aws.sdk.kotlin.services.grafana.model.IdpMetadata() {
    }

    public object SdkUnknown : aws.sdk.kotlin.services.grafana.model.IdpMetadata() {
    }

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy