
commonMain.aws.sdk.kotlin.services.codecommit.model.GetCommitResponse.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
/**
* Represents the output of a get commit operation.
*/
public class GetCommitResponse private constructor(builder: Builder) {
/**
* A commit data type object that contains information about the specified commit.
*/
public val commit: aws.sdk.kotlin.services.codecommit.model.Commit? = builder.commit
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codecommit.model.GetCommitResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetCommitResponse(")
append("commit=$commit")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = commit?.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 GetCommitResponse
if (commit != other.commit) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codecommit.model.GetCommitResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A commit data type object that contains information about the specified commit.
*/
public var commit: aws.sdk.kotlin.services.codecommit.model.Commit? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codecommit.model.GetCommitResponse) : this() {
this.commit = x.commit
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codecommit.model.GetCommitResponse = GetCommitResponse(this)
/**
* construct an [aws.sdk.kotlin.services.codecommit.model.Commit] inside the given [block]
*/
public fun commit(block: aws.sdk.kotlin.services.codecommit.model.Commit.Builder.() -> kotlin.Unit) {
this.commit = aws.sdk.kotlin.services.codecommit.model.Commit.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy