commonMain.aws.sdk.kotlin.services.cleanrooms.model.BatchGetSchemaResponse.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cleanrooms-jvm Show documentation
Show all versions of cleanrooms-jvm Show documentation
The AWS SDK for Kotlin client for CleanRooms
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.cleanrooms.model
import aws.smithy.kotlin.runtime.SdkDsl
public class BatchGetSchemaResponse private constructor(builder: Builder) {
/**
* Error reasons for schemas that could not be retrieved. One error is returned for every schema that could not be retrieved.
*/
public val errors: List = requireNotNull(builder.errors) { "A non-null value must be provided for errors" }
/**
* The retrieved list of schemas.
*/
public val schemas: List = requireNotNull(builder.schemas) { "A non-null value must be provided for schemas" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cleanrooms.model.BatchGetSchemaResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("BatchGetSchemaResponse(")
append("errors=$errors,")
append("schemas=$schemas")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = errors.hashCode()
result = 31 * result + (schemas.hashCode())
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 BatchGetSchemaResponse
if (errors != other.errors) return false
if (schemas != other.schemas) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cleanrooms.model.BatchGetSchemaResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Error reasons for schemas that could not be retrieved. One error is returned for every schema that could not be retrieved.
*/
public var errors: List? = null
/**
* The retrieved list of schemas.
*/
public var schemas: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cleanrooms.model.BatchGetSchemaResponse) : this() {
this.errors = x.errors
this.schemas = x.schemas
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cleanrooms.model.BatchGetSchemaResponse = BatchGetSchemaResponse(this)
internal fun correctErrors(): Builder {
if (errors == null) errors = emptyList()
if (schemas == null) schemas = emptyList()
return this
}
}
}