
commonMain.aws.sdk.kotlin.services.iot.model.SqsAction.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iot.model
/**
* Describes an action to publish data to an Amazon SQS queue.
*/
public class SqsAction private constructor(builder: Builder) {
/**
* The URL of the Amazon SQS queue.
*/
public val queueUrl: kotlin.String = requireNotNull(builder.queueUrl) { "A non-null value must be provided for queueUrl" }
/**
* The ARN of the IAM role that grants access.
*/
public val roleArn: kotlin.String = requireNotNull(builder.roleArn) { "A non-null value must be provided for roleArn" }
/**
* Specifies whether to use Base64 encoding.
*/
public val useBase64: kotlin.Boolean? = builder.useBase64
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iot.model.SqsAction = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SqsAction(")
append("queueUrl=$queueUrl,")
append("roleArn=$roleArn,")
append("useBase64=$useBase64")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = queueUrl.hashCode()
result = 31 * result + (roleArn.hashCode())
result = 31 * result + (useBase64?.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 SqsAction
if (queueUrl != other.queueUrl) return false
if (roleArn != other.roleArn) return false
if (useBase64 != other.useBase64) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iot.model.SqsAction = Builder(this).apply(block).build()
public class Builder {
/**
* The URL of the Amazon SQS queue.
*/
public var queueUrl: kotlin.String? = null
/**
* The ARN of the IAM role that grants access.
*/
public var roleArn: kotlin.String? = null
/**
* Specifies whether to use Base64 encoding.
*/
public var useBase64: kotlin.Boolean? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iot.model.SqsAction) : this() {
this.queueUrl = x.queueUrl
this.roleArn = x.roleArn
this.useBase64 = x.useBase64
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iot.model.SqsAction = SqsAction(this)
internal fun correctErrors(): Builder {
if (queueUrl == null) queueUrl = ""
if (roleArn == null) roleArn = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy