commonMain.aws.sdk.kotlin.services.cloudwatchevents.model.DescribeRuleResponse.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 DescribeRuleResponse private constructor(builder: Builder) {
/**
* The Amazon Resource Name (ARN) of the rule.
*/
public val arn: kotlin.String? = builder.arn
/**
* The account ID of the user that created the rule. If you use `PutRule` to put a rule on an event bus in another account, the other account is the owner of the rule, and the rule ARN includes the account ID for that account. However, the value for `CreatedBy` is the account ID as the account that created the rule in the other account.
*/
public val createdBy: kotlin.String? = builder.createdBy
/**
* The description of the rule.
*/
public val description: kotlin.String? = builder.description
/**
* The name of the event bus associated with the rule.
*/
public val eventBusName: kotlin.String? = builder.eventBusName
/**
* The event pattern. For more information, see [Events and Event Patterns](https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-and-event-patterns.html) in the *Amazon EventBridge User Guide*.
*/
public val eventPattern: kotlin.String? = builder.eventPattern
/**
* If this is a managed rule, created by an Amazon Web Services service on your behalf, this field displays the principal name of the Amazon Web Services service that created the rule.
*/
public val managedBy: kotlin.String? = builder.managedBy
/**
* The name of the rule.
*/
public val name: kotlin.String? = builder.name
/**
* The Amazon Resource Name (ARN) of the IAM role associated with the rule.
*/
public val roleArn: kotlin.String? = builder.roleArn
/**
* The scheduling expression. For example, "cron(0 20 * * ? *)", "rate(5 minutes)".
*/
public val scheduleExpression: kotlin.String? = builder.scheduleExpression
/**
* Specifies whether the rule is enabled or disabled.
*/
public val state: aws.sdk.kotlin.services.cloudwatchevents.model.RuleState? = builder.state
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cloudwatchevents.model.DescribeRuleResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("DescribeRuleResponse(")
append("arn=$arn,")
append("createdBy=$createdBy,")
append("description=$description,")
append("eventBusName=$eventBusName,")
append("eventPattern=$eventPattern,")
append("managedBy=$managedBy,")
append("name=$name,")
append("roleArn=$roleArn,")
append("scheduleExpression=$scheduleExpression,")
append("state=$state")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = arn?.hashCode() ?: 0
result = 31 * result + (createdBy?.hashCode() ?: 0)
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (eventBusName?.hashCode() ?: 0)
result = 31 * result + (eventPattern?.hashCode() ?: 0)
result = 31 * result + (managedBy?.hashCode() ?: 0)
result = 31 * result + (name?.hashCode() ?: 0)
result = 31 * result + (roleArn?.hashCode() ?: 0)
result = 31 * result + (scheduleExpression?.hashCode() ?: 0)
result = 31 * result + (state?.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 DescribeRuleResponse
if (arn != other.arn) return false
if (createdBy != other.createdBy) return false
if (description != other.description) return false
if (eventBusName != other.eventBusName) return false
if (eventPattern != other.eventPattern) return false
if (managedBy != other.managedBy) return false
if (name != other.name) return false
if (roleArn != other.roleArn) return false
if (scheduleExpression != other.scheduleExpression) return false
if (state != other.state) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cloudwatchevents.model.DescribeRuleResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Amazon Resource Name (ARN) of the rule.
*/
public var arn: kotlin.String? = null
/**
* The account ID of the user that created the rule. If you use `PutRule` to put a rule on an event bus in another account, the other account is the owner of the rule, and the rule ARN includes the account ID for that account. However, the value for `CreatedBy` is the account ID as the account that created the rule in the other account.
*/
public var createdBy: kotlin.String? = null
/**
* The description of the rule.
*/
public var description: kotlin.String? = null
/**
* The name of the event bus associated with the rule.
*/
public var eventBusName: kotlin.String? = null
/**
* The event pattern. For more information, see [Events and Event Patterns](https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-and-event-patterns.html) in the *Amazon EventBridge User Guide*.
*/
public var eventPattern: kotlin.String? = null
/**
* If this is a managed rule, created by an Amazon Web Services service on your behalf, this field displays the principal name of the Amazon Web Services service that created the rule.
*/
public var managedBy: kotlin.String? = null
/**
* The name of the rule.
*/
public var name: kotlin.String? = null
/**
* The Amazon Resource Name (ARN) of the IAM role associated with the rule.
*/
public var roleArn: kotlin.String? = null
/**
* The scheduling expression. For example, "cron(0 20 * * ? *)", "rate(5 minutes)".
*/
public var scheduleExpression: kotlin.String? = null
/**
* Specifies whether the rule is enabled or disabled.
*/
public var state: aws.sdk.kotlin.services.cloudwatchevents.model.RuleState? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cloudwatchevents.model.DescribeRuleResponse) : this() {
this.arn = x.arn
this.createdBy = x.createdBy
this.description = x.description
this.eventBusName = x.eventBusName
this.eventPattern = x.eventPattern
this.managedBy = x.managedBy
this.name = x.name
this.roleArn = x.roleArn
this.scheduleExpression = x.scheduleExpression
this.state = x.state
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cloudwatchevents.model.DescribeRuleResponse = DescribeRuleResponse(this)
internal fun correctErrors(): Builder {
return this
}
}
}