commonMain.aws.sdk.kotlin.services.apprunner.model.CreateConnectionRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of apprunner-jvm Show documentation
Show all versions of apprunner-jvm Show documentation
The AWS SDK for Kotlin client for AppRunner
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.apprunner.model
import aws.smithy.kotlin.runtime.SdkDsl
public class CreateConnectionRequest private constructor(builder: Builder) {
/**
* A name for the new connection. It must be unique across all App Runner connections for the Amazon Web Services account in the Amazon Web Services Region.
*/
public val connectionName: kotlin.String? = builder.connectionName
/**
* The source repository provider.
*/
public val providerType: aws.sdk.kotlin.services.apprunner.model.ProviderType? = builder.providerType
/**
* A list of metadata items that you can associate with your connection resource. A tag is a key-value pair.
*/
public val tags: List? = builder.tags
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.apprunner.model.CreateConnectionRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateConnectionRequest(")
append("connectionName=$connectionName,")
append("providerType=$providerType,")
append("tags=$tags")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = connectionName?.hashCode() ?: 0
result = 31 * result + (providerType?.hashCode() ?: 0)
result = 31 * result + (tags?.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 CreateConnectionRequest
if (connectionName != other.connectionName) return false
if (providerType != other.providerType) return false
if (tags != other.tags) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.apprunner.model.CreateConnectionRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A name for the new connection. It must be unique across all App Runner connections for the Amazon Web Services account in the Amazon Web Services Region.
*/
public var connectionName: kotlin.String? = null
/**
* The source repository provider.
*/
public var providerType: aws.sdk.kotlin.services.apprunner.model.ProviderType? = null
/**
* A list of metadata items that you can associate with your connection resource. A tag is a key-value pair.
*/
public var tags: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.apprunner.model.CreateConnectionRequest) : this() {
this.connectionName = x.connectionName
this.providerType = x.providerType
this.tags = x.tags
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.apprunner.model.CreateConnectionRequest = CreateConnectionRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}