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

commonMain.aws.sdk.kotlin.services.groundstation.model.ComponentStatusData.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.groundstation.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Data on the status of agent components.
 */
public class ComponentStatusData private constructor(builder: Builder) {
    /**
     * Bytes received by the component.
     */
    public val bytesReceived: kotlin.Long? = builder.bytesReceived
    /**
     * Bytes sent by the component.
     */
    public val bytesSent: kotlin.Long? = builder.bytesSent
    /**
     * Capability ARN of the component.
     */
    public val capabilityArn: kotlin.String = requireNotNull(builder.capabilityArn) { "A non-null value must be provided for capabilityArn" }
    /**
     * The Component type.
     */
    public val componentType: kotlin.String = requireNotNull(builder.componentType) { "A non-null value must be provided for componentType" }
    /**
     * Dataflow UUID associated with the component.
     */
    public val dataflowId: kotlin.String = requireNotNull(builder.dataflowId) { "A non-null value must be provided for dataflowId" }
    /**
     * Packets dropped by component.
     */
    public val packetsDropped: kotlin.Long? = builder.packetsDropped
    /**
     * Component status.
     */
    public val status: aws.sdk.kotlin.services.groundstation.model.AgentStatus = requireNotNull(builder.status) { "A non-null value must be provided for status" }

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

    override fun toString(): kotlin.String = buildString {
        append("ComponentStatusData(")
        append("bytesReceived=$bytesReceived,")
        append("bytesSent=$bytesSent,")
        append("capabilityArn=$capabilityArn,")
        append("componentType=$componentType,")
        append("dataflowId=$dataflowId,")
        append("packetsDropped=$packetsDropped,")
        append("status=$status")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = bytesReceived?.hashCode() ?: 0
        result = 31 * result + (bytesSent?.hashCode() ?: 0)
        result = 31 * result + (capabilityArn.hashCode())
        result = 31 * result + (componentType.hashCode())
        result = 31 * result + (dataflowId.hashCode())
        result = 31 * result + (packetsDropped?.hashCode() ?: 0)
        result = 31 * result + (status.hashCode())
        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 ComponentStatusData

        if (bytesReceived != other.bytesReceived) return false
        if (bytesSent != other.bytesSent) return false
        if (capabilityArn != other.capabilityArn) return false
        if (componentType != other.componentType) return false
        if (dataflowId != other.dataflowId) return false
        if (packetsDropped != other.packetsDropped) return false
        if (status != other.status) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Bytes received by the component.
         */
        public var bytesReceived: kotlin.Long? = null
        /**
         * Bytes sent by the component.
         */
        public var bytesSent: kotlin.Long? = null
        /**
         * Capability ARN of the component.
         */
        public var capabilityArn: kotlin.String? = null
        /**
         * The Component type.
         */
        public var componentType: kotlin.String? = null
        /**
         * Dataflow UUID associated with the component.
         */
        public var dataflowId: kotlin.String? = null
        /**
         * Packets dropped by component.
         */
        public var packetsDropped: kotlin.Long? = null
        /**
         * Component status.
         */
        public var status: aws.sdk.kotlin.services.groundstation.model.AgentStatus? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.groundstation.model.ComponentStatusData) : this() {
            this.bytesReceived = x.bytesReceived
            this.bytesSent = x.bytesSent
            this.capabilityArn = x.capabilityArn
            this.componentType = x.componentType
            this.dataflowId = x.dataflowId
            this.packetsDropped = x.packetsDropped
            this.status = x.status
        }

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

        internal fun correctErrors(): Builder {
            if (capabilityArn == null) capabilityArn = ""
            if (componentType == null) componentType = ""
            if (dataflowId == null) dataflowId = ""
            if (status == null) status = AgentStatus.SdkUnknown("no value provided")
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy