commonMain.aws.sdk.kotlin.services.elasticbeanstalk.model.EnvironmentLink.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of elasticbeanstalk-jvm Show documentation
Show all versions of elasticbeanstalk-jvm Show documentation
The AWS SDK for Kotlin client for Elastic Beanstalk
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.elasticbeanstalk.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* A link to another environment, defined in the environment's manifest. Links provide connection information in system properties that can be used to connect to another environment in the same group. See [Environment Manifest (env.yaml)](https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environment-cfg-manifest.html) for details.
*/
public class EnvironmentLink private constructor(builder: Builder) {
/**
* The name of the linked environment (the dependency).
*/
public val environmentName: kotlin.String? = builder.environmentName
/**
* The name of the link.
*/
public val linkName: kotlin.String? = builder.linkName
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.elasticbeanstalk.model.EnvironmentLink = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("EnvironmentLink(")
append("environmentName=$environmentName,")
append("linkName=$linkName")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = environmentName?.hashCode() ?: 0
result = 31 * result + (linkName?.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 EnvironmentLink
if (environmentName != other.environmentName) return false
if (linkName != other.linkName) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.elasticbeanstalk.model.EnvironmentLink = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name of the linked environment (the dependency).
*/
public var environmentName: kotlin.String? = null
/**
* The name of the link.
*/
public var linkName: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.elasticbeanstalk.model.EnvironmentLink) : this() {
this.environmentName = x.environmentName
this.linkName = x.linkName
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.elasticbeanstalk.model.EnvironmentLink = EnvironmentLink(this)
internal fun correctErrors(): Builder {
return this
}
}
}