
commonMain.aws.sdk.kotlin.services.sns.model.PublishResponse.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.sns.model
/**
* Response for Publish action.
*/
public class PublishResponse private constructor(builder: Builder) {
/**
* Unique identifier assigned to the published message.
*
* Length Constraint: Maximum 100 characters
*/
public val messageId: kotlin.String? = builder.messageId
/**
* This response element applies only to FIFO (first-in-first-out) topics.
*
* The sequence number is a large, non-consecutive number that Amazon SNS assigns to each message. The length of `SequenceNumber` is 128 bits. `SequenceNumber` continues to increase for each `MessageGroupId`.
*/
public val sequenceNumber: kotlin.String? = builder.sequenceNumber
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.sns.model.PublishResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PublishResponse(")
append("messageId=$messageId,")
append("sequenceNumber=$sequenceNumber")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = messageId?.hashCode() ?: 0
result = 31 * result + (sequenceNumber?.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 PublishResponse
if (messageId != other.messageId) return false
if (sequenceNumber != other.sequenceNumber) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.sns.model.PublishResponse = Builder(this).apply(block).build()
public class Builder {
/**
* Unique identifier assigned to the published message.
*
* Length Constraint: Maximum 100 characters
*/
public var messageId: kotlin.String? = null
/**
* This response element applies only to FIFO (first-in-first-out) topics.
*
* The sequence number is a large, non-consecutive number that Amazon SNS assigns to each message. The length of `SequenceNumber` is 128 bits. `SequenceNumber` continues to increase for each `MessageGroupId`.
*/
public var sequenceNumber: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.sns.model.PublishResponse) : this() {
this.messageId = x.messageId
this.sequenceNumber = x.sequenceNumber
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.sns.model.PublishResponse = PublishResponse(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy