commonMain.aws.sdk.kotlin.services.glue.model.UpdateTriggerRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glue.model
import aws.smithy.kotlin.runtime.SdkDsl
public class UpdateTriggerRequest private constructor(builder: Builder) {
/**
* The name of the trigger to update.
*/
public val name: kotlin.String? = builder.name
/**
* The new values with which to update the trigger.
*/
public val triggerUpdate: aws.sdk.kotlin.services.glue.model.TriggerUpdate? = builder.triggerUpdate
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.UpdateTriggerRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateTriggerRequest(")
append("name=$name,")
append("triggerUpdate=$triggerUpdate")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = name?.hashCode() ?: 0
result = 31 * result + (triggerUpdate?.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 UpdateTriggerRequest
if (name != other.name) return false
if (triggerUpdate != other.triggerUpdate) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.UpdateTriggerRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name of the trigger to update.
*/
public var name: kotlin.String? = null
/**
* The new values with which to update the trigger.
*/
public var triggerUpdate: aws.sdk.kotlin.services.glue.model.TriggerUpdate? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.UpdateTriggerRequest) : this() {
this.name = x.name
this.triggerUpdate = x.triggerUpdate
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.UpdateTriggerRequest = UpdateTriggerRequest(this)
/**
* construct an [aws.sdk.kotlin.services.glue.model.TriggerUpdate] inside the given [block]
*/
public fun triggerUpdate(block: aws.sdk.kotlin.services.glue.model.TriggerUpdate.Builder.() -> kotlin.Unit) {
this.triggerUpdate = aws.sdk.kotlin.services.glue.model.TriggerUpdate.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}