
commonMain.aws.sdk.kotlin.services.codecommit.model.BranchInfo.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
/**
* Returns information about a branch.
*/
public class BranchInfo private constructor(builder: Builder) {
/**
* The name of the branch.
*/
public val branchName: kotlin.String? = builder.branchName
/**
* The ID of the last commit made to the branch.
*/
public val commitId: kotlin.String? = builder.commitId
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codecommit.model.BranchInfo = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("BranchInfo(")
append("branchName=$branchName,")
append("commitId=$commitId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = branchName?.hashCode() ?: 0
result = 31 * result + (commitId?.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 BranchInfo
if (branchName != other.branchName) return false
if (commitId != other.commitId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codecommit.model.BranchInfo = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name of the branch.
*/
public var branchName: kotlin.String? = null
/**
* The ID of the last commit made to the branch.
*/
public var commitId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codecommit.model.BranchInfo) : this() {
this.branchName = x.branchName
this.commitId = x.commitId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codecommit.model.BranchInfo = BranchInfo(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy