
commonMain.aws.sdk.kotlin.services.lightsail.model.PutInstancePublicPortsRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.lightsail.model
public class PutInstancePublicPortsRequest private constructor(builder: Builder) {
/**
* The name of the instance for which to open ports.
*/
public val instanceName: kotlin.String? = builder.instanceName
/**
* An array of objects to describe the ports to open for the specified instance.
*/
public val portInfos: List? = builder.portInfos
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.lightsail.model.PutInstancePublicPortsRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PutInstancePublicPortsRequest(")
append("instanceName=$instanceName,")
append("portInfos=$portInfos)")
}
override fun hashCode(): kotlin.Int {
var result = instanceName?.hashCode() ?: 0
result = 31 * result + (portInfos?.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 PutInstancePublicPortsRequest
if (instanceName != other.instanceName) return false
if (portInfos != other.portInfos) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.lightsail.model.PutInstancePublicPortsRequest = Builder(this).apply(block).build()
public class Builder {
/**
* The name of the instance for which to open ports.
*/
public var instanceName: kotlin.String? = null
/**
* An array of objects to describe the ports to open for the specified instance.
*/
public var portInfos: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.lightsail.model.PutInstancePublicPortsRequest) : this() {
this.instanceName = x.instanceName
this.portInfos = x.portInfos
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.lightsail.model.PutInstancePublicPortsRequest = PutInstancePublicPortsRequest(this)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy