commonMain.aws.sdk.kotlin.services.servicediscovery.model.UpdateHttpNamespaceRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.servicediscovery.model
import aws.smithy.kotlin.runtime.SdkDsl
public class UpdateHttpNamespaceRequest private constructor(builder: Builder) {
/**
* The ID of the namespace that you want to update.
*/
public val id: kotlin.String? = builder.id
/**
* Updated properties for the the HTTP namespace.
*/
public val namespace: aws.sdk.kotlin.services.servicediscovery.model.HttpNamespaceChange? = builder.namespace
/**
* A unique string that identifies the request and that allows failed `UpdateHttpNamespace` requests to be retried without the risk of running the operation twice. `UpdaterRequestId` can be any unique string (for example, a date/timestamp).
*/
public val updaterRequestId: kotlin.String? = builder.updaterRequestId
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.servicediscovery.model.UpdateHttpNamespaceRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateHttpNamespaceRequest(")
append("id=$id,")
append("namespace=$namespace,")
append("updaterRequestId=$updaterRequestId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = id?.hashCode() ?: 0
result = 31 * result + (namespace?.hashCode() ?: 0)
result = 31 * result + (updaterRequestId?.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 UpdateHttpNamespaceRequest
if (id != other.id) return false
if (namespace != other.namespace) return false
if (updaterRequestId != other.updaterRequestId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.servicediscovery.model.UpdateHttpNamespaceRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The ID of the namespace that you want to update.
*/
public var id: kotlin.String? = null
/**
* Updated properties for the the HTTP namespace.
*/
public var namespace: aws.sdk.kotlin.services.servicediscovery.model.HttpNamespaceChange? = null
/**
* A unique string that identifies the request and that allows failed `UpdateHttpNamespace` requests to be retried without the risk of running the operation twice. `UpdaterRequestId` can be any unique string (for example, a date/timestamp).
*/
public var updaterRequestId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.servicediscovery.model.UpdateHttpNamespaceRequest) : this() {
this.id = x.id
this.namespace = x.namespace
this.updaterRequestId = x.updaterRequestId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.servicediscovery.model.UpdateHttpNamespaceRequest = UpdateHttpNamespaceRequest(this)
/**
* construct an [aws.sdk.kotlin.services.servicediscovery.model.HttpNamespaceChange] inside the given [block]
*/
public fun namespace(block: aws.sdk.kotlin.services.servicediscovery.model.HttpNamespaceChange.Builder.() -> kotlin.Unit) {
this.namespace = aws.sdk.kotlin.services.servicediscovery.model.HttpNamespaceChange.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy