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