All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.mgn.model.NetworkInterface.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.mgn.model



/**
 * Network interface.
 */
class NetworkInterface private constructor(builder: Builder) {
    /**
     * Network interface IPs.
     */
    val ips: List? = builder.ips
    /**
     * Network interface primary IP.
     */
    val isPrimary: kotlin.Boolean? = builder.isPrimary
    /**
     * Network interface Mac address.
     */
    val macAddress: kotlin.String? = builder.macAddress

    companion object {
        operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.mgn.model.NetworkInterface = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("NetworkInterface(")
        append("ips=$ips,")
        append("isPrimary=$isPrimary,")
        append("macAddress=$macAddress)")
    }

    override fun hashCode(): kotlin.Int {
        var result = ips?.hashCode() ?: 0
        result = 31 * result + (isPrimary?.hashCode() ?: 0)
        result = 31 * result + (macAddress?.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 NetworkInterface

        if (ips != other.ips) return false
        if (isPrimary != other.isPrimary) return false
        if (macAddress != other.macAddress) return false

        return true
    }

    inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.mgn.model.NetworkInterface = Builder(this).apply(block).build()

    class Builder {
        /**
         * Network interface IPs.
         */
        var ips: List? = null
        /**
         * Network interface primary IP.
         */
        var isPrimary: kotlin.Boolean? = null
        /**
         * Network interface Mac address.
         */
        var macAddress: kotlin.String? = null

        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.mgn.model.NetworkInterface) : this() {
            this.ips = x.ips
            this.isPrimary = x.isPrimary
            this.macAddress = x.macAddress
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.mgn.model.NetworkInterface = NetworkInterface(this)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy