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

commonMain.aws.sdk.kotlin.services.codecommit.model.GetCommentsForPullRequestRequest.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 GetCommentsForPullRequestRequest private constructor(builder: Builder) {
    /**
     * The full commit ID of the commit in the source branch that was the tip of the branch at the time the comment was made. Requirement is conditional: `afterCommitId` must be specified when `repositoryName` is included.
     */
    public val afterCommitId: kotlin.String? = builder.afterCommitId
    /**
     * The full commit ID of the commit in the destination branch that was the tip of the branch at the time the pull request was created. Requirement is conditional: `beforeCommitId` must be specified when `repositoryName` is included.
     */
    public val beforeCommitId: kotlin.String? = builder.beforeCommitId
    /**
     * A non-zero, non-negative integer used to limit the number of returned results. The default is 100 comments. You can return up to 500 comments with a single request.
     */
    public val maxResults: kotlin.Int? = builder.maxResults
    /**
     * An enumeration token that, when provided in a request, returns the next batch of the results.
     */
    public val nextToken: kotlin.String? = builder.nextToken
    /**
     * The system-generated ID of the pull request. To get this ID, use ListPullRequests.
     */
    public val pullRequestId: kotlin.String? = builder.pullRequestId
    /**
     * The name of the repository that contains the pull request. Requirement is conditional: `repositoryName` must be specified when `beforeCommitId` and `afterCommitId` are included.
     */
    public val repositoryName: kotlin.String? = builder.repositoryName

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

    override fun toString(): kotlin.String = buildString {
        append("GetCommentsForPullRequestRequest(")
        append("afterCommitId=$afterCommitId,")
        append("beforeCommitId=$beforeCommitId,")
        append("maxResults=$maxResults,")
        append("nextToken=$nextToken,")
        append("pullRequestId=$pullRequestId,")
        append("repositoryName=$repositoryName")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = afterCommitId?.hashCode() ?: 0
        result = 31 * result + (beforeCommitId?.hashCode() ?: 0)
        result = 31 * result + (maxResults ?: 0)
        result = 31 * result + (nextToken?.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 GetCommentsForPullRequestRequest

        if (afterCommitId != other.afterCommitId) return false
        if (beforeCommitId != other.beforeCommitId) return false
        if (maxResults != other.maxResults) return false
        if (nextToken != other.nextToken) 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.GetCommentsForPullRequestRequest = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The full commit ID of the commit in the source branch that was the tip of the branch at the time the comment was made. Requirement is conditional: `afterCommitId` must be specified when `repositoryName` is included.
         */
        public var afterCommitId: kotlin.String? = null
        /**
         * The full commit ID of the commit in the destination branch that was the tip of the branch at the time the pull request was created. Requirement is conditional: `beforeCommitId` must be specified when `repositoryName` is included.
         */
        public var beforeCommitId: kotlin.String? = null
        /**
         * A non-zero, non-negative integer used to limit the number of returned results. The default is 100 comments. You can return up to 500 comments with a single request.
         */
        public var maxResults: kotlin.Int? = null
        /**
         * An enumeration token that, when provided in a request, returns the next batch of the results.
         */
        public var nextToken: kotlin.String? = null
        /**
         * The system-generated ID of the pull request. To get this ID, use ListPullRequests.
         */
        public var pullRequestId: kotlin.String? = null
        /**
         * The name of the repository that contains the pull request. Requirement is conditional: `repositoryName` must be specified when `beforeCommitId` and `afterCommitId` are included.
         */
        public var repositoryName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codecommit.model.GetCommentsForPullRequestRequest) : this() {
            this.afterCommitId = x.afterCommitId
            this.beforeCommitId = x.beforeCommitId
            this.maxResults = x.maxResults
            this.nextToken = x.nextToken
            this.pullRequestId = x.pullRequestId
            this.repositoryName = x.repositoryName
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy