
commonMain.aws.sdk.kotlin.services.opensearchserverless.model.CollectionErrorDetail.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.opensearchserverless.model
/**
* Error information for an OpenSearch Serverless request.
*/
public class CollectionErrorDetail private constructor(builder: Builder) {
/**
* The error code for the request. For example, `NOT_FOUND`.
*/
public val errorCode: kotlin.String? = builder.errorCode
/**
* A description of the error. For example, `The specified Collection is not found.`
*/
public val errorMessage: kotlin.String? = builder.errorMessage
/**
* If the request contains collection IDs, the response includes the IDs provided in the request.
*/
public val id: kotlin.String? = builder.id
/**
* If the request contains collection names, the response includes the names provided in the request.
*/
public val name: kotlin.String? = builder.name
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.opensearchserverless.model.CollectionErrorDetail = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CollectionErrorDetail(")
append("errorCode=$errorCode,")
append("errorMessage=$errorMessage,")
append("id=$id,")
append("name=$name")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = errorCode?.hashCode() ?: 0
result = 31 * result + (errorMessage?.hashCode() ?: 0)
result = 31 * result + (id?.hashCode() ?: 0)
result = 31 * result + (name?.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 CollectionErrorDetail
if (errorCode != other.errorCode) return false
if (errorMessage != other.errorMessage) return false
if (id != other.id) return false
if (name != other.name) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.opensearchserverless.model.CollectionErrorDetail = Builder(this).apply(block).build()
public class Builder {
/**
* The error code for the request. For example, `NOT_FOUND`.
*/
public var errorCode: kotlin.String? = null
/**
* A description of the error. For example, `The specified Collection is not found.`
*/
public var errorMessage: kotlin.String? = null
/**
* If the request contains collection IDs, the response includes the IDs provided in the request.
*/
public var id: kotlin.String? = null
/**
* If the request contains collection names, the response includes the names provided in the request.
*/
public var name: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.opensearchserverless.model.CollectionErrorDetail) : this() {
this.errorCode = x.errorCode
this.errorMessage = x.errorMessage
this.id = x.id
this.name = x.name
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.opensearchserverless.model.CollectionErrorDetail = CollectionErrorDetail(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy