All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.codecommit.model.PostCommentForPullRequestResponse.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 PostCommentForPullRequestResponse private constructor(builder: Builder) {
    /**
     * In the directionality of the pull request, the blob ID of the after blob.
     */
    public val afterBlobId: kotlin.String? = builder.afterBlobId
    /**
     * The full commit ID of the commit in the destination branch where the pull request is merged.
     */
    public val afterCommitId: kotlin.String? = builder.afterCommitId
    /**
     * In the directionality of the pull request, the blob ID of the before blob.
     */
    public val beforeBlobId: kotlin.String? = builder.beforeBlobId
    /**
     * The full commit ID of the commit in the source branch used to create the pull request, or in the case of an updated pull request, the full commit ID of the commit used to update the pull request.
     */
    public val beforeCommitId: kotlin.String? = builder.beforeCommitId
    /**
     * The content of the comment you posted.
     */
    public val comment: aws.sdk.kotlin.services.codecommit.model.Comment? = builder.comment
    /**
     * The location of the change where you posted your comment.
     */
    public val location: aws.sdk.kotlin.services.codecommit.model.Location? = builder.location
    /**
     * The system-generated ID of the pull request.
     */
    public val pullRequestId: kotlin.String? = builder.pullRequestId
    /**
     * The name of the repository where you posted a comment on a pull request.
     */
    public val repositoryName: kotlin.String? = builder.repositoryName

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codecommit.model.PostCommentForPullRequestResponse = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("PostCommentForPullRequestResponse(")
        append("afterBlobId=$afterBlobId,")
        append("afterCommitId=$afterCommitId,")
        append("beforeBlobId=$beforeBlobId,")
        append("beforeCommitId=$beforeCommitId,")
        append("comment=$comment,")
        append("location=$location,")
        append("pullRequestId=$pullRequestId,")
        append("repositoryName=$repositoryName")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = afterBlobId?.hashCode() ?: 0
        result = 31 * result + (afterCommitId?.hashCode() ?: 0)
        result = 31 * result + (beforeBlobId?.hashCode() ?: 0)
        result = 31 * result + (beforeCommitId?.hashCode() ?: 0)
        result = 31 * result + (comment?.hashCode() ?: 0)
        result = 31 * result + (location?.hashCode() ?: 0)
        result = 31 * result + (pullRequestId?.hashCode() ?: 0)
        result = 31 * result + (repositoryName?.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 PostCommentForPullRequestResponse

        if (afterBlobId != other.afterBlobId) return false
        if (afterCommitId != other.afterCommitId) return false
        if (beforeBlobId != other.beforeBlobId) return false
        if (beforeCommitId != other.beforeCommitId) return false
        if (comment != other.comment) return false
        if (location != other.location) return false
        if (pullRequestId != other.pullRequestId) return false
        if (repositoryName != other.repositoryName) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codecommit.model.PostCommentForPullRequestResponse = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * In the directionality of the pull request, the blob ID of the after blob.
         */
        public var afterBlobId: kotlin.String? = null
        /**
         * The full commit ID of the commit in the destination branch where the pull request is merged.
         */
        public var afterCommitId: kotlin.String? = null
        /**
         * In the directionality of the pull request, the blob ID of the before blob.
         */
        public var beforeBlobId: kotlin.String? = null
        /**
         * The full commit ID of the commit in the source branch used to create the pull request, or in the case of an updated pull request, the full commit ID of the commit used to update the pull request.
         */
        public var beforeCommitId: kotlin.String? = null
        /**
         * The content of the comment you posted.
         */
        public var comment: aws.sdk.kotlin.services.codecommit.model.Comment? = null
        /**
         * The location of the change where you posted your comment.
         */
        public var location: aws.sdk.kotlin.services.codecommit.model.Location? = null
        /**
         * The system-generated ID of the pull request.
         */
        public var pullRequestId: kotlin.String? = null
        /**
         * The name of the repository where you posted a comment on a pull request.
         */
        public var repositoryName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codecommit.model.PostCommentForPullRequestResponse) : this() {
            this.afterBlobId = x.afterBlobId
            this.afterCommitId = x.afterCommitId
            this.beforeBlobId = x.beforeBlobId
            this.beforeCommitId = x.beforeCommitId
            this.comment = x.comment
            this.location = x.location
            this.pullRequestId = x.pullRequestId
            this.repositoryName = x.repositoryName
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.codecommit.model.PostCommentForPullRequestResponse = PostCommentForPullRequestResponse(this)

        /**
         * construct an [aws.sdk.kotlin.services.codecommit.model.Comment] inside the given [block]
         */
        public fun comment(block: aws.sdk.kotlin.services.codecommit.model.Comment.Builder.() -> kotlin.Unit) {
            this.comment = aws.sdk.kotlin.services.codecommit.model.Comment.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.codecommit.model.Location] inside the given [block]
         */
        public fun location(block: aws.sdk.kotlin.services.codecommit.model.Location.Builder.() -> kotlin.Unit) {
            this.location = aws.sdk.kotlin.services.codecommit.model.Location.invoke(block)
        }

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy