commonMain.aws.sdk.kotlin.services.dataexchange.model.UpdateEventActionRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dataexchange-jvm Show documentation
Show all versions of dataexchange-jvm Show documentation
The AWS Kotlin client for DataExchange
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.dataexchange.model
import aws.smithy.kotlin.runtime.SdkDsl
public class UpdateEventActionRequest private constructor(builder: Builder) {
/**
* What occurs after a certain event.
*/
public val action: aws.sdk.kotlin.services.dataexchange.model.Action? = builder.action
/**
* The unique identifier for the event action.
*/
public val eventActionId: kotlin.String = requireNotNull(builder.eventActionId) { "A non-null value must be provided for eventActionId" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.dataexchange.model.UpdateEventActionRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateEventActionRequest(")
append("action=$action,")
append("eventActionId=$eventActionId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = action?.hashCode() ?: 0
result = 31 * result + (eventActionId.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 UpdateEventActionRequest
if (action != other.action) return false
if (eventActionId != other.eventActionId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.dataexchange.model.UpdateEventActionRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* What occurs after a certain event.
*/
public var action: aws.sdk.kotlin.services.dataexchange.model.Action? = null
/**
* The unique identifier for the event action.
*/
public var eventActionId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.dataexchange.model.UpdateEventActionRequest) : this() {
this.action = x.action
this.eventActionId = x.eventActionId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.dataexchange.model.UpdateEventActionRequest = UpdateEventActionRequest(this)
/**
* construct an [aws.sdk.kotlin.services.dataexchange.model.Action] inside the given [block]
*/
public fun action(block: aws.sdk.kotlin.services.dataexchange.model.Action.Builder.() -> kotlin.Unit) {
this.action = aws.sdk.kotlin.services.dataexchange.model.Action.invoke(block)
}
internal fun correctErrors(): Builder {
if (eventActionId == null) eventActionId = ""
return this
}
}
}