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

commonMain.aws.sdk.kotlin.services.codecommit.model.PostCommentForComparedCommitRequest.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 PostCommentForComparedCommitRequest private constructor(builder: Builder) {
    /**
     * To establish the directionality of the comparison, the full commit ID of the after commit.
     */
    public val afterCommitId: kotlin.String? = builder.afterCommitId
    /**
     * To establish the directionality of the comparison, the full commit ID of the before commit. Required for commenting on any commit unless that commit is the initial commit.
     */
    public val beforeCommitId: kotlin.String? = builder.beforeCommitId
    /**
     * A unique, client-generated idempotency token that, when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request is received with the same parameters and a token is included, the request returns information about the initial request that used that token.
     */
    public val clientRequestToken: kotlin.String? = builder.clientRequestToken
    /**
     * The content of the comment you want to make.
     */
    public val content: kotlin.String? = builder.content
    /**
     * The location of the comparison where you want to comment.
     */
    public val location: aws.sdk.kotlin.services.codecommit.model.Location? = builder.location
    /**
     * The name of the repository where you want to post a comment on the comparison between 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.PostCommentForComparedCommitRequest = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("PostCommentForComparedCommitRequest(")
        append("afterCommitId=$afterCommitId,")
        append("beforeCommitId=$beforeCommitId,")
        append("clientRequestToken=$clientRequestToken,")
        append("content=$content,")
        append("location=$location,")
        append("repositoryName=$repositoryName")
        append(")")
    }

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

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

    @SdkDsl
    public class Builder {
        /**
         * To establish the directionality of the comparison, the full commit ID of the after commit.
         */
        public var afterCommitId: kotlin.String? = null
        /**
         * To establish the directionality of the comparison, the full commit ID of the before commit. Required for commenting on any commit unless that commit is the initial commit.
         */
        public var beforeCommitId: kotlin.String? = null
        /**
         * A unique, client-generated idempotency token that, when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request is received with the same parameters and a token is included, the request returns information about the initial request that used that token.
         */
        public var clientRequestToken: kotlin.String? = null
        /**
         * The content of the comment you want to make.
         */
        public var content: kotlin.String? = null
        /**
         * The location of the comparison where you want to comment.
         */
        public var location: aws.sdk.kotlin.services.codecommit.model.Location? = null
        /**
         * The name of the repository where you want to post a comment on the comparison between commits.
         */
        public var repositoryName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codecommit.model.PostCommentForComparedCommitRequest) : this() {
            this.afterCommitId = x.afterCommitId
            this.beforeCommitId = x.beforeCommitId
            this.clientRequestToken = x.clientRequestToken
            this.content = x.content
            this.location = x.location
            this.repositoryName = x.repositoryName
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.codecommit.model.PostCommentForComparedCommitRequest = PostCommentForComparedCommitRequest(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