
commonMain.aws.sdk.kotlin.services.appmesh.model.TlsValidationContext.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 how the proxy will validate its peer during Transport Layer Security (TLS) negotiation.
*/
public class TlsValidationContext private constructor(builder: Builder) {
/**
* A reference to an object that represents the SANs for a Transport Layer Security (TLS) validation context. If you don't specify SANs on the *terminating* mesh endpoint, the Envoy proxy for that node doesn't verify the SAN on a peer client certificate. If you don't specify SANs on the *originating* mesh endpoint, the SAN on the certificate provided by the terminating endpoint must match the mesh endpoint service discovery configuration. Since SPIRE vended certificates have a SPIFFE ID as a name, you must set the SAN since the name doesn't match the service discovery name.
*/
public val subjectAlternativeNames: aws.sdk.kotlin.services.appmesh.model.SubjectAlternativeNames? = builder.subjectAlternativeNames
/**
* A reference to where to retrieve the trust chain when validating a peer’s Transport Layer Security (TLS) certificate.
*/
public val trust: aws.sdk.kotlin.services.appmesh.model.TlsValidationContextTrust? = builder.trust
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.appmesh.model.TlsValidationContext = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("TlsValidationContext(")
append("subjectAlternativeNames=$subjectAlternativeNames,")
append("trust=$trust")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = subjectAlternativeNames?.hashCode() ?: 0
result = 31 * result + (trust?.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 TlsValidationContext
if (subjectAlternativeNames != other.subjectAlternativeNames) return false
if (trust != other.trust) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.appmesh.model.TlsValidationContext = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A reference to an object that represents the SANs for a Transport Layer Security (TLS) validation context. If you don't specify SANs on the *terminating* mesh endpoint, the Envoy proxy for that node doesn't verify the SAN on a peer client certificate. If you don't specify SANs on the *originating* mesh endpoint, the SAN on the certificate provided by the terminating endpoint must match the mesh endpoint service discovery configuration. Since SPIRE vended certificates have a SPIFFE ID as a name, you must set the SAN since the name doesn't match the service discovery name.
*/
public var subjectAlternativeNames: aws.sdk.kotlin.services.appmesh.model.SubjectAlternativeNames? = null
/**
* A reference to where to retrieve the trust chain when validating a peer’s Transport Layer Security (TLS) certificate.
*/
public var trust: aws.sdk.kotlin.services.appmesh.model.TlsValidationContextTrust? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.appmesh.model.TlsValidationContext) : this() {
this.subjectAlternativeNames = x.subjectAlternativeNames
this.trust = x.trust
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.appmesh.model.TlsValidationContext = TlsValidationContext(this)
/**
* construct an [aws.sdk.kotlin.services.appmesh.model.SubjectAlternativeNames] inside the given [block]
*/
public fun subjectAlternativeNames(block: aws.sdk.kotlin.services.appmesh.model.SubjectAlternativeNames.Builder.() -> kotlin.Unit) {
this.subjectAlternativeNames = aws.sdk.kotlin.services.appmesh.model.SubjectAlternativeNames.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy