commonMain.aws.sdk.kotlin.services.cloudwatchevents.model.PutTargetsRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cloudwatchevents-jvm Show documentation
Show all versions of cloudwatchevents-jvm Show documentation
The AWS SDK for Kotlin client for CloudWatch Events
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.cloudwatchevents.model
import aws.smithy.kotlin.runtime.SdkDsl
public class PutTargetsRequest private constructor(builder: Builder) {
/**
* The name or ARN of the event bus associated with the rule. If you omit this, the default event bus is used.
*/
public val eventBusName: kotlin.String? = builder.eventBusName
/**
* The name of the rule.
*/
public val rule: kotlin.String? = builder.rule
/**
* The targets to update or add to the rule.
*/
public val targets: List? = builder.targets
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cloudwatchevents.model.PutTargetsRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PutTargetsRequest(")
append("eventBusName=$eventBusName,")
append("rule=$rule,")
append("targets=$targets")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = eventBusName?.hashCode() ?: 0
result = 31 * result + (rule?.hashCode() ?: 0)
result = 31 * result + (targets?.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 PutTargetsRequest
if (eventBusName != other.eventBusName) return false
if (rule != other.rule) return false
if (targets != other.targets) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cloudwatchevents.model.PutTargetsRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name or ARN of the event bus associated with the rule. If you omit this, the default event bus is used.
*/
public var eventBusName: kotlin.String? = null
/**
* The name of the rule.
*/
public var rule: kotlin.String? = null
/**
* The targets to update or add to the rule.
*/
public var targets: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cloudwatchevents.model.PutTargetsRequest) : this() {
this.eventBusName = x.eventBusName
this.rule = x.rule
this.targets = x.targets
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cloudwatchevents.model.PutTargetsRequest = PutTargetsRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}