
commonMain.aws.sdk.kotlin.services.codecommit.model.BatchGetCommitsError.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 errors in a BatchGetCommits operation.
*/
public class BatchGetCommitsError private constructor(builder: Builder) {
/**
* A commit ID that either could not be found or was not in a valid format.
*/
public val commitId: kotlin.String? = builder.commitId
/**
* An error code that specifies whether the commit ID was not valid or not found.
*/
public val errorCode: kotlin.String? = builder.errorCode
/**
* An error message that provides detail about why the commit ID either was not found or was not valid.
*/
public val errorMessage: kotlin.String? = builder.errorMessage
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codecommit.model.BatchGetCommitsError = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("BatchGetCommitsError(")
append("commitId=$commitId,")
append("errorCode=$errorCode,")
append("errorMessage=$errorMessage")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = commitId?.hashCode() ?: 0
result = 31 * result + (errorCode?.hashCode() ?: 0)
result = 31 * result + (errorMessage?.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 BatchGetCommitsError
if (commitId != other.commitId) return false
if (errorCode != other.errorCode) return false
if (errorMessage != other.errorMessage) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codecommit.model.BatchGetCommitsError = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A commit ID that either could not be found or was not in a valid format.
*/
public var commitId: kotlin.String? = null
/**
* An error code that specifies whether the commit ID was not valid or not found.
*/
public var errorCode: kotlin.String? = null
/**
* An error message that provides detail about why the commit ID either was not found or was not valid.
*/
public var errorMessage: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codecommit.model.BatchGetCommitsError) : this() {
this.commitId = x.commitId
this.errorCode = x.errorCode
this.errorMessage = x.errorMessage
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codecommit.model.BatchGetCommitsError = BatchGetCommitsError(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy