
commonMain.aws.sdk.kotlin.services.codecommit.model.DescribeMergeConflictsResponse.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 DescribeMergeConflictsResponse private constructor(builder: Builder) {
/**
* The commit ID of the merge base.
*/
public val baseCommitId: kotlin.String? = builder.baseCommitId
/**
* Contains metadata about the conflicts found in the merge.
*/
public val conflictMetadata: aws.sdk.kotlin.services.codecommit.model.ConflictMetadata? = builder.conflictMetadata
/**
* The commit ID of the destination commit specifier that was used in the merge evaluation.
*/
public val destinationCommitId: kotlin.String = requireNotNull(builder.destinationCommitId) { "A non-null value must be provided for destinationCommitId" }
/**
* A list of merge hunks of the differences between the files or lines.
*/
public val mergeHunks: List = requireNotNull(builder.mergeHunks) { "A non-null value must be provided for mergeHunks" }
/**
* An enumeration token that can be used in a request to return the next batch of the results.
*/
public val nextToken: kotlin.String? = builder.nextToken
/**
* The commit ID of the source commit specifier that was used in the merge evaluation.
*/
public val sourceCommitId: kotlin.String = requireNotNull(builder.sourceCommitId) { "A non-null value must be provided for sourceCommitId" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codecommit.model.DescribeMergeConflictsResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("DescribeMergeConflictsResponse(")
append("baseCommitId=$baseCommitId,")
append("conflictMetadata=$conflictMetadata,")
append("destinationCommitId=$destinationCommitId,")
append("mergeHunks=$mergeHunks,")
append("nextToken=$nextToken,")
append("sourceCommitId=$sourceCommitId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = baseCommitId?.hashCode() ?: 0
result = 31 * result + (conflictMetadata?.hashCode() ?: 0)
result = 31 * result + (destinationCommitId.hashCode())
result = 31 * result + (mergeHunks.hashCode())
result = 31 * result + (nextToken?.hashCode() ?: 0)
result = 31 * result + (sourceCommitId.hashCode())
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 DescribeMergeConflictsResponse
if (baseCommitId != other.baseCommitId) return false
if (conflictMetadata != other.conflictMetadata) return false
if (destinationCommitId != other.destinationCommitId) return false
if (mergeHunks != other.mergeHunks) return false
if (nextToken != other.nextToken) return false
if (sourceCommitId != other.sourceCommitId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codecommit.model.DescribeMergeConflictsResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The commit ID of the merge base.
*/
public var baseCommitId: kotlin.String? = null
/**
* Contains metadata about the conflicts found in the merge.
*/
public var conflictMetadata: aws.sdk.kotlin.services.codecommit.model.ConflictMetadata? = null
/**
* The commit ID of the destination commit specifier that was used in the merge evaluation.
*/
public var destinationCommitId: kotlin.String? = null
/**
* A list of merge hunks of the differences between the files or lines.
*/
public var mergeHunks: List? = null
/**
* An enumeration token that can be used in a request to return the next batch of the results.
*/
public var nextToken: kotlin.String? = null
/**
* The commit ID of the source commit specifier that was used in the merge evaluation.
*/
public var sourceCommitId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codecommit.model.DescribeMergeConflictsResponse) : this() {
this.baseCommitId = x.baseCommitId
this.conflictMetadata = x.conflictMetadata
this.destinationCommitId = x.destinationCommitId
this.mergeHunks = x.mergeHunks
this.nextToken = x.nextToken
this.sourceCommitId = x.sourceCommitId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codecommit.model.DescribeMergeConflictsResponse = DescribeMergeConflictsResponse(this)
/**
* construct an [aws.sdk.kotlin.services.codecommit.model.ConflictMetadata] inside the given [block]
*/
public fun conflictMetadata(block: aws.sdk.kotlin.services.codecommit.model.ConflictMetadata.Builder.() -> kotlin.Unit) {
this.conflictMetadata = aws.sdk.kotlin.services.codecommit.model.ConflictMetadata.invoke(block)
}
internal fun correctErrors(): Builder {
if (destinationCommitId == null) destinationCommitId = ""
if (mergeHunks == null) mergeHunks = emptyList()
if (sourceCommitId == null) sourceCommitId = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy