commonMain.aws.sdk.kotlin.services.dataexchange.model.CreateEventActionRequest.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 CreateEventActionRequest private constructor(builder: Builder) {
/**
* What occurs after a certain event.
*/
public val action: aws.sdk.kotlin.services.dataexchange.model.Action? = builder.action
/**
* What occurs to start an action.
*/
public val event: aws.sdk.kotlin.services.dataexchange.model.Event? = builder.event
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.dataexchange.model.CreateEventActionRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateEventActionRequest(")
append("action=$action,")
append("event=$event")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = action?.hashCode() ?: 0
result = 31 * result + (event?.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 CreateEventActionRequest
if (action != other.action) return false
if (event != other.event) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.dataexchange.model.CreateEventActionRequest = 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
/**
* What occurs to start an action.
*/
public var event: aws.sdk.kotlin.services.dataexchange.model.Event? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.dataexchange.model.CreateEventActionRequest) : this() {
this.action = x.action
this.event = x.event
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.dataexchange.model.CreateEventActionRequest = CreateEventActionRequest(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)
}
/**
* construct an [aws.sdk.kotlin.services.dataexchange.model.Event] inside the given [block]
*/
public fun event(block: aws.sdk.kotlin.services.dataexchange.model.Event.Builder.() -> kotlin.Unit) {
this.event = aws.sdk.kotlin.services.dataexchange.model.Event.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}