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

commonMain.aws.sdk.kotlin.services.securityhub.model.NetworkPathComponent.kt Maven / Gradle / Ivy

There is a newer version: 1.3.35
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.securityhub.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Information about a network path component.
 */
public class NetworkPathComponent private constructor(builder: Builder) {
    /**
     * The identifier of a component in the network path.
     *
     * Length Constraints: Minimum of 1. Maximum of 32.
     */
    public val componentId: kotlin.String? = builder.componentId
    /**
     * The type of component.
     *
     * Length Constraints: Minimum of 1. Maximum of 32.
     */
    public val componentType: kotlin.String? = builder.componentType
    /**
     * Information about the component that comes after the current component in the network path.
     */
    public val egress: aws.sdk.kotlin.services.securityhub.model.NetworkHeader? = builder.egress
    /**
     * Information about the component that comes before the current node in the network path.
     */
    public val ingress: aws.sdk.kotlin.services.securityhub.model.NetworkHeader? = builder.ingress

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

    override fun toString(): kotlin.String = buildString {
        append("NetworkPathComponent(")
        append("componentId=$componentId,")
        append("componentType=$componentType,")
        append("egress=$egress,")
        append("ingress=$ingress")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = componentId?.hashCode() ?: 0
        result = 31 * result + (componentType?.hashCode() ?: 0)
        result = 31 * result + (egress?.hashCode() ?: 0)
        result = 31 * result + (ingress?.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 NetworkPathComponent

        if (componentId != other.componentId) return false
        if (componentType != other.componentType) return false
        if (egress != other.egress) return false
        if (ingress != other.ingress) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The identifier of a component in the network path.
         *
         * Length Constraints: Minimum of 1. Maximum of 32.
         */
        public var componentId: kotlin.String? = null
        /**
         * The type of component.
         *
         * Length Constraints: Minimum of 1. Maximum of 32.
         */
        public var componentType: kotlin.String? = null
        /**
         * Information about the component that comes after the current component in the network path.
         */
        public var egress: aws.sdk.kotlin.services.securityhub.model.NetworkHeader? = null
        /**
         * Information about the component that comes before the current node in the network path.
         */
        public var ingress: aws.sdk.kotlin.services.securityhub.model.NetworkHeader? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.securityhub.model.NetworkPathComponent) : this() {
            this.componentId = x.componentId
            this.componentType = x.componentType
            this.egress = x.egress
            this.ingress = x.ingress
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.securityhub.model.NetworkPathComponent = NetworkPathComponent(this)

        /**
         * construct an [aws.sdk.kotlin.services.securityhub.model.NetworkHeader] inside the given [block]
         */
        public fun egress(block: aws.sdk.kotlin.services.securityhub.model.NetworkHeader.Builder.() -> kotlin.Unit) {
            this.egress = aws.sdk.kotlin.services.securityhub.model.NetworkHeader.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.securityhub.model.NetworkHeader] inside the given [block]
         */
        public fun ingress(block: aws.sdk.kotlin.services.securityhub.model.NetworkHeader.Builder.() -> kotlin.Unit) {
            this.ingress = aws.sdk.kotlin.services.securityhub.model.NetworkHeader.invoke(block)
        }

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy