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

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

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

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

import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant

/**
 * Summary data of an Proton component resource.
 *
 * For more information about components, see [Proton components](https://docs.aws.amazon.com/proton/latest/userguide/ag-components.html) in the *Proton User Guide*.
 */
public class ComponentSummary private constructor(builder: Builder) {
    /**
     * The Amazon Resource Name (ARN) of the component.
     */
    public val arn: kotlin.String = requireNotNull(builder.arn) { "A non-null value must be provided for arn" }
    /**
     * The time when the component was created.
     */
    public val createdAt: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.createdAt) { "A non-null value must be provided for createdAt" }
    /**
     * The component deployment status.
     */
    public val deploymentStatus: aws.sdk.kotlin.services.proton.model.DeploymentStatus = requireNotNull(builder.deploymentStatus) { "A non-null value must be provided for deploymentStatus" }
    /**
     * The message associated with the component deployment status.
     */
    public val deploymentStatusMessage: kotlin.String? = builder.deploymentStatusMessage
    /**
     * The name of the Proton environment that this component is associated with.
     */
    public val environmentName: kotlin.String = requireNotNull(builder.environmentName) { "A non-null value must be provided for environmentName" }
    /**
     * The ID of the last attempted deployment of this component.
     */
    public val lastAttemptedDeploymentId: kotlin.String? = builder.lastAttemptedDeploymentId
    /**
     * The time when a deployment of the component was last attempted.
     */
    public val lastDeploymentAttemptedAt: aws.smithy.kotlin.runtime.time.Instant? = builder.lastDeploymentAttemptedAt
    /**
     * The time when the component was last deployed successfully.
     */
    public val lastDeploymentSucceededAt: aws.smithy.kotlin.runtime.time.Instant? = builder.lastDeploymentSucceededAt
    /**
     * The time when the component was last modified.
     */
    public val lastModifiedAt: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.lastModifiedAt) { "A non-null value must be provided for lastModifiedAt" }
    /**
     * The ID of the last successful deployment of this component.
     */
    public val lastSucceededDeploymentId: kotlin.String? = builder.lastSucceededDeploymentId
    /**
     * The name of the component.
     */
    public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
    /**
     * The name of the service instance that this component is attached to. Provided when a component is attached to a service instance.
     */
    public val serviceInstanceName: kotlin.String? = builder.serviceInstanceName
    /**
     * The name of the service that `serviceInstanceName` is associated with. Provided when a component is attached to a service instance.
     */
    public val serviceName: kotlin.String? = builder.serviceName

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.proton.model.ComponentSummary = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("ComponentSummary(")
        append("arn=$arn,")
        append("createdAt=$createdAt,")
        append("deploymentStatus=$deploymentStatus,")
        append("deploymentStatusMessage=*** Sensitive Data Redacted ***,")
        append("environmentName=$environmentName,")
        append("lastAttemptedDeploymentId=$lastAttemptedDeploymentId,")
        append("lastDeploymentAttemptedAt=$lastDeploymentAttemptedAt,")
        append("lastDeploymentSucceededAt=$lastDeploymentSucceededAt,")
        append("lastModifiedAt=$lastModifiedAt,")
        append("lastSucceededDeploymentId=$lastSucceededDeploymentId,")
        append("name=$name,")
        append("serviceInstanceName=$serviceInstanceName,")
        append("serviceName=$serviceName")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = arn.hashCode()
        result = 31 * result + (createdAt.hashCode())
        result = 31 * result + (deploymentStatus.hashCode())
        result = 31 * result + (deploymentStatusMessage?.hashCode() ?: 0)
        result = 31 * result + (environmentName.hashCode())
        result = 31 * result + (lastAttemptedDeploymentId?.hashCode() ?: 0)
        result = 31 * result + (lastDeploymentAttemptedAt?.hashCode() ?: 0)
        result = 31 * result + (lastDeploymentSucceededAt?.hashCode() ?: 0)
        result = 31 * result + (lastModifiedAt.hashCode())
        result = 31 * result + (lastSucceededDeploymentId?.hashCode() ?: 0)
        result = 31 * result + (name.hashCode())
        result = 31 * result + (serviceInstanceName?.hashCode() ?: 0)
        result = 31 * result + (serviceName?.hashCode() ?: 0)
        return result
    }

    override fun equals(other: kotlin.Any?): kotlin.Boolean {
        if (this === other) return true
        if (other == null || this::class != other::class) return false

        other as ComponentSummary

        if (arn != other.arn) return false
        if (createdAt != other.createdAt) return false
        if (deploymentStatus != other.deploymentStatus) return false
        if (deploymentStatusMessage != other.deploymentStatusMessage) return false
        if (environmentName != other.environmentName) return false
        if (lastAttemptedDeploymentId != other.lastAttemptedDeploymentId) return false
        if (lastDeploymentAttemptedAt != other.lastDeploymentAttemptedAt) return false
        if (lastDeploymentSucceededAt != other.lastDeploymentSucceededAt) return false
        if (lastModifiedAt != other.lastModifiedAt) return false
        if (lastSucceededDeploymentId != other.lastSucceededDeploymentId) return false
        if (name != other.name) return false
        if (serviceInstanceName != other.serviceInstanceName) return false
        if (serviceName != other.serviceName) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.proton.model.ComponentSummary = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The Amazon Resource Name (ARN) of the component.
         */
        public var arn: kotlin.String? = null
        /**
         * The time when the component was created.
         */
        public var createdAt: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The component deployment status.
         */
        public var deploymentStatus: aws.sdk.kotlin.services.proton.model.DeploymentStatus? = null
        /**
         * The message associated with the component deployment status.
         */
        public var deploymentStatusMessage: kotlin.String? = null
        /**
         * The name of the Proton environment that this component is associated with.
         */
        public var environmentName: kotlin.String? = null
        /**
         * The ID of the last attempted deployment of this component.
         */
        public var lastAttemptedDeploymentId: kotlin.String? = null
        /**
         * The time when a deployment of the component was last attempted.
         */
        public var lastDeploymentAttemptedAt: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The time when the component was last deployed successfully.
         */
        public var lastDeploymentSucceededAt: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The time when the component was last modified.
         */
        public var lastModifiedAt: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The ID of the last successful deployment of this component.
         */
        public var lastSucceededDeploymentId: kotlin.String? = null
        /**
         * The name of the component.
         */
        public var name: kotlin.String? = null
        /**
         * The name of the service instance that this component is attached to. Provided when a component is attached to a service instance.
         */
        public var serviceInstanceName: kotlin.String? = null
        /**
         * The name of the service that `serviceInstanceName` is associated with. Provided when a component is attached to a service instance.
         */
        public var serviceName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.proton.model.ComponentSummary) : this() {
            this.arn = x.arn
            this.createdAt = x.createdAt
            this.deploymentStatus = x.deploymentStatus
            this.deploymentStatusMessage = x.deploymentStatusMessage
            this.environmentName = x.environmentName
            this.lastAttemptedDeploymentId = x.lastAttemptedDeploymentId
            this.lastDeploymentAttemptedAt = x.lastDeploymentAttemptedAt
            this.lastDeploymentSucceededAt = x.lastDeploymentSucceededAt
            this.lastModifiedAt = x.lastModifiedAt
            this.lastSucceededDeploymentId = x.lastSucceededDeploymentId
            this.name = x.name
            this.serviceInstanceName = x.serviceInstanceName
            this.serviceName = x.serviceName
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.proton.model.ComponentSummary = ComponentSummary(this)

        internal fun correctErrors(): Builder {
            if (arn == null) arn = ""
            if (createdAt == null) createdAt = Instant.fromEpochSeconds(0)
            if (deploymentStatus == null) deploymentStatus = DeploymentStatus.SdkUnknown("no value provided")
            if (environmentName == null) environmentName = ""
            if (lastModifiedAt == null) lastModifiedAt = Instant.fromEpochSeconds(0)
            if (name == null) name = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy