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

commonMain.aws.sdk.kotlin.services.tnb.model.GetSolNetworkOperationTaskDetails.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.tnb.model

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

/**
 * Gets the details of a network operation.
 *
 * A network operation is any operation that is done to your network, such as network instance instantiation or termination.
 */
public class GetSolNetworkOperationTaskDetails private constructor(builder: Builder) {
    /**
     * Context for the network operation task.
     */
    public val taskContext: Map? = builder.taskContext
    /**
     * Task end time.
     */
    public val taskEndTime: aws.smithy.kotlin.runtime.time.Instant? = builder.taskEndTime
    /**
     * Task error details.
     */
    public val taskErrorDetails: aws.sdk.kotlin.services.tnb.model.ErrorInfo? = builder.taskErrorDetails
    /**
     * Task name.
     */
    public val taskName: kotlin.String? = builder.taskName
    /**
     * Task start time.
     */
    public val taskStartTime: aws.smithy.kotlin.runtime.time.Instant? = builder.taskStartTime
    /**
     * Task status.
     */
    public val taskStatus: aws.sdk.kotlin.services.tnb.model.TaskStatus? = builder.taskStatus

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

    override fun toString(): kotlin.String = buildString {
        append("GetSolNetworkOperationTaskDetails(")
        append("taskContext=$taskContext,")
        append("taskEndTime=$taskEndTime,")
        append("taskErrorDetails=$taskErrorDetails,")
        append("taskName=$taskName,")
        append("taskStartTime=$taskStartTime,")
        append("taskStatus=$taskStatus")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = taskContext?.hashCode() ?: 0
        result = 31 * result + (taskEndTime?.hashCode() ?: 0)
        result = 31 * result + (taskErrorDetails?.hashCode() ?: 0)
        result = 31 * result + (taskName?.hashCode() ?: 0)
        result = 31 * result + (taskStartTime?.hashCode() ?: 0)
        result = 31 * result + (taskStatus?.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 GetSolNetworkOperationTaskDetails

        if (taskContext != other.taskContext) return false
        if (taskEndTime != other.taskEndTime) return false
        if (taskErrorDetails != other.taskErrorDetails) return false
        if (taskName != other.taskName) return false
        if (taskStartTime != other.taskStartTime) return false
        if (taskStatus != other.taskStatus) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Context for the network operation task.
         */
        public var taskContext: Map? = null
        /**
         * Task end time.
         */
        public var taskEndTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * Task error details.
         */
        public var taskErrorDetails: aws.sdk.kotlin.services.tnb.model.ErrorInfo? = null
        /**
         * Task name.
         */
        public var taskName: kotlin.String? = null
        /**
         * Task start time.
         */
        public var taskStartTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * Task status.
         */
        public var taskStatus: aws.sdk.kotlin.services.tnb.model.TaskStatus? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.tnb.model.GetSolNetworkOperationTaskDetails) : this() {
            this.taskContext = x.taskContext
            this.taskEndTime = x.taskEndTime
            this.taskErrorDetails = x.taskErrorDetails
            this.taskName = x.taskName
            this.taskStartTime = x.taskStartTime
            this.taskStatus = x.taskStatus
        }

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy