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

commonMain.aws.sdk.kotlin.services.codecatalyst.model.GetDevEnvironmentResponse.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.codecatalyst.model

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

public class GetDevEnvironmentResponse private constructor(builder: Builder) {
    /**
     * The user-specified alias for the Dev Environment.
     */
    public val alias: kotlin.String? = builder.alias
    /**
     * The system-generated unique ID of the user who created the Dev Environment.
     */
    public val creatorId: kotlin.String = requireNotNull(builder.creatorId) { "A non-null value must be provided for creatorId" }
    /**
     * The system-generated unique ID of the Dev Environment.
     */
    public val id: kotlin.String = requireNotNull(builder.id) { "A non-null value must be provided for id" }
    /**
     * Information about the integrated development environment (IDE) configured for the Dev Environment.
     */
    public val ides: List? = builder.ides
    /**
     * The amount of time the Dev Environment will run without any activity detected before stopping, in minutes.
     */
    public val inactivityTimeoutMinutes: kotlin.Int = builder.inactivityTimeoutMinutes
    /**
     * The Amazon EC2 instace type to use for the Dev Environment.
     */
    public val instanceType: aws.sdk.kotlin.services.codecatalyst.model.InstanceType = requireNotNull(builder.instanceType) { "A non-null value must be provided for instanceType" }
    /**
     * The time when the Dev Environment was last updated, in coordinated universal time (UTC) timestamp format as specified in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339#section-5.6).
     */
    public val lastUpdatedTime: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.lastUpdatedTime) { "A non-null value must be provided for lastUpdatedTime" }
    /**
     * Information about the amount of storage allocated to the Dev Environment. By default, a Dev Environment is configured to have 16GB of persistent storage.
     */
    public val persistentStorage: aws.sdk.kotlin.services.codecatalyst.model.PersistentStorage? = builder.persistentStorage
    /**
     * The name of the project in the space.
     */
    public val projectName: kotlin.String = requireNotNull(builder.projectName) { "A non-null value must be provided for projectName" }
    /**
     * The source repository that contains the branch cloned into the Dev Environment.
     */
    public val repositories: List = requireNotNull(builder.repositories) { "A non-null value must be provided for repositories" }
    /**
     * The name of the space.
     */
    public val spaceName: kotlin.String = requireNotNull(builder.spaceName) { "A non-null value must be provided for spaceName" }
    /**
     * The current status of the Dev Environment.
     */
    public val status: aws.sdk.kotlin.services.codecatalyst.model.DevEnvironmentStatus = requireNotNull(builder.status) { "A non-null value must be provided for status" }
    /**
     * The reason for the status.
     */
    public val statusReason: kotlin.String? = builder.statusReason
    /**
     * The name of the connection used to connect to Amazon VPC used when the Dev Environment was created, if any.
     */
    public val vpcConnectionName: kotlin.String? = builder.vpcConnectionName

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

    override fun toString(): kotlin.String = buildString {
        append("GetDevEnvironmentResponse(")
        append("alias=$alias,")
        append("creatorId=$creatorId,")
        append("id=$id,")
        append("ides=$ides,")
        append("inactivityTimeoutMinutes=$inactivityTimeoutMinutes,")
        append("instanceType=$instanceType,")
        append("lastUpdatedTime=$lastUpdatedTime,")
        append("persistentStorage=$persistentStorage,")
        append("projectName=$projectName,")
        append("repositories=$repositories,")
        append("spaceName=$spaceName,")
        append("status=$status,")
        append("statusReason=$statusReason,")
        append("vpcConnectionName=$vpcConnectionName")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = alias?.hashCode() ?: 0
        result = 31 * result + (creatorId.hashCode())
        result = 31 * result + (id.hashCode())
        result = 31 * result + (ides?.hashCode() ?: 0)
        result = 31 * result + (inactivityTimeoutMinutes)
        result = 31 * result + (instanceType.hashCode())
        result = 31 * result + (lastUpdatedTime.hashCode())
        result = 31 * result + (persistentStorage?.hashCode() ?: 0)
        result = 31 * result + (projectName.hashCode())
        result = 31 * result + (repositories.hashCode())
        result = 31 * result + (spaceName.hashCode())
        result = 31 * result + (status.hashCode())
        result = 31 * result + (statusReason?.hashCode() ?: 0)
        result = 31 * result + (vpcConnectionName?.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 GetDevEnvironmentResponse

        if (alias != other.alias) return false
        if (creatorId != other.creatorId) return false
        if (id != other.id) return false
        if (ides != other.ides) return false
        if (inactivityTimeoutMinutes != other.inactivityTimeoutMinutes) return false
        if (instanceType != other.instanceType) return false
        if (lastUpdatedTime != other.lastUpdatedTime) return false
        if (persistentStorage != other.persistentStorage) return false
        if (projectName != other.projectName) return false
        if (repositories != other.repositories) return false
        if (spaceName != other.spaceName) return false
        if (status != other.status) return false
        if (statusReason != other.statusReason) return false
        if (vpcConnectionName != other.vpcConnectionName) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The user-specified alias for the Dev Environment.
         */
        public var alias: kotlin.String? = null
        /**
         * The system-generated unique ID of the user who created the Dev Environment.
         */
        public var creatorId: kotlin.String? = null
        /**
         * The system-generated unique ID of the Dev Environment.
         */
        public var id: kotlin.String? = null
        /**
         * Information about the integrated development environment (IDE) configured for the Dev Environment.
         */
        public var ides: List? = null
        /**
         * The amount of time the Dev Environment will run without any activity detected before stopping, in minutes.
         */
        public var inactivityTimeoutMinutes: kotlin.Int = 0
        /**
         * The Amazon EC2 instace type to use for the Dev Environment.
         */
        public var instanceType: aws.sdk.kotlin.services.codecatalyst.model.InstanceType? = null
        /**
         * The time when the Dev Environment was last updated, in coordinated universal time (UTC) timestamp format as specified in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339#section-5.6).
         */
        public var lastUpdatedTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * Information about the amount of storage allocated to the Dev Environment. By default, a Dev Environment is configured to have 16GB of persistent storage.
         */
        public var persistentStorage: aws.sdk.kotlin.services.codecatalyst.model.PersistentStorage? = null
        /**
         * The name of the project in the space.
         */
        public var projectName: kotlin.String? = null
        /**
         * The source repository that contains the branch cloned into the Dev Environment.
         */
        public var repositories: List? = null
        /**
         * The name of the space.
         */
        public var spaceName: kotlin.String? = null
        /**
         * The current status of the Dev Environment.
         */
        public var status: aws.sdk.kotlin.services.codecatalyst.model.DevEnvironmentStatus? = null
        /**
         * The reason for the status.
         */
        public var statusReason: kotlin.String? = null
        /**
         * The name of the connection used to connect to Amazon VPC used when the Dev Environment was created, if any.
         */
        public var vpcConnectionName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codecatalyst.model.GetDevEnvironmentResponse) : this() {
            this.alias = x.alias
            this.creatorId = x.creatorId
            this.id = x.id
            this.ides = x.ides
            this.inactivityTimeoutMinutes = x.inactivityTimeoutMinutes
            this.instanceType = x.instanceType
            this.lastUpdatedTime = x.lastUpdatedTime
            this.persistentStorage = x.persistentStorage
            this.projectName = x.projectName
            this.repositories = x.repositories
            this.spaceName = x.spaceName
            this.status = x.status
            this.statusReason = x.statusReason
            this.vpcConnectionName = x.vpcConnectionName
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.codecatalyst.model.PersistentStorage] inside the given [block]
         */
        public fun persistentStorage(block: aws.sdk.kotlin.services.codecatalyst.model.PersistentStorage.Builder.() -> kotlin.Unit) {
            this.persistentStorage = aws.sdk.kotlin.services.codecatalyst.model.PersistentStorage.invoke(block)
        }

        internal fun correctErrors(): Builder {
            if (creatorId == null) creatorId = ""
            if (id == null) id = ""
            if (instanceType == null) instanceType = InstanceType.SdkUnknown("no value provided")
            if (lastUpdatedTime == null) lastUpdatedTime = Instant.fromEpochSeconds(0)
            if (projectName == null) projectName = ""
            if (repositories == null) repositories = emptyList()
            if (spaceName == null) spaceName = ""
            if (status == null) status = DevEnvironmentStatus.SdkUnknown("no value provided")
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy