
commonMain.aws.sdk.kotlin.services.elasticloadbalancingv2.model.Matcher.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.elasticloadbalancingv2.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The codes to use when checking for a successful response from a target. If the protocol version is gRPC, these are gRPC codes. Otherwise, these are HTTP codes.
*/
public class Matcher private constructor(builder: Builder) {
/**
* You can specify values between 0 and 99. You can specify multiple values (for example, "0,1") or a range of values (for example, "0-5"). The default value is 12.
*/
public val grpcCode: kotlin.String? = builder.grpcCode
/**
* For Application Load Balancers, you can specify values between 200 and 499, with the default value being 200. You can specify multiple values (for example, "200,202") or a range of values (for example, "200-299").
*
* For Network Load Balancers, you can specify values between 200 and 599, with the default value being 200-399. You can specify multiple values (for example, "200,202") or a range of values (for example, "200-299").
*
* For Gateway Load Balancers, this must be "200–399".
*
* Note that when using shorthand syntax, some values such as commas need to be escaped.
*/
public val httpCode: kotlin.String? = builder.httpCode
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.elasticloadbalancingv2.model.Matcher = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Matcher(")
append("grpcCode=$grpcCode,")
append("httpCode=$httpCode")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = grpcCode?.hashCode() ?: 0
result = 31 * result + (httpCode?.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 Matcher
if (grpcCode != other.grpcCode) return false
if (httpCode != other.httpCode) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.elasticloadbalancingv2.model.Matcher = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* You can specify values between 0 and 99. You can specify multiple values (for example, "0,1") or a range of values (for example, "0-5"). The default value is 12.
*/
public var grpcCode: kotlin.String? = null
/**
* For Application Load Balancers, you can specify values between 200 and 499, with the default value being 200. You can specify multiple values (for example, "200,202") or a range of values (for example, "200-299").
*
* For Network Load Balancers, you can specify values between 200 and 599, with the default value being 200-399. You can specify multiple values (for example, "200,202") or a range of values (for example, "200-299").
*
* For Gateway Load Balancers, this must be "200–399".
*
* Note that when using shorthand syntax, some values such as commas need to be escaped.
*/
public var httpCode: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.elasticloadbalancingv2.model.Matcher) : this() {
this.grpcCode = x.grpcCode
this.httpCode = x.httpCode
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.elasticloadbalancingv2.model.Matcher = Matcher(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy