commonMain.aws.sdk.kotlin.services.bedrockagent.model.WebDataSourceConfiguration.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.bedrockagent.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The configuration details for the web data source.
*/
public class WebDataSourceConfiguration private constructor(builder: Builder) {
/**
* The Web Crawler configuration details for the web data source.
*/
public val crawlerConfiguration: aws.sdk.kotlin.services.bedrockagent.model.WebCrawlerConfiguration? = builder.crawlerConfiguration
/**
* The source configuration details for the web data source.
*/
public val sourceConfiguration: aws.sdk.kotlin.services.bedrockagent.model.WebSourceConfiguration? = builder.sourceConfiguration
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.bedrockagent.model.WebDataSourceConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("WebDataSourceConfiguration(")
append("crawlerConfiguration=$crawlerConfiguration,")
append("sourceConfiguration=$sourceConfiguration")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = crawlerConfiguration?.hashCode() ?: 0
result = 31 * result + (sourceConfiguration?.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 WebDataSourceConfiguration
if (crawlerConfiguration != other.crawlerConfiguration) return false
if (sourceConfiguration != other.sourceConfiguration) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.bedrockagent.model.WebDataSourceConfiguration = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Web Crawler configuration details for the web data source.
*/
public var crawlerConfiguration: aws.sdk.kotlin.services.bedrockagent.model.WebCrawlerConfiguration? = null
/**
* The source configuration details for the web data source.
*/
public var sourceConfiguration: aws.sdk.kotlin.services.bedrockagent.model.WebSourceConfiguration? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.bedrockagent.model.WebDataSourceConfiguration) : this() {
this.crawlerConfiguration = x.crawlerConfiguration
this.sourceConfiguration = x.sourceConfiguration
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.bedrockagent.model.WebDataSourceConfiguration = WebDataSourceConfiguration(this)
/**
* construct an [aws.sdk.kotlin.services.bedrockagent.model.WebCrawlerConfiguration] inside the given [block]
*/
public fun crawlerConfiguration(block: aws.sdk.kotlin.services.bedrockagent.model.WebCrawlerConfiguration.Builder.() -> kotlin.Unit) {
this.crawlerConfiguration = aws.sdk.kotlin.services.bedrockagent.model.WebCrawlerConfiguration.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.bedrockagent.model.WebSourceConfiguration] inside the given [block]
*/
public fun sourceConfiguration(block: aws.sdk.kotlin.services.bedrockagent.model.WebSourceConfiguration.Builder.() -> kotlin.Unit) {
this.sourceConfiguration = aws.sdk.kotlin.services.bedrockagent.model.WebSourceConfiguration.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}