aws.sdk.kotlin.services.sagemaker.model.UpdateContextRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.sagemaker.model
class UpdateContextRequest private constructor(builder: BuilderImpl) {
/**
* The name of the context to update.
*/
val contextName: String? = builder.contextName
/**
* The new description for the context.
*/
val description: String? = builder.description
/**
* The new list of properties. Overwrites the current property list.
*/
val properties: Map? = builder.properties
/**
* A list of properties to remove.
*/
val propertiesToRemove: List? = builder.propertiesToRemove
companion object {
@JvmStatic
fun fluentBuilder(): FluentBuilder = BuilderImpl()
internal fun builder(): DslBuilder = BuilderImpl()
operator fun invoke(block: DslBuilder.() -> kotlin.Unit): UpdateContextRequest = BuilderImpl().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateContextRequest(")
append("contextName=$contextName,")
append("description=$description,")
append("properties=$properties,")
append("propertiesToRemove=$propertiesToRemove)")
}
override fun hashCode(): kotlin.Int {
var result = contextName?.hashCode() ?: 0
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (properties?.hashCode() ?: 0)
result = 31 * result + (propertiesToRemove?.hashCode() ?: 0)
return result
}
override fun equals(other: kotlin.Any?): kotlin.Boolean {
if (this === other) return true
if (javaClass != other?.javaClass) return false
other as UpdateContextRequest
if (contextName != other.contextName) return false
if (description != other.description) return false
if (properties != other.properties) return false
if (propertiesToRemove != other.propertiesToRemove) return false
return true
}
fun copy(block: DslBuilder.() -> kotlin.Unit = {}): UpdateContextRequest = BuilderImpl(this).apply(block).build()
interface FluentBuilder {
fun build(): UpdateContextRequest
/**
* The name of the context to update.
*/
fun contextName(contextName: String): FluentBuilder
/**
* The new description for the context.
*/
fun description(description: String): FluentBuilder
/**
* The new list of properties. Overwrites the current property list.
*/
fun properties(properties: Map): FluentBuilder
/**
* A list of properties to remove.
*/
fun propertiesToRemove(propertiesToRemove: List): FluentBuilder
}
interface DslBuilder {
/**
* The name of the context to update.
*/
var contextName: String?
/**
* The new description for the context.
*/
var description: String?
/**
* The new list of properties. Overwrites the current property list.
*/
var properties: Map?
/**
* A list of properties to remove.
*/
var propertiesToRemove: List?
fun build(): UpdateContextRequest
}
private class BuilderImpl() : FluentBuilder, DslBuilder {
override var contextName: String? = null
override var description: String? = null
override var properties: Map? = null
override var propertiesToRemove: List? = null
constructor(x: UpdateContextRequest) : this() {
this.contextName = x.contextName
this.description = x.description
this.properties = x.properties
this.propertiesToRemove = x.propertiesToRemove
}
override fun build(): UpdateContextRequest = UpdateContextRequest(this)
override fun contextName(contextName: String): FluentBuilder = apply { this.contextName = contextName }
override fun description(description: String): FluentBuilder = apply { this.description = description }
override fun properties(properties: Map): FluentBuilder = apply { this.properties = properties }
override fun propertiesToRemove(propertiesToRemove: List): FluentBuilder = apply { this.propertiesToRemove = propertiesToRemove }
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy