
commonMain.aws.sdk.kotlin.services.kendra.model.OnPremiseConfiguration.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.kendra.model
/**
* Provides the configuration information to connect to GitHub Enterprise Server (on premises).
*/
public class OnPremiseConfiguration private constructor(builder: Builder) {
/**
* The GitHub host URL or API endpoint URL. For example, *https://on-prem-host-url/api/v3/*
*/
public val hostUrl: kotlin.String = requireNotNull(builder.hostUrl) { "A non-null value must be provided for hostUrl" }
/**
* The name of the organization of the GitHub Enterprise Server (in-premise) account you want to connect to. You can find your organization name by logging into GitHub desktop and selecting **Your organizations** under your profile picture dropdown.
*/
public val organizationName: kotlin.String = requireNotNull(builder.organizationName) { "A non-null value must be provided for organizationName" }
/**
* The path to the SSL certificate stored in an Amazon S3 bucket. You use this to connect to GitHub if you require a secure SSL connection.
*
* You can simply generate a self-signed X509 certificate on any computer using OpenSSL. For an example of using OpenSSL to create an X509 certificate, see [Create and sign an X509 certificate](https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/configuring-https-ssl.html).
*/
public val sslCertificateS3Path: aws.sdk.kotlin.services.kendra.model.S3Path? = builder.sslCertificateS3Path
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.kendra.model.OnPremiseConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("OnPremiseConfiguration(")
append("hostUrl=$hostUrl,")
append("organizationName=$organizationName,")
append("sslCertificateS3Path=$sslCertificateS3Path")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = hostUrl.hashCode()
result = 31 * result + (organizationName.hashCode())
result = 31 * result + (sslCertificateS3Path?.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 OnPremiseConfiguration
if (hostUrl != other.hostUrl) return false
if (organizationName != other.organizationName) return false
if (sslCertificateS3Path != other.sslCertificateS3Path) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.kendra.model.OnPremiseConfiguration = Builder(this).apply(block).build()
public class Builder {
/**
* The GitHub host URL or API endpoint URL. For example, *https://on-prem-host-url/api/v3/*
*/
public var hostUrl: kotlin.String? = null
/**
* The name of the organization of the GitHub Enterprise Server (in-premise) account you want to connect to. You can find your organization name by logging into GitHub desktop and selecting **Your organizations** under your profile picture dropdown.
*/
public var organizationName: kotlin.String? = null
/**
* The path to the SSL certificate stored in an Amazon S3 bucket. You use this to connect to GitHub if you require a secure SSL connection.
*
* You can simply generate a self-signed X509 certificate on any computer using OpenSSL. For an example of using OpenSSL to create an X509 certificate, see [Create and sign an X509 certificate](https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/configuring-https-ssl.html).
*/
public var sslCertificateS3Path: aws.sdk.kotlin.services.kendra.model.S3Path? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.kendra.model.OnPremiseConfiguration) : this() {
this.hostUrl = x.hostUrl
this.organizationName = x.organizationName
this.sslCertificateS3Path = x.sslCertificateS3Path
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.kendra.model.OnPremiseConfiguration = OnPremiseConfiguration(this)
/**
* construct an [aws.sdk.kotlin.services.kendra.model.S3Path] inside the given [block]
*/
public fun sslCertificateS3Path(block: aws.sdk.kotlin.services.kendra.model.S3Path.Builder.() -> kotlin.Unit) {
this.sslCertificateS3Path = aws.sdk.kotlin.services.kendra.model.S3Path.invoke(block)
}
internal fun correctErrors(): Builder {
if (hostUrl == null) hostUrl = ""
if (organizationName == null) organizationName = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy