commonMain.aws.sdk.kotlin.services.cloudwatchevents.model.DeleteRuleRequest.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 DeleteRuleRequest 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 delete the rule. 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 name of the rule.
*/
public val name: kotlin.String? = builder.name
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cloudwatchevents.model.DeleteRuleRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("DeleteRuleRequest(")
append("eventBusName=$eventBusName,")
append("force=$force,")
append("name=$name")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = eventBusName?.hashCode() ?: 0
result = 31 * result + (force?.hashCode() ?: 0)
result = 31 * result + (name?.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 DeleteRuleRequest
if (eventBusName != other.eventBusName) return false
if (force != other.force) return false
if (name != other.name) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cloudwatchevents.model.DeleteRuleRequest = 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 delete the rule. 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 name of the rule.
*/
public var name: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cloudwatchevents.model.DeleteRuleRequest) : this() {
this.eventBusName = x.eventBusName
this.force = x.force
this.name = x.name
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cloudwatchevents.model.DeleteRuleRequest = DeleteRuleRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}