
commonMain.aws.sdk.kotlin.services.ecrpublic.model.InvalidLayerPartException.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.ecrpublic.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.ServiceErrorMetadata
/**
* The layer part size isn't valid, or the first byte specified isn't consecutive to the last byte of a previous layer part upload.
*/
public class InvalidLayerPartException private constructor(builder: Builder) : EcrPublicException(builder.message) {
/**
* The position of the last byte of the layer part.
*/
public val lastValidByteReceived: kotlin.Long? = builder.lastValidByteReceived
/**
* The Amazon Web Services account ID that's associated with the layer part.
*/
public val registryId: kotlin.String? = builder.registryId
/**
* The name of the repository.
*/
public val repositoryName: kotlin.String? = builder.repositoryName
/**
* The upload ID that's associated with the layer part.
*/
public val uploadId: kotlin.String? = builder.uploadId
init {
sdkErrorMetadata.attributes[ServiceErrorMetadata.ErrorType] = ErrorType.Client
}
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ecrpublic.model.InvalidLayerPartException = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("InvalidLayerPartException(")
append("lastValidByteReceived=$lastValidByteReceived,")
append("message=$message,")
append("registryId=$registryId,")
append("repositoryName=$repositoryName,")
append("uploadId=$uploadId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = lastValidByteReceived?.hashCode() ?: 0
result = 31 * result + (message?.hashCode() ?: 0)
result = 31 * result + (registryId?.hashCode() ?: 0)
result = 31 * result + (repositoryName?.hashCode() ?: 0)
result = 31 * result + (uploadId?.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 InvalidLayerPartException
if (lastValidByteReceived != other.lastValidByteReceived) return false
if (message != other.message) return false
if (registryId != other.registryId) return false
if (repositoryName != other.repositoryName) return false
if (uploadId != other.uploadId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ecrpublic.model.InvalidLayerPartException = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The position of the last byte of the layer part.
*/
public var lastValidByteReceived: kotlin.Long? = null
public var message: kotlin.String? = null
/**
* The Amazon Web Services account ID that's associated with the layer part.
*/
public var registryId: kotlin.String? = null
/**
* The name of the repository.
*/
public var repositoryName: kotlin.String? = null
/**
* The upload ID that's associated with the layer part.
*/
public var uploadId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.ecrpublic.model.InvalidLayerPartException) : this() {
this.lastValidByteReceived = x.lastValidByteReceived
this.message = x.message
this.registryId = x.registryId
this.repositoryName = x.repositoryName
this.uploadId = x.uploadId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.ecrpublic.model.InvalidLayerPartException = InvalidLayerPartException(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy