commonMain.aws.sdk.kotlin.services.eventbridge.model.NetworkConfiguration.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of eventbridge-jvm Show documentation
Show all versions of eventbridge-jvm Show documentation
The AWS SDK for Kotlin client for EventBridge
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.eventbridge.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* This structure specifies the network configuration for an ECS task.
*/
public class NetworkConfiguration private constructor(builder: Builder) {
/**
* Use this structure to specify the VPC subnets and security groups for the task, and whether a public IP address is to be used. This structure is relevant only for ECS tasks that use the `awsvpc` network mode.
*/
public val awsvpcConfiguration: aws.sdk.kotlin.services.eventbridge.model.AwsVpcConfiguration? = builder.awsvpcConfiguration
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.eventbridge.model.NetworkConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("NetworkConfiguration(")
append("awsvpcConfiguration=$awsvpcConfiguration")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = awsvpcConfiguration?.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 (awsvpcConfiguration != other.awsvpcConfiguration) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.eventbridge.model.NetworkConfiguration = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Use this structure to specify the VPC subnets and security groups for the task, and whether a public IP address is to be used. This structure is relevant only for ECS tasks that use the `awsvpc` network mode.
*/
public var awsvpcConfiguration: aws.sdk.kotlin.services.eventbridge.model.AwsVpcConfiguration? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.eventbridge.model.NetworkConfiguration) : this() {
this.awsvpcConfiguration = x.awsvpcConfiguration
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.eventbridge.model.NetworkConfiguration = NetworkConfiguration(this)
/**
* construct an [aws.sdk.kotlin.services.eventbridge.model.AwsVpcConfiguration] inside the given [block]
*/
public fun awsvpcConfiguration(block: aws.sdk.kotlin.services.eventbridge.model.AwsVpcConfiguration.Builder.() -> kotlin.Unit) {
this.awsvpcConfiguration = aws.sdk.kotlin.services.eventbridge.model.AwsVpcConfiguration.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}