com.julienviet.kotlin.pgclient.PgConnectOptions.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of reactive-pg-client Show documentation
Show all versions of reactive-pg-client Show documentation
The reactive Postgres client
package com.julienviet.kotlin.pgclient
import com.julienviet.pgclient.PgConnectOptions
import io.vertx.core.net.JdkSSLEngineOptions
import io.vertx.core.net.JksOptions
import io.vertx.core.net.OpenSSLEngineOptions
import io.vertx.core.net.PemKeyCertOptions
import io.vertx.core.net.PemTrustOptions
import io.vertx.core.net.PfxOptions
import io.vertx.core.net.ProxyOptions
/**
* A function providing a DSL for building [com.julienviet.pgclient.PgConnectOptions] objects.
*
*
* @param cachePreparedStatements
* @param connectTimeout
* @param crlPaths
* @param crlValues
* @param database
* @param enabledCipherSuites
* @param enabledSecureTransportProtocols
* @param host
* @param hostnameVerificationAlgorithm
* @param idleTimeout
* @param jdkSslEngineOptions
* @param keyStoreOptions
* @param localAddress
* @param logActivity
* @param metricsName
* @param openSslEngineOptions
* @param password
* @param pemKeyCertOptions
* @param pemTrustOptions
* @param pfxKeyCertOptions
* @param pfxTrustOptions
* @param pipeliningLimit
* @param port
* @param proxyOptions
* @param receiveBufferSize
* @param reconnectAttempts
* @param reconnectInterval
* @param reuseAddress
* @param reusePort
* @param sendBufferSize
* @param soLinger
* @param ssl
* @param tcpCork
* @param tcpFastOpen
* @param tcpKeepAlive
* @param tcpNoDelay
* @param tcpQuickAck
* @param trafficClass
* @param trustAll
* @param trustStoreOptions
* @param useAlpn
* @param usePooledBuffers
* @param username
*
*
* NOTE: This function has been automatically generated from the [com.julienviet.pgclient.PgConnectOptions original] using Vert.x codegen.
*/
fun PgConnectOptions(
cachePreparedStatements: Boolean? = null,
connectTimeout: Int? = null,
crlPaths: Iterable? = null,
crlValues: Iterable? = null,
database: String? = null,
enabledCipherSuites: Iterable? = null,
enabledSecureTransportProtocols: Iterable? = null,
host: String? = null,
hostnameVerificationAlgorithm: String? = null,
idleTimeout: Int? = null,
jdkSslEngineOptions: io.vertx.core.net.JdkSSLEngineOptions? = null,
keyStoreOptions: io.vertx.core.net.JksOptions? = null,
localAddress: String? = null,
logActivity: Boolean? = null,
metricsName: String? = null,
openSslEngineOptions: io.vertx.core.net.OpenSSLEngineOptions? = null,
password: String? = null,
pemKeyCertOptions: io.vertx.core.net.PemKeyCertOptions? = null,
pemTrustOptions: io.vertx.core.net.PemTrustOptions? = null,
pfxKeyCertOptions: io.vertx.core.net.PfxOptions? = null,
pfxTrustOptions: io.vertx.core.net.PfxOptions? = null,
pipeliningLimit: Int? = null,
port: Int? = null,
proxyOptions: io.vertx.core.net.ProxyOptions? = null,
receiveBufferSize: Int? = null,
reconnectAttempts: Int? = null,
reconnectInterval: Long? = null,
reuseAddress: Boolean? = null,
reusePort: Boolean? = null,
sendBufferSize: Int? = null,
soLinger: Int? = null,
ssl: Boolean? = null,
tcpCork: Boolean? = null,
tcpFastOpen: Boolean? = null,
tcpKeepAlive: Boolean? = null,
tcpNoDelay: Boolean? = null,
tcpQuickAck: Boolean? = null,
trafficClass: Int? = null,
trustAll: Boolean? = null,
trustStoreOptions: io.vertx.core.net.JksOptions? = null,
useAlpn: Boolean? = null,
usePooledBuffers: Boolean? = null,
username: String? = null): PgConnectOptions = com.julienviet.pgclient.PgConnectOptions().apply {
if (cachePreparedStatements != null) {
this.setCachePreparedStatements(cachePreparedStatements)
}
if (connectTimeout != null) {
this.setConnectTimeout(connectTimeout)
}
if (crlPaths != null) {
for (item in crlPaths) {
this.addCrlPath(item)
}
}
if (crlValues != null) {
for (item in crlValues) {
this.addCrlValue(item)
}
}
if (database != null) {
this.setDatabase(database)
}
if (enabledCipherSuites != null) {
for (item in enabledCipherSuites) {
this.addEnabledCipherSuite(item)
}
}
if (enabledSecureTransportProtocols != null) {
this.setEnabledSecureTransportProtocols(enabledSecureTransportProtocols.toSet())
}
if (host != null) {
this.setHost(host)
}
if (hostnameVerificationAlgorithm != null) {
this.setHostnameVerificationAlgorithm(hostnameVerificationAlgorithm)
}
if (idleTimeout != null) {
this.setIdleTimeout(idleTimeout)
}
if (jdkSslEngineOptions != null) {
this.setJdkSslEngineOptions(jdkSslEngineOptions)
}
if (keyStoreOptions != null) {
this.setKeyStoreOptions(keyStoreOptions)
}
if (localAddress != null) {
this.setLocalAddress(localAddress)
}
if (logActivity != null) {
this.setLogActivity(logActivity)
}
if (metricsName != null) {
this.setMetricsName(metricsName)
}
if (openSslEngineOptions != null) {
this.setOpenSslEngineOptions(openSslEngineOptions)
}
if (password != null) {
this.setPassword(password)
}
if (pemKeyCertOptions != null) {
this.setPemKeyCertOptions(pemKeyCertOptions)
}
if (pemTrustOptions != null) {
this.setPemTrustOptions(pemTrustOptions)
}
if (pfxKeyCertOptions != null) {
this.setPfxKeyCertOptions(pfxKeyCertOptions)
}
if (pfxTrustOptions != null) {
this.setPfxTrustOptions(pfxTrustOptions)
}
if (pipeliningLimit != null) {
this.setPipeliningLimit(pipeliningLimit)
}
if (port != null) {
this.setPort(port)
}
if (proxyOptions != null) {
this.setProxyOptions(proxyOptions)
}
if (receiveBufferSize != null) {
this.setReceiveBufferSize(receiveBufferSize)
}
if (reconnectAttempts != null) {
this.setReconnectAttempts(reconnectAttempts)
}
if (reconnectInterval != null) {
this.setReconnectInterval(reconnectInterval)
}
if (reuseAddress != null) {
this.setReuseAddress(reuseAddress)
}
if (reusePort != null) {
this.setReusePort(reusePort)
}
if (sendBufferSize != null) {
this.setSendBufferSize(sendBufferSize)
}
if (soLinger != null) {
this.setSoLinger(soLinger)
}
if (ssl != null) {
this.setSsl(ssl)
}
if (tcpCork != null) {
this.setTcpCork(tcpCork)
}
if (tcpFastOpen != null) {
this.setTcpFastOpen(tcpFastOpen)
}
if (tcpKeepAlive != null) {
this.setTcpKeepAlive(tcpKeepAlive)
}
if (tcpNoDelay != null) {
this.setTcpNoDelay(tcpNoDelay)
}
if (tcpQuickAck != null) {
this.setTcpQuickAck(tcpQuickAck)
}
if (trafficClass != null) {
this.setTrafficClass(trafficClass)
}
if (trustAll != null) {
this.setTrustAll(trustAll)
}
if (trustStoreOptions != null) {
this.setTrustStoreOptions(trustStoreOptions)
}
if (useAlpn != null) {
this.setUseAlpn(useAlpn)
}
if (usePooledBuffers != null) {
this.setUsePooledBuffers(usePooledBuffers)
}
if (username != null) {
this.setUsername(username)
}
}