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

commonMain.aws.sdk.kotlin.services.appmesh.model.VirtualGatewayTlsValidationContextFileTrust.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.appmesh.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * An object that represents a Transport Layer Security (TLS) validation context trust for a local file.
 */
public class VirtualGatewayTlsValidationContextFileTrust private constructor(builder: Builder) {
    /**
     * The certificate trust chain for a certificate stored on the file system of the virtual node that the proxy is running on.
     */
    public val certificateChain: kotlin.String = requireNotNull(builder.certificateChain) { "A non-null value must be provided for certificateChain" }

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

    override fun toString(): kotlin.String = buildString {
        append("VirtualGatewayTlsValidationContextFileTrust(")
        append("certificateChain=$certificateChain")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = certificateChain.hashCode()
        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 VirtualGatewayTlsValidationContextFileTrust

        if (certificateChain != other.certificateChain) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The certificate trust chain for a certificate stored on the file system of the virtual node that the proxy is running on.
         */
        public var certificateChain: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.appmesh.model.VirtualGatewayTlsValidationContextFileTrust) : this() {
            this.certificateChain = x.certificateChain
        }

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

        internal fun correctErrors(): Builder {
            if (certificateChain == null) certificateChain = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy