
commonMain.aws.sdk.kotlin.services.kendra.model.ProxyConfiguration.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.kendra.model
/**
* Provides the configuration information for a web proxy to connect to website hosts.
*/
public class ProxyConfiguration private constructor(builder: Builder) {
/**
* Your secret ARN, which you can create in [Secrets Manager](https://docs.aws.amazon.com/secretsmanager/latest/userguide/intro.html)
*
* The credentials are optional. You use a secret if web proxy credentials are required to connect to a website host. Amazon Kendra currently support basic authentication to connect to a web proxy server. The secret stores your credentials.
*/
public val credentials: kotlin.String? = builder.credentials
/**
* The name of the website host you want to connect to via a web proxy server.
*
* For example, the host name of https://a.example.com/page1.html is "a.example.com".
*/
public val host: kotlin.String = requireNotNull(builder.host) { "A non-null value must be provided for host" }
/**
* The port number of the website host you want to connect to via a web proxy server.
*
* For example, the port for https://a.example.com/page1.html is 443, the standard port for HTTPS.
*/
public val port: kotlin.Int = requireNotNull(builder.port) { "A non-null value must be provided for port" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.kendra.model.ProxyConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ProxyConfiguration(")
append("credentials=$credentials,")
append("host=$host,")
append("port=$port")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = credentials?.hashCode() ?: 0
result = 31 * result + (host.hashCode())
result = 31 * result + (port)
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 ProxyConfiguration
if (credentials != other.credentials) return false
if (host != other.host) return false
if (port != other.port) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.kendra.model.ProxyConfiguration = Builder(this).apply(block).build()
public class Builder {
/**
* Your secret ARN, which you can create in [Secrets Manager](https://docs.aws.amazon.com/secretsmanager/latest/userguide/intro.html)
*
* The credentials are optional. You use a secret if web proxy credentials are required to connect to a website host. Amazon Kendra currently support basic authentication to connect to a web proxy server. The secret stores your credentials.
*/
public var credentials: kotlin.String? = null
/**
* The name of the website host you want to connect to via a web proxy server.
*
* For example, the host name of https://a.example.com/page1.html is "a.example.com".
*/
public var host: kotlin.String? = null
/**
* The port number of the website host you want to connect to via a web proxy server.
*
* For example, the port for https://a.example.com/page1.html is 443, the standard port for HTTPS.
*/
public var port: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.kendra.model.ProxyConfiguration) : this() {
this.credentials = x.credentials
this.host = x.host
this.port = x.port
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.kendra.model.ProxyConfiguration = ProxyConfiguration(this)
internal fun correctErrors(): Builder {
if (host == null) host = ""
if (port == null) port = 0
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy