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

commonMain.aws.sdk.kotlin.services.codestarconnections.model.GetHostResponse.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.codestarconnections.model

import aws.smithy.kotlin.runtime.SdkDsl

public class GetHostResponse private constructor(builder: Builder) {
    /**
     * The name of the requested host.
     */
    public val name: kotlin.String? = builder.name
    /**
     * The endpoint of the infrastructure represented by the requested host.
     */
    public val providerEndpoint: kotlin.String? = builder.providerEndpoint
    /**
     * The provider type of the requested host, such as GitHub Enterprise Server.
     */
    public val providerType: aws.sdk.kotlin.services.codestarconnections.model.ProviderType? = builder.providerType
    /**
     * The status of the requested host.
     */
    public val status: kotlin.String? = builder.status
    /**
     * The VPC configuration of the requested host.
     */
    public val vpcConfiguration: aws.sdk.kotlin.services.codestarconnections.model.VpcConfiguration? = builder.vpcConfiguration

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

    override fun toString(): kotlin.String = buildString {
        append("GetHostResponse(")
        append("name=$name,")
        append("providerEndpoint=$providerEndpoint,")
        append("providerType=$providerType,")
        append("status=$status,")
        append("vpcConfiguration=$vpcConfiguration")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = name?.hashCode() ?: 0
        result = 31 * result + (providerEndpoint?.hashCode() ?: 0)
        result = 31 * result + (providerType?.hashCode() ?: 0)
        result = 31 * result + (status?.hashCode() ?: 0)
        result = 31 * result + (vpcConfiguration?.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 GetHostResponse

        if (name != other.name) return false
        if (providerEndpoint != other.providerEndpoint) return false
        if (providerType != other.providerType) return false
        if (status != other.status) return false
        if (vpcConfiguration != other.vpcConfiguration) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The name of the requested host.
         */
        public var name: kotlin.String? = null
        /**
         * The endpoint of the infrastructure represented by the requested host.
         */
        public var providerEndpoint: kotlin.String? = null
        /**
         * The provider type of the requested host, such as GitHub Enterprise Server.
         */
        public var providerType: aws.sdk.kotlin.services.codestarconnections.model.ProviderType? = null
        /**
         * The status of the requested host.
         */
        public var status: kotlin.String? = null
        /**
         * The VPC configuration of the requested host.
         */
        public var vpcConfiguration: aws.sdk.kotlin.services.codestarconnections.model.VpcConfiguration? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codestarconnections.model.GetHostResponse) : this() {
            this.name = x.name
            this.providerEndpoint = x.providerEndpoint
            this.providerType = x.providerType
            this.status = x.status
            this.vpcConfiguration = x.vpcConfiguration
        }

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

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

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy