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

commonMain.aws.sdk.kotlin.services.kinesisvideo.model.EdgeAgentStatus.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.kinesisvideo.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * An object that contains the latest status details for an edge agent's recorder and uploader jobs. Use this information to determine the current health of an edge agent.
 */
public class EdgeAgentStatus private constructor(builder: Builder) {
    /**
     * The latest status of a stream’s edge recording job.
     */
    public val lastRecorderStatus: aws.sdk.kotlin.services.kinesisvideo.model.LastRecorderStatus? = builder.lastRecorderStatus
    /**
     * The latest status of a stream’s edge to cloud uploader job.
     */
    public val lastUploaderStatus: aws.sdk.kotlin.services.kinesisvideo.model.LastUploaderStatus? = builder.lastUploaderStatus

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

    override fun toString(): kotlin.String = buildString {
        append("EdgeAgentStatus(")
        append("lastRecorderStatus=$lastRecorderStatus,")
        append("lastUploaderStatus=$lastUploaderStatus")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = lastRecorderStatus?.hashCode() ?: 0
        result = 31 * result + (lastUploaderStatus?.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 EdgeAgentStatus

        if (lastRecorderStatus != other.lastRecorderStatus) return false
        if (lastUploaderStatus != other.lastUploaderStatus) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The latest status of a stream’s edge recording job.
         */
        public var lastRecorderStatus: aws.sdk.kotlin.services.kinesisvideo.model.LastRecorderStatus? = null
        /**
         * The latest status of a stream’s edge to cloud uploader job.
         */
        public var lastUploaderStatus: aws.sdk.kotlin.services.kinesisvideo.model.LastUploaderStatus? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.kinesisvideo.model.EdgeAgentStatus) : this() {
            this.lastRecorderStatus = x.lastRecorderStatus
            this.lastUploaderStatus = x.lastUploaderStatus
        }

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy