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

commonMain.aws.sdk.kotlin.services.proton.model.DeploymentState.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.proton.model



/**
 * The detailed data about the current state of the deployment.
 */
public sealed class DeploymentState {
    /**
     * The state of the component associated with the deployment.
     */
    public data class Component(val value: aws.sdk.kotlin.services.proton.model.ComponentState) : aws.sdk.kotlin.services.proton.model.DeploymentState() {
    }

    /**
     * The state of the environment associated with the deployment.
     */
    public data class Environment(val value: aws.sdk.kotlin.services.proton.model.EnvironmentState) : aws.sdk.kotlin.services.proton.model.DeploymentState() {
    }

    /**
     * The state of the service instance associated with the deployment.
     */
    public data class ServiceInstance(val value: aws.sdk.kotlin.services.proton.model.ServiceInstanceState) : aws.sdk.kotlin.services.proton.model.DeploymentState() {
    }

    /**
     * The state of the service pipeline associated with the deployment.
     */
    public data class ServicePipeline(val value: aws.sdk.kotlin.services.proton.model.ServicePipelineState) : aws.sdk.kotlin.services.proton.model.DeploymentState() {
    }

    public object SdkUnknown : aws.sdk.kotlin.services.proton.model.DeploymentState() {
    }

    /**
     * Casts this [DeploymentState] as a [Component] and retrieves its [aws.sdk.kotlin.services.proton.model.ComponentState] value. Throws an exception if the [DeploymentState] is not a
     * [Component].
     */
    public fun asComponent(): aws.sdk.kotlin.services.proton.model.ComponentState = (this as DeploymentState.Component).value

    /**
     * Casts this [DeploymentState] as a [Component] and retrieves its [aws.sdk.kotlin.services.proton.model.ComponentState] value. Returns null if the [DeploymentState] is not a [Component].
     */
    public fun asComponentOrNull(): aws.sdk.kotlin.services.proton.model.ComponentState? = (this as? DeploymentState.Component)?.value

    /**
     * Casts this [DeploymentState] as a [Environment] and retrieves its [aws.sdk.kotlin.services.proton.model.EnvironmentState] value. Throws an exception if the [DeploymentState] is not a
     * [Environment].
     */
    public fun asEnvironment(): aws.sdk.kotlin.services.proton.model.EnvironmentState = (this as DeploymentState.Environment).value

    /**
     * Casts this [DeploymentState] as a [Environment] and retrieves its [aws.sdk.kotlin.services.proton.model.EnvironmentState] value. Returns null if the [DeploymentState] is not a [Environment].
     */
    public fun asEnvironmentOrNull(): aws.sdk.kotlin.services.proton.model.EnvironmentState? = (this as? DeploymentState.Environment)?.value

    /**
     * Casts this [DeploymentState] as a [ServiceInstance] and retrieves its [aws.sdk.kotlin.services.proton.model.ServiceInstanceState] value. Throws an exception if the [DeploymentState] is not a
     * [ServiceInstance].
     */
    public fun asServiceInstance(): aws.sdk.kotlin.services.proton.model.ServiceInstanceState = (this as DeploymentState.ServiceInstance).value

    /**
     * Casts this [DeploymentState] as a [ServiceInstance] and retrieves its [aws.sdk.kotlin.services.proton.model.ServiceInstanceState] value. Returns null if the [DeploymentState] is not a [ServiceInstance].
     */
    public fun asServiceInstanceOrNull(): aws.sdk.kotlin.services.proton.model.ServiceInstanceState? = (this as? DeploymentState.ServiceInstance)?.value

    /**
     * Casts this [DeploymentState] as a [ServicePipeline] and retrieves its [aws.sdk.kotlin.services.proton.model.ServicePipelineState] value. Throws an exception if the [DeploymentState] is not a
     * [ServicePipeline].
     */
    public fun asServicePipeline(): aws.sdk.kotlin.services.proton.model.ServicePipelineState = (this as DeploymentState.ServicePipeline).value

    /**
     * Casts this [DeploymentState] as a [ServicePipeline] and retrieves its [aws.sdk.kotlin.services.proton.model.ServicePipelineState] value. Returns null if the [DeploymentState] is not a [ServicePipeline].
     */
    public fun asServicePipelineOrNull(): aws.sdk.kotlin.services.proton.model.ServicePipelineState? = (this as? DeploymentState.ServicePipeline)?.value
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy