
commonMain.aws.sdk.kotlin.services.codecommit.model.PutCommentReactionRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.codecommit.model
import aws.smithy.kotlin.runtime.SdkDsl
public class PutCommentReactionRequest private constructor(builder: Builder) {
/**
* The ID of the comment to which you want to add or update a reaction.
*/
public val commentId: kotlin.String? = builder.commentId
/**
* The emoji reaction you want to add or update. To remove a reaction, provide a value of blank or null. You can also provide the value of none. For information about emoji reaction values supported in CodeCommit, see the [CodeCommit User Guide](https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-commit-comment.html#emoji-reaction-table).
*/
public val reactionValue: kotlin.String? = builder.reactionValue
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codecommit.model.PutCommentReactionRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PutCommentReactionRequest(")
append("commentId=$commentId,")
append("reactionValue=$reactionValue")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = commentId?.hashCode() ?: 0
result = 31 * result + (reactionValue?.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 PutCommentReactionRequest
if (commentId != other.commentId) return false
if (reactionValue != other.reactionValue) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codecommit.model.PutCommentReactionRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The ID of the comment to which you want to add or update a reaction.
*/
public var commentId: kotlin.String? = null
/**
* The emoji reaction you want to add or update. To remove a reaction, provide a value of blank or null. You can also provide the value of none. For information about emoji reaction values supported in CodeCommit, see the [CodeCommit User Guide](https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-commit-comment.html#emoji-reaction-table).
*/
public var reactionValue: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codecommit.model.PutCommentReactionRequest) : this() {
this.commentId = x.commentId
this.reactionValue = x.reactionValue
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codecommit.model.PutCommentReactionRequest = PutCommentReactionRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy