commonMain.aws.sdk.kotlin.services.cloudwatchevents.model.RemoveTargetsRequest.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 RemoveTargetsRequest 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
/**
* If this is a managed rule, created by an Amazon Web Services service on your behalf, you must specify `Force` as `True` to remove targets. This parameter is ignored for rules that are not managed rules. You can check whether a rule is a managed rule by using `DescribeRule` or `ListRules` and checking the `ManagedBy` field of the response.
*/
public val force: kotlin.Boolean? = builder.force
/**
* The IDs of the targets to remove from the rule.
*/
public val ids: List? = builder.ids
/**
* The name of the rule.
*/
public val rule: kotlin.String? = builder.rule
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cloudwatchevents.model.RemoveTargetsRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("RemoveTargetsRequest(")
append("eventBusName=$eventBusName,")
append("force=$force,")
append("ids=$ids,")
append("rule=$rule")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = eventBusName?.hashCode() ?: 0
result = 31 * result + (force?.hashCode() ?: 0)
result = 31 * result + (ids?.hashCode() ?: 0)
result = 31 * result + (rule?.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 RemoveTargetsRequest
if (eventBusName != other.eventBusName) return false
if (force != other.force) return false
if (ids != other.ids) return false
if (rule != other.rule) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cloudwatchevents.model.RemoveTargetsRequest = 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
/**
* If this is a managed rule, created by an Amazon Web Services service on your behalf, you must specify `Force` as `True` to remove targets. This parameter is ignored for rules that are not managed rules. You can check whether a rule is a managed rule by using `DescribeRule` or `ListRules` and checking the `ManagedBy` field of the response.
*/
public var force: kotlin.Boolean? = null
/**
* The IDs of the targets to remove from the rule.
*/
public var ids: List? = null
/**
* The name of the rule.
*/
public var rule: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cloudwatchevents.model.RemoveTargetsRequest) : this() {
this.eventBusName = x.eventBusName
this.force = x.force
this.ids = x.ids
this.rule = x.rule
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cloudwatchevents.model.RemoveTargetsRequest = RemoveTargetsRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}