
commonMain.aws.sdk.kotlin.services.appmesh.model.HttpQueryParameter.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 query parameter in the request.
*/
public class HttpQueryParameter private constructor(builder: Builder) {
/**
* The query parameter to match on.
*/
public val match: aws.sdk.kotlin.services.appmesh.model.QueryParameterMatch? = builder.match
/**
* A name for the query parameter 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.HttpQueryParameter = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("HttpQueryParameter(")
append("match=$match,")
append("name=$name")
append(")")
}
override fun hashCode(): kotlin.Int {
var 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 HttpQueryParameter
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.HttpQueryParameter = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The query parameter to match on.
*/
public var match: aws.sdk.kotlin.services.appmesh.model.QueryParameterMatch? = null
/**
* A name for the query parameter that will be matched on.
*/
public var name: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.appmesh.model.HttpQueryParameter) : this() {
this.match = x.match
this.name = x.name
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.appmesh.model.HttpQueryParameter = HttpQueryParameter(this)
/**
* construct an [aws.sdk.kotlin.services.appmesh.model.QueryParameterMatch] inside the given [block]
*/
public fun match(block: aws.sdk.kotlin.services.appmesh.model.QueryParameterMatch.Builder.() -> kotlin.Unit) {
this.match = aws.sdk.kotlin.services.appmesh.model.QueryParameterMatch.invoke(block)
}
internal fun correctErrors(): Builder {
if (name == null) name = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy