
commonMain.aws.sdk.kotlin.services.batch.model.NetworkConfiguration.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.batch.model
/**
* The network configuration for jobs that are running on Fargate resources. Jobs that are running on EC2 resources must not specify this parameter.
*/
public class NetworkConfiguration private constructor(builder: Builder) {
/**
* Indicates whether the job has a public IP address. For a job that's running on Fargate resources in a private subnet to send outbound traffic to the internet (for example, to pull container images), the private subnet requires a NAT gateway be attached to route requests to the internet. For more information, see [Amazon ECS task networking](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html) in the *Amazon Elastic Container Service Developer Guide*. The default value is "`DISABLED`".
*/
public val assignPublicIp: aws.sdk.kotlin.services.batch.model.AssignPublicIp? = builder.assignPublicIp
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.batch.model.NetworkConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("NetworkConfiguration(")
append("assignPublicIp=$assignPublicIp")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = assignPublicIp?.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 (assignPublicIp != other.assignPublicIp) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.batch.model.NetworkConfiguration = Builder(this).apply(block).build()
public class Builder {
/**
* Indicates whether the job has a public IP address. For a job that's running on Fargate resources in a private subnet to send outbound traffic to the internet (for example, to pull container images), the private subnet requires a NAT gateway be attached to route requests to the internet. For more information, see [Amazon ECS task networking](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html) in the *Amazon Elastic Container Service Developer Guide*. The default value is "`DISABLED`".
*/
public var assignPublicIp: aws.sdk.kotlin.services.batch.model.AssignPublicIp? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.batch.model.NetworkConfiguration) : this() {
this.assignPublicIp = x.assignPublicIp
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.batch.model.NetworkConfiguration = NetworkConfiguration(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy