
commonMain.aws.sdk.kotlin.services.emr.model.PortRange.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.emr.model
/**
* A list of port ranges that are permitted to allow inbound traffic from all public IP addresses. To specify a single port, use the same value for `MinRange` and `MaxRange`.
*/
public class PortRange private constructor(builder: Builder) {
/**
* The smallest port number in a specified range of port numbers.
*/
public val maxRange: kotlin.Int? = builder.maxRange
/**
* The smallest port number in a specified range of port numbers.
*/
public val minRange: kotlin.Int? = builder.minRange
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.emr.model.PortRange = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PortRange(")
append("maxRange=$maxRange,")
append("minRange=$minRange)")
}
override fun hashCode(): kotlin.Int {
var result = maxRange ?: 0
result = 31 * result + (minRange ?: 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 PortRange
if (maxRange != other.maxRange) return false
if (minRange != other.minRange) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.emr.model.PortRange = Builder(this).apply(block).build()
public class Builder {
/**
* The smallest port number in a specified range of port numbers.
*/
public var maxRange: kotlin.Int? = null
/**
* The smallest port number in a specified range of port numbers.
*/
public var minRange: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.emr.model.PortRange) : this() {
this.maxRange = x.maxRange
this.minRange = x.minRange
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.emr.model.PortRange = PortRange(this)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy