
commonMain.aws.sdk.kotlin.services.appmesh.model.ClientPolicyTls.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
/**
* A reference to an object that represents a Transport Layer Security (TLS) client policy.
*/
public class ClientPolicyTls private constructor(builder: Builder) {
/**
* A reference to an object that represents a client's TLS certificate.
*/
public val certificate: aws.sdk.kotlin.services.appmesh.model.ClientTlsCertificate? = builder.certificate
/**
* Whether the policy is enforced. The default is `True`, if a value isn't specified.
*/
public val enforce: kotlin.Boolean? = builder.enforce
/**
* One or more ports that the policy is enforced for.
*/
public val ports: List? = builder.ports
/**
* A reference to an object that represents a TLS validation context.
*/
public val validation: aws.sdk.kotlin.services.appmesh.model.TlsValidationContext? = builder.validation
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.appmesh.model.ClientPolicyTls = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ClientPolicyTls(")
append("certificate=$certificate,")
append("enforce=$enforce,")
append("ports=$ports,")
append("validation=$validation")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = certificate?.hashCode() ?: 0
result = 31 * result + (enforce?.hashCode() ?: 0)
result = 31 * result + (ports?.hashCode() ?: 0)
result = 31 * result + (validation?.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 ClientPolicyTls
if (certificate != other.certificate) return false
if (enforce != other.enforce) return false
if (ports != other.ports) return false
if (validation != other.validation) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.appmesh.model.ClientPolicyTls = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A reference to an object that represents a client's TLS certificate.
*/
public var certificate: aws.sdk.kotlin.services.appmesh.model.ClientTlsCertificate? = null
/**
* Whether the policy is enforced. The default is `True`, if a value isn't specified.
*/
public var enforce: kotlin.Boolean? = null
/**
* One or more ports that the policy is enforced for.
*/
public var ports: List? = null
/**
* A reference to an object that represents a TLS validation context.
*/
public var validation: aws.sdk.kotlin.services.appmesh.model.TlsValidationContext? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.appmesh.model.ClientPolicyTls) : this() {
this.certificate = x.certificate
this.enforce = x.enforce
this.ports = x.ports
this.validation = x.validation
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.appmesh.model.ClientPolicyTls = ClientPolicyTls(this)
/**
* construct an [aws.sdk.kotlin.services.appmesh.model.TlsValidationContext] inside the given [block]
*/
public fun validation(block: aws.sdk.kotlin.services.appmesh.model.TlsValidationContext.Builder.() -> kotlin.Unit) {
this.validation = aws.sdk.kotlin.services.appmesh.model.TlsValidationContext.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy