commonMain.aws.sdk.kotlin.services.dataexchange.model.SchemaChangeDetails.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dataexchange-jvm Show documentation
Show all versions of dataexchange-jvm Show documentation
The AWS Kotlin client for DataExchange
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.dataexchange.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Object encompassing information about a schema change to a single, particular field, a notification can have up to 100 of these.
*/
public class SchemaChangeDetails private constructor(builder: Builder) {
/**
* Description of what's changing about this field. This value can be up to 512 characters long.
*/
public val description: kotlin.String? = builder.description
/**
* Name of the changing field. This value can be up to 255 characters long.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
/**
* Is the field being added, removed, or modified?
*/
public val type: aws.sdk.kotlin.services.dataexchange.model.SchemaChangeType = 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.dataexchange.model.SchemaChangeDetails = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SchemaChangeDetails(")
append("description=$description,")
append("name=$name,")
append("type=$type")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = description?.hashCode() ?: 0
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 SchemaChangeDetails
if (description != other.description) 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.dataexchange.model.SchemaChangeDetails = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Description of what's changing about this field. This value can be up to 512 characters long.
*/
public var description: kotlin.String? = null
/**
* Name of the changing field. This value can be up to 255 characters long.
*/
public var name: kotlin.String? = null
/**
* Is the field being added, removed, or modified?
*/
public var type: aws.sdk.kotlin.services.dataexchange.model.SchemaChangeType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.dataexchange.model.SchemaChangeDetails) : this() {
this.description = x.description
this.name = x.name
this.type = x.type
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.dataexchange.model.SchemaChangeDetails = SchemaChangeDetails(this)
internal fun correctErrors(): Builder {
if (name == null) name = ""
if (type == null) type = SchemaChangeType.SdkUnknown("no value provided")
return this
}
}
}