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

commonMain.aws.sdk.kotlin.services.xray.model.Edge.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.xray.model

import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant

/**
 * Information about a connection between two services. An edge can be a synchronous connection, such as typical call between client and service, or an asynchronous link, such as a Lambda function which retrieves an event from an SNS queue.
 */
public class Edge private constructor(builder: Builder) {
    /**
     * Aliases for the edge.
     */
    public val aliases: List? = builder.aliases
    /**
     * Describes an asynchronous connection, with a value of `link`.
     */
    public val edgeType: kotlin.String? = builder.edgeType
    /**
     * The end time of the last segment on the edge.
     */
    public val endTime: aws.smithy.kotlin.runtime.time.Instant? = builder.endTime
    /**
     * A histogram that maps the spread of event age when received by consumers. Age is calculated each time an event is received. Only populated when *EdgeType* is `link`.
     */
    public val receivedEventAgeHistogram: List? = builder.receivedEventAgeHistogram
    /**
     * Identifier of the edge. Unique within a service map.
     */
    public val referenceId: kotlin.Int? = builder.referenceId
    /**
     * A histogram that maps the spread of client response times on an edge. Only populated for synchronous edges.
     */
    public val responseTimeHistogram: List? = builder.responseTimeHistogram
    /**
     * The start time of the first segment on the edge.
     */
    public val startTime: aws.smithy.kotlin.runtime.time.Instant? = builder.startTime
    /**
     * Response statistics for segments on the edge.
     */
    public val summaryStatistics: aws.sdk.kotlin.services.xray.model.EdgeStatistics? = builder.summaryStatistics

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

    override fun toString(): kotlin.String = buildString {
        append("Edge(")
        append("aliases=$aliases,")
        append("edgeType=$edgeType,")
        append("endTime=$endTime,")
        append("receivedEventAgeHistogram=$receivedEventAgeHistogram,")
        append("referenceId=$referenceId,")
        append("responseTimeHistogram=$responseTimeHistogram,")
        append("startTime=$startTime,")
        append("summaryStatistics=$summaryStatistics")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = aliases?.hashCode() ?: 0
        result = 31 * result + (edgeType?.hashCode() ?: 0)
        result = 31 * result + (endTime?.hashCode() ?: 0)
        result = 31 * result + (receivedEventAgeHistogram?.hashCode() ?: 0)
        result = 31 * result + (referenceId ?: 0)
        result = 31 * result + (responseTimeHistogram?.hashCode() ?: 0)
        result = 31 * result + (startTime?.hashCode() ?: 0)
        result = 31 * result + (summaryStatistics?.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 Edge

        if (aliases != other.aliases) return false
        if (edgeType != other.edgeType) return false
        if (endTime != other.endTime) return false
        if (receivedEventAgeHistogram != other.receivedEventAgeHistogram) return false
        if (referenceId != other.referenceId) return false
        if (responseTimeHistogram != other.responseTimeHistogram) return false
        if (startTime != other.startTime) return false
        if (summaryStatistics != other.summaryStatistics) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Aliases for the edge.
         */
        public var aliases: List? = null
        /**
         * Describes an asynchronous connection, with a value of `link`.
         */
        public var edgeType: kotlin.String? = null
        /**
         * The end time of the last segment on the edge.
         */
        public var endTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * A histogram that maps the spread of event age when received by consumers. Age is calculated each time an event is received. Only populated when *EdgeType* is `link`.
         */
        public var receivedEventAgeHistogram: List? = null
        /**
         * Identifier of the edge. Unique within a service map.
         */
        public var referenceId: kotlin.Int? = null
        /**
         * A histogram that maps the spread of client response times on an edge. Only populated for synchronous edges.
         */
        public var responseTimeHistogram: List? = null
        /**
         * The start time of the first segment on the edge.
         */
        public var startTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * Response statistics for segments on the edge.
         */
        public var summaryStatistics: aws.sdk.kotlin.services.xray.model.EdgeStatistics? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.xray.model.Edge) : this() {
            this.aliases = x.aliases
            this.edgeType = x.edgeType
            this.endTime = x.endTime
            this.receivedEventAgeHistogram = x.receivedEventAgeHistogram
            this.referenceId = x.referenceId
            this.responseTimeHistogram = x.responseTimeHistogram
            this.startTime = x.startTime
            this.summaryStatistics = x.summaryStatistics
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy