commonMain.aws.sdk.kotlin.services.cleanrooms.model.BatchGetSchemaAnalysisRuleError.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
/**
* An error that describes why a schema could not be fetched.
*/
public class BatchGetSchemaAnalysisRuleError private constructor(builder: Builder) {
/**
* An error code for the error.
*/
public val code: kotlin.String = requireNotNull(builder.code) { "A non-null value must be provided for code" }
/**
* A description of why the call failed.
*/
public val message: kotlin.String = requireNotNull(builder.message) { "A non-null value must be provided for message" }
/**
* An error name for the error.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
/**
* The analysis rule type.
*/
public val type: aws.sdk.kotlin.services.cleanrooms.model.AnalysisRuleType = requireNotNull(builder.type) { "A non-null value must be provided for type" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cleanrooms.model.BatchGetSchemaAnalysisRuleError = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("BatchGetSchemaAnalysisRuleError(")
append("code=$code,")
append("message=$message,")
append("name=$name,")
append("type=$type")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = code.hashCode()
result = 31 * result + (message.hashCode())
result = 31 * result + (name.hashCode())
result = 31 * result + (type.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 BatchGetSchemaAnalysisRuleError
if (code != other.code) return false
if (message != other.message) return false
if (name != other.name) return false
if (type != other.type) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cleanrooms.model.BatchGetSchemaAnalysisRuleError = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* An error code for the error.
*/
public var code: kotlin.String? = null
/**
* A description of why the call failed.
*/
public var message: kotlin.String? = null
/**
* An error name for the error.
*/
public var name: kotlin.String? = null
/**
* The analysis rule type.
*/
public var type: aws.sdk.kotlin.services.cleanrooms.model.AnalysisRuleType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cleanrooms.model.BatchGetSchemaAnalysisRuleError) : this() {
this.code = x.code
this.message = x.message
this.name = x.name
this.type = x.type
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cleanrooms.model.BatchGetSchemaAnalysisRuleError = BatchGetSchemaAnalysisRuleError(this)
internal fun correctErrors(): Builder {
if (code == null) code = ""
if (message == null) message = ""
if (name == null) name = ""
if (type == null) type = AnalysisRuleType.SdkUnknown("no value provided")
return this
}
}
}