
commonMain.aws.sdk.kotlin.services.appmesh.model.HttpRouteHeader.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 the HTTP header in the request.
*/
public class HttpRouteHeader private constructor(builder: Builder) {
/**
* Specify `True` to match anything except the match criteria. The default value is `False`.
*/
public val invert: kotlin.Boolean? = builder.invert
/**
* The `HeaderMatchMethod` object.
*/
public val match: aws.sdk.kotlin.services.appmesh.model.HeaderMatchMethod? = builder.match
/**
* A name for the HTTP header in the client request that will be matched on.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.appmesh.model.HttpRouteHeader = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("HttpRouteHeader(")
append("invert=$invert,")
append("match=$match,")
append("name=$name")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = invert?.hashCode() ?: 0
result = 31 * result + (match?.hashCode() ?: 0)
result = 31 * result + (name.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 HttpRouteHeader
if (invert != other.invert) return false
if (match != other.match) return false
if (name != other.name) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.appmesh.model.HttpRouteHeader = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Specify `True` to match anything except the match criteria. The default value is `False`.
*/
public var invert: kotlin.Boolean? = null
/**
* The `HeaderMatchMethod` object.
*/
public var match: aws.sdk.kotlin.services.appmesh.model.HeaderMatchMethod? = null
/**
* A name for the HTTP header in the client request that will be matched on.
*/
public var name: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.appmesh.model.HttpRouteHeader) : this() {
this.invert = x.invert
this.match = x.match
this.name = x.name
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.appmesh.model.HttpRouteHeader = HttpRouteHeader(this)
internal fun correctErrors(): Builder {
if (name == null) name = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy