
commonMain.aws.sdk.kotlin.services.iot.model.PublishFindingToSnsParams.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iot.model
/**
* Parameters to define a mitigation action that publishes findings to Amazon SNS. You can implement your own custom actions in response to the Amazon SNS messages.
*/
public class PublishFindingToSnsParams private constructor(builder: Builder) {
/**
* The ARN of the topic to which you want to publish the findings.
*/
public val topicArn: kotlin.String = requireNotNull(builder.topicArn) { "A non-null value must be provided for topicArn" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iot.model.PublishFindingToSnsParams = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PublishFindingToSnsParams(")
append("topicArn=$topicArn")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = topicArn.hashCode()
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 PublishFindingToSnsParams
if (topicArn != other.topicArn) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iot.model.PublishFindingToSnsParams = Builder(this).apply(block).build()
public class Builder {
/**
* The ARN of the topic to which you want to publish the findings.
*/
public var topicArn: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iot.model.PublishFindingToSnsParams) : this() {
this.topicArn = x.topicArn
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iot.model.PublishFindingToSnsParams = PublishFindingToSnsParams(this)
internal fun correctErrors(): Builder {
if (topicArn == null) topicArn = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy