
commonMain.aws.sdk.kotlin.services.codecommit.model.MergeHunk.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 merge hunks in a merge or pull request operation.
*/
public class MergeHunk private constructor(builder: Builder) {
/**
* Information about the merge hunk in the base of a merge or pull request.
*/
public val base: aws.sdk.kotlin.services.codecommit.model.MergeHunkDetail? = builder.base
/**
* Information about the merge hunk in the destination of a merge or pull request.
*/
public val destination: aws.sdk.kotlin.services.codecommit.model.MergeHunkDetail? = builder.destination
/**
* A Boolean value indicating whether a combination of hunks contains a conflict. Conflicts occur when the same file or the same lines in a file were modified in both the source and destination of a merge or pull request. Valid values include true, false, and null. True when the hunk represents a conflict and one or more files contains a line conflict. File mode conflicts in a merge do not set this to true.
*/
public val isConflict: kotlin.Boolean = builder.isConflict
/**
* Information about the merge hunk in the source of a merge or pull request.
*/
public val source: aws.sdk.kotlin.services.codecommit.model.MergeHunkDetail? = builder.source
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codecommit.model.MergeHunk = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("MergeHunk(")
append("base=$base,")
append("destination=$destination,")
append("isConflict=$isConflict,")
append("source=$source")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = base?.hashCode() ?: 0
result = 31 * result + (destination?.hashCode() ?: 0)
result = 31 * result + (isConflict.hashCode())
result = 31 * result + (source?.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 MergeHunk
if (base != other.base) return false
if (destination != other.destination) return false
if (isConflict != other.isConflict) return false
if (source != other.source) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codecommit.model.MergeHunk = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Information about the merge hunk in the base of a merge or pull request.
*/
public var base: aws.sdk.kotlin.services.codecommit.model.MergeHunkDetail? = null
/**
* Information about the merge hunk in the destination of a merge or pull request.
*/
public var destination: aws.sdk.kotlin.services.codecommit.model.MergeHunkDetail? = null
/**
* A Boolean value indicating whether a combination of hunks contains a conflict. Conflicts occur when the same file or the same lines in a file were modified in both the source and destination of a merge or pull request. Valid values include true, false, and null. True when the hunk represents a conflict and one or more files contains a line conflict. File mode conflicts in a merge do not set this to true.
*/
public var isConflict: kotlin.Boolean = false
/**
* Information about the merge hunk in the source of a merge or pull request.
*/
public var source: aws.sdk.kotlin.services.codecommit.model.MergeHunkDetail? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codecommit.model.MergeHunk) : this() {
this.base = x.base
this.destination = x.destination
this.isConflict = x.isConflict
this.source = x.source
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codecommit.model.MergeHunk = MergeHunk(this)
/**
* construct an [aws.sdk.kotlin.services.codecommit.model.MergeHunkDetail] inside the given [block]
*/
public fun base(block: aws.sdk.kotlin.services.codecommit.model.MergeHunkDetail.Builder.() -> kotlin.Unit) {
this.base = aws.sdk.kotlin.services.codecommit.model.MergeHunkDetail.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.codecommit.model.MergeHunkDetail] inside the given [block]
*/
public fun destination(block: aws.sdk.kotlin.services.codecommit.model.MergeHunkDetail.Builder.() -> kotlin.Unit) {
this.destination = aws.sdk.kotlin.services.codecommit.model.MergeHunkDetail.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.codecommit.model.MergeHunkDetail] inside the given [block]
*/
public fun source(block: aws.sdk.kotlin.services.codecommit.model.MergeHunkDetail.Builder.() -> kotlin.Unit) {
this.source = aws.sdk.kotlin.services.codecommit.model.MergeHunkDetail.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy