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

commonMain.aws.sdk.kotlin.services.fms.model.App.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.fms.model



/**
 * An individual Firewall Manager application.
 */
public class App private constructor(builder: Builder) {
    /**
     * The application's name.
     */
    public val appName: kotlin.String? = builder.appName
    /**
     * The application's port number, for example `80`.
     */
    public val port: kotlin.Long? = builder.port
    /**
     * The IP protocol name or number. The name can be one of `tcp`, `udp`, or `icmp`. For information on possible numbers, see [Protocol Numbers](https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml).
     */
    public val protocol: kotlin.String? = builder.protocol

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

    override fun toString(): kotlin.String = buildString {
        append("App(")
        append("appName=$appName,")
        append("port=$port,")
        append("protocol=$protocol")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = appName?.hashCode() ?: 0
        result = 31 * result + (port?.hashCode() ?: 0)
        result = 31 * result + (protocol?.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 App

        if (appName != other.appName) return false
        if (port != other.port) return false
        if (protocol != other.protocol) return false

        return true
    }

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

    public class Builder {
        /**
         * The application's name.
         */
        public var appName: kotlin.String? = null
        /**
         * The application's port number, for example `80`.
         */
        public var port: kotlin.Long? = null
        /**
         * The IP protocol name or number. The name can be one of `tcp`, `udp`, or `icmp`. For information on possible numbers, see [Protocol Numbers](https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml).
         */
        public var protocol: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.fms.model.App) : this() {
            this.appName = x.appName
            this.port = x.port
            this.protocol = x.protocol
        }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy