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

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

/**
 * Information about an update to the source branch of a pull request.
 */
public class PullRequestSourceReferenceUpdatedEventMetadata 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 pull request was updated.
     */
    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 updated.
     */
    public val beforeCommitId: kotlin.String? = builder.beforeCommitId
    /**
     * The commit ID of the most recent commit that the source branch and the destination branch have in common.
     */
    public val mergeBase: kotlin.String? = builder.mergeBase
    /**
     * The name of the repository where the pull request was updated.
     */
    public val repositoryName: kotlin.String? = builder.repositoryName

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

    override fun toString(): kotlin.String = buildString {
        append("PullRequestSourceReferenceUpdatedEventMetadata(")
        append("afterCommitId=$afterCommitId,")
        append("beforeCommitId=$beforeCommitId,")
        append("mergeBase=$mergeBase,")
        append("repositoryName=$repositoryName")
        append(")")
    }

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

        if (afterCommitId != other.afterCommitId) return false
        if (beforeCommitId != other.beforeCommitId) return false
        if (mergeBase != other.mergeBase) return false
        if (repositoryName != other.repositoryName) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codecommit.model.PullRequestSourceReferenceUpdatedEventMetadata = 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 pull request was updated.
         */
        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 updated.
         */
        public var beforeCommitId: kotlin.String? = null
        /**
         * The commit ID of the most recent commit that the source branch and the destination branch have in common.
         */
        public var mergeBase: kotlin.String? = null
        /**
         * The name of the repository where the pull request was updated.
         */
        public var repositoryName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codecommit.model.PullRequestSourceReferenceUpdatedEventMetadata) : this() {
            this.afterCommitId = x.afterCommitId
            this.beforeCommitId = x.beforeCommitId
            this.mergeBase = x.mergeBase
            this.repositoryName = x.repositoryName
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy