
commonMain.aws.sdk.kotlin.services.iot.model.GetTopicRuleResponse.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iot.model
/**
* The output from the GetTopicRule operation.
*/
public class GetTopicRuleResponse private constructor(builder: Builder) {
/**
* The rule.
*/
public val rule: aws.sdk.kotlin.services.iot.model.TopicRule? = builder.rule
/**
* The rule ARN.
*/
public val ruleArn: kotlin.String? = builder.ruleArn
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iot.model.GetTopicRuleResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetTopicRuleResponse(")
append("rule=$rule,")
append("ruleArn=$ruleArn")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = rule?.hashCode() ?: 0
result = 31 * result + (ruleArn?.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 GetTopicRuleResponse
if (rule != other.rule) return false
if (ruleArn != other.ruleArn) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iot.model.GetTopicRuleResponse = Builder(this).apply(block).build()
public class Builder {
/**
* The rule.
*/
public var rule: aws.sdk.kotlin.services.iot.model.TopicRule? = null
/**
* The rule ARN.
*/
public var ruleArn: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iot.model.GetTopicRuleResponse) : this() {
this.rule = x.rule
this.ruleArn = x.ruleArn
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iot.model.GetTopicRuleResponse = GetTopicRuleResponse(this)
/**
* construct an [aws.sdk.kotlin.services.iot.model.TopicRule] inside the given [block]
*/
public fun rule(block: aws.sdk.kotlin.services.iot.model.TopicRule.Builder.() -> kotlin.Unit) {
this.rule = aws.sdk.kotlin.services.iot.model.TopicRule.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy