commonMain.aws.sdk.kotlin.services.wisdom.model.ExternalSourceConfiguration.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of wisdom-jvm Show documentation
Show all versions of wisdom-jvm Show documentation
The AWS SDK for Kotlin client for Wisdom
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.wisdom.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The configuration information of the external data source.
*/
public class ExternalSourceConfiguration private constructor(builder: Builder) {
/**
* The configuration information of the external data source.
*/
public val configuration: aws.sdk.kotlin.services.wisdom.model.Configuration? = builder.configuration
/**
* The type of the external data source.
*/
public val source: aws.sdk.kotlin.services.wisdom.model.ExternalSource = requireNotNull(builder.source) { "A non-null value must be provided for source" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.wisdom.model.ExternalSourceConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ExternalSourceConfiguration(")
append("configuration=$configuration,")
append("source=$source")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = configuration?.hashCode() ?: 0
result = 31 * result + (source.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 ExternalSourceConfiguration
if (configuration != other.configuration) return false
if (source != other.source) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.wisdom.model.ExternalSourceConfiguration = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The configuration information of the external data source.
*/
public var configuration: aws.sdk.kotlin.services.wisdom.model.Configuration? = null
/**
* The type of the external data source.
*/
public var source: aws.sdk.kotlin.services.wisdom.model.ExternalSource? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.wisdom.model.ExternalSourceConfiguration) : this() {
this.configuration = x.configuration
this.source = x.source
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.wisdom.model.ExternalSourceConfiguration = ExternalSourceConfiguration(this)
internal fun correctErrors(): Builder {
if (source == null) source = ExternalSource.SdkUnknown("no value provided")
return this
}
}
}