
commonMain.aws.sdk.kotlin.services.codecommit.model.PullRequestCreatedEventMetadata.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
/**
* Metadata about the pull request that is used when comparing the pull request source with its destination.
*/
public class PullRequestCreatedEventMetadata private constructor(builder: Builder) {
/**
* The commit ID of the tip of the branch specified as the destination branch when the pull request was created.
*/
public val destinationCommitId: kotlin.String? = builder.destinationCommitId
/**
* 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 created.
*/
public val repositoryName: kotlin.String? = builder.repositoryName
/**
* The commit ID on the source branch used when the pull request was created.
*/
public val sourceCommitId: kotlin.String? = builder.sourceCommitId
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codecommit.model.PullRequestCreatedEventMetadata = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PullRequestCreatedEventMetadata(")
append("destinationCommitId=$destinationCommitId,")
append("mergeBase=$mergeBase,")
append("repositoryName=$repositoryName,")
append("sourceCommitId=$sourceCommitId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = destinationCommitId?.hashCode() ?: 0
result = 31 * result + (mergeBase?.hashCode() ?: 0)
result = 31 * result + (repositoryName?.hashCode() ?: 0)
result = 31 * result + (sourceCommitId?.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 PullRequestCreatedEventMetadata
if (destinationCommitId != other.destinationCommitId) return false
if (mergeBase != other.mergeBase) return false
if (repositoryName != other.repositoryName) return false
if (sourceCommitId != other.sourceCommitId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codecommit.model.PullRequestCreatedEventMetadata = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The commit ID of the tip of the branch specified as the destination branch when the pull request was created.
*/
public var destinationCommitId: 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 created.
*/
public var repositoryName: kotlin.String? = null
/**
* The commit ID on the source branch used when the pull request was created.
*/
public var sourceCommitId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codecommit.model.PullRequestCreatedEventMetadata) : this() {
this.destinationCommitId = x.destinationCommitId
this.mergeBase = x.mergeBase
this.repositoryName = x.repositoryName
this.sourceCommitId = x.sourceCommitId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codecommit.model.PullRequestCreatedEventMetadata = PullRequestCreatedEventMetadata(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy