commonMain.aws.sdk.kotlin.services.apprunner.model.NetworkConfiguration.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
/**
* Describes configuration settings related to network traffic of an App Runner service. Consists of embedded objects for each configurable network feature.
*/
public class NetworkConfiguration private constructor(builder: Builder) {
/**
* Network configuration settings for outbound message traffic.
*/
public val egressConfiguration: aws.sdk.kotlin.services.apprunner.model.EgressConfiguration? = builder.egressConfiguration
/**
* Network configuration settings for inbound message traffic.
*/
public val ingressConfiguration: aws.sdk.kotlin.services.apprunner.model.IngressConfiguration? = builder.ingressConfiguration
/**
* App Runner provides you with the option to choose between *Internet Protocol version 4 (IPv4)* and *dual stack* (IPv4 and IPv6) for your incoming public network configuration. This is an optional parameter. If you do not specify an `IpAddressType`, it defaults to select IPv4.
*
* Currently, App Runner supports dual stack for only Public endpoint. Only IPv4 is supported for Private endpoint. If you update a service that's using dual-stack Public endpoint to a Private endpoint, your App Runner service will default to support only IPv4 for Private endpoint and fail to receive traffic originating from IPv6 endpoint.
*/
public val ipAddressType: aws.sdk.kotlin.services.apprunner.model.IpAddressType? = builder.ipAddressType
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.apprunner.model.NetworkConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("NetworkConfiguration(")
append("egressConfiguration=$egressConfiguration,")
append("ingressConfiguration=$ingressConfiguration,")
append("ipAddressType=$ipAddressType")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = egressConfiguration?.hashCode() ?: 0
result = 31 * result + (ingressConfiguration?.hashCode() ?: 0)
result = 31 * result + (ipAddressType?.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 NetworkConfiguration
if (egressConfiguration != other.egressConfiguration) return false
if (ingressConfiguration != other.ingressConfiguration) return false
if (ipAddressType != other.ipAddressType) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.apprunner.model.NetworkConfiguration = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Network configuration settings for outbound message traffic.
*/
public var egressConfiguration: aws.sdk.kotlin.services.apprunner.model.EgressConfiguration? = null
/**
* Network configuration settings for inbound message traffic.
*/
public var ingressConfiguration: aws.sdk.kotlin.services.apprunner.model.IngressConfiguration? = null
/**
* App Runner provides you with the option to choose between *Internet Protocol version 4 (IPv4)* and *dual stack* (IPv4 and IPv6) for your incoming public network configuration. This is an optional parameter. If you do not specify an `IpAddressType`, it defaults to select IPv4.
*
* Currently, App Runner supports dual stack for only Public endpoint. Only IPv4 is supported for Private endpoint. If you update a service that's using dual-stack Public endpoint to a Private endpoint, your App Runner service will default to support only IPv4 for Private endpoint and fail to receive traffic originating from IPv6 endpoint.
*/
public var ipAddressType: aws.sdk.kotlin.services.apprunner.model.IpAddressType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.apprunner.model.NetworkConfiguration) : this() {
this.egressConfiguration = x.egressConfiguration
this.ingressConfiguration = x.ingressConfiguration
this.ipAddressType = x.ipAddressType
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.apprunner.model.NetworkConfiguration = NetworkConfiguration(this)
/**
* construct an [aws.sdk.kotlin.services.apprunner.model.EgressConfiguration] inside the given [block]
*/
public fun egressConfiguration(block: aws.sdk.kotlin.services.apprunner.model.EgressConfiguration.Builder.() -> kotlin.Unit) {
this.egressConfiguration = aws.sdk.kotlin.services.apprunner.model.EgressConfiguration.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.apprunner.model.IngressConfiguration] inside the given [block]
*/
public fun ingressConfiguration(block: aws.sdk.kotlin.services.apprunner.model.IngressConfiguration.Builder.() -> kotlin.Unit) {
this.ingressConfiguration = aws.sdk.kotlin.services.apprunner.model.IngressConfiguration.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}