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

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

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

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

import aws.smithy.kotlin.runtime.SdkDsl

public class UpdateHostRequest private constructor(builder: Builder) {
    /**
     * The Amazon Resource Name (ARN) of the host to be updated.
     */
    public val hostArn: kotlin.String? = builder.hostArn
    /**
     * The URL or endpoint of the host to be updated.
     */
    public val providerEndpoint: kotlin.String? = builder.providerEndpoint
    /**
     * The VPC configuration of the host to be updated. A VPC must be configured and the infrastructure to be represented by the host must already be connected to the VPC.
     */
    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.UpdateHostRequest = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("UpdateHostRequest(")
        append("hostArn=$hostArn,")
        append("providerEndpoint=$providerEndpoint,")
        append("vpcConfiguration=$vpcConfiguration")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = hostArn?.hashCode() ?: 0
        result = 31 * result + (providerEndpoint?.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 UpdateHostRequest

        if (hostArn != other.hostArn) return false
        if (providerEndpoint != other.providerEndpoint) return false
        if (vpcConfiguration != other.vpcConfiguration) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The Amazon Resource Name (ARN) of the host to be updated.
         */
        public var hostArn: kotlin.String? = null
        /**
         * The URL or endpoint of the host to be updated.
         */
        public var providerEndpoint: kotlin.String? = null
        /**
         * The VPC configuration of the host to be updated. A VPC must be configured and the infrastructure to be represented by the host must already be connected to the VPC.
         */
        public var vpcConfiguration: aws.sdk.kotlin.services.codestarconnections.model.VpcConfiguration? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codestarconnections.model.UpdateHostRequest) : this() {
            this.hostArn = x.hostArn
            this.providerEndpoint = x.providerEndpoint
            this.vpcConfiguration = x.vpcConfiguration
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.codestarconnections.model.UpdateHostRequest = UpdateHostRequest(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