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

commonMain.aws.sdk.kotlin.services.codecommit.model.CommentsForComparedCommit.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

/**
 * Returns information about comments on the comparison between two commits.
 */
public class CommentsForComparedCommit private constructor(builder: Builder) {
    /**
     * The full blob ID of the commit used to establish the after of the comparison.
     */
    public val afterBlobId: kotlin.String? = builder.afterBlobId
    /**
     * The full commit ID of the commit used to establish the after of the comparison.
     */
    public val afterCommitId: kotlin.String? = builder.afterCommitId
    /**
     * The full blob ID of the commit used to establish the before of the comparison.
     */
    public val beforeBlobId: kotlin.String? = builder.beforeBlobId
    /**
     * The full commit ID of the commit used to establish the before of the comparison.
     */
    public val beforeCommitId: kotlin.String? = builder.beforeCommitId
    /**
     * An array of comment objects. Each comment object contains information about a comment on the comparison between commits.
     */
    public val comments: List? = builder.comments
    /**
     * Location information about the comment on the comparison, including the file name, line number, and whether the version of the file where the comment was made is BEFORE or AFTER.
     */
    public val location: aws.sdk.kotlin.services.codecommit.model.Location? = builder.location
    /**
     * The name of the repository that contains the compared commits.
     */
    public val repositoryName: kotlin.String? = builder.repositoryName

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

    override fun toString(): kotlin.String = buildString {
        append("CommentsForComparedCommit(")
        append("afterBlobId=$afterBlobId,")
        append("afterCommitId=$afterCommitId,")
        append("beforeBlobId=$beforeBlobId,")
        append("beforeCommitId=$beforeCommitId,")
        append("comments=$comments,")
        append("location=$location,")
        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 + (comments?.hashCode() ?: 0)
        result = 31 * result + (location?.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 CommentsForComparedCommit

        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 (comments != other.comments) return false
        if (location != other.location) return false
        if (repositoryName != other.repositoryName) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The full blob ID of the commit used to establish the after of the comparison.
         */
        public var afterBlobId: kotlin.String? = null
        /**
         * The full commit ID of the commit used to establish the after of the comparison.
         */
        public var afterCommitId: kotlin.String? = null
        /**
         * The full blob ID of the commit used to establish the before of the comparison.
         */
        public var beforeBlobId: kotlin.String? = null
        /**
         * The full commit ID of the commit used to establish the before of the comparison.
         */
        public var beforeCommitId: kotlin.String? = null
        /**
         * An array of comment objects. Each comment object contains information about a comment on the comparison between commits.
         */
        public var comments: List? = null
        /**
         * Location information about the comment on the comparison, including the file name, line number, and whether the version of the file where the comment was made is BEFORE or AFTER.
         */
        public var location: aws.sdk.kotlin.services.codecommit.model.Location? = null
        /**
         * The name of the repository that contains the compared commits.
         */
        public var repositoryName: kotlin.String? = null

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

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

        /**
         * 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