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

commonMain.aws.sdk.kotlin.services.deadline.model.GetStepResponse.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.deadline.model

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

public class GetStepResponse private constructor(builder: Builder) {
    /**
     * The date and time the resource was created.
     */
    public val createdAt: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.createdAt) { "A non-null value must be provided for createdAt" }
    /**
     * The user or system that created this resource.
     */
    public val createdBy: kotlin.String = requireNotNull(builder.createdBy) { "A non-null value must be provided for createdBy" }
    /**
     * The number of dependencies in the step.
     */
    public val dependencyCounts: aws.sdk.kotlin.services.deadline.model.DependencyCounts? = builder.dependencyCounts
    /**
     * The description of the step.
     *
     * This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.
     */
    public val description: kotlin.String? = builder.description
    /**
     * The date and time the resource ended running.
     */
    public val endedAt: aws.smithy.kotlin.runtime.time.Instant? = builder.endedAt
    /**
     * The life cycle status of the step.
     */
    public val lifecycleStatus: aws.sdk.kotlin.services.deadline.model.StepLifecycleStatus = requireNotNull(builder.lifecycleStatus) { "A non-null value must be provided for lifecycleStatus" }
    /**
     * A message that describes the lifecycle status of the step.
     */
    public val lifecycleStatusMessage: kotlin.String? = builder.lifecycleStatusMessage
    /**
     * The name of the step.
     */
    public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
    /**
     * A list of step parameters and the combination expression for the step.
     */
    public val parameterSpace: aws.sdk.kotlin.services.deadline.model.ParameterSpace? = builder.parameterSpace
    /**
     * The required capabilities of the step.
     */
    public val requiredCapabilities: aws.sdk.kotlin.services.deadline.model.StepRequiredCapabilities? = builder.requiredCapabilities
    /**
     * The date and time the resource started running.
     */
    public val startedAt: aws.smithy.kotlin.runtime.time.Instant? = builder.startedAt
    /**
     * The step ID.
     */
    public val stepId: kotlin.String = requireNotNull(builder.stepId) { "A non-null value must be provided for stepId" }
    /**
     * The task status with which the job started.
     */
    public val targetTaskRunStatus: aws.sdk.kotlin.services.deadline.model.StepTargetTaskRunStatus? = builder.targetTaskRunStatus
    /**
     * The task run status for the job.
     */
    public val taskRunStatus: aws.sdk.kotlin.services.deadline.model.TaskRunStatus = requireNotNull(builder.taskRunStatus) { "A non-null value must be provided for taskRunStatus" }
    /**
     * The number of tasks running on the job.
     */
    public val taskRunStatusCounts: Map = requireNotNull(builder.taskRunStatusCounts) { "A non-null value must be provided for taskRunStatusCounts" }
    /**
     * The date and time the resource was updated.
     */
    public val updatedAt: aws.smithy.kotlin.runtime.time.Instant? = builder.updatedAt
    /**
     * The user or system that updated this resource.
     */
    public val updatedBy: kotlin.String? = builder.updatedBy

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

    override fun toString(): kotlin.String = buildString {
        append("GetStepResponse(")
        append("createdAt=$createdAt,")
        append("createdBy=$createdBy,")
        append("dependencyCounts=$dependencyCounts,")
        append("description=*** Sensitive Data Redacted ***,")
        append("endedAt=$endedAt,")
        append("lifecycleStatus=$lifecycleStatus,")
        append("lifecycleStatusMessage=$lifecycleStatusMessage,")
        append("name=$name,")
        append("parameterSpace=$parameterSpace,")
        append("requiredCapabilities=$requiredCapabilities,")
        append("startedAt=$startedAt,")
        append("stepId=$stepId,")
        append("targetTaskRunStatus=$targetTaskRunStatus,")
        append("taskRunStatus=$taskRunStatus,")
        append("taskRunStatusCounts=$taskRunStatusCounts,")
        append("updatedAt=$updatedAt,")
        append("updatedBy=$updatedBy")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = createdAt.hashCode()
        result = 31 * result + (createdBy.hashCode())
        result = 31 * result + (dependencyCounts?.hashCode() ?: 0)
        result = 31 * result + (description?.hashCode() ?: 0)
        result = 31 * result + (endedAt?.hashCode() ?: 0)
        result = 31 * result + (lifecycleStatus.hashCode())
        result = 31 * result + (lifecycleStatusMessage?.hashCode() ?: 0)
        result = 31 * result + (name.hashCode())
        result = 31 * result + (parameterSpace?.hashCode() ?: 0)
        result = 31 * result + (requiredCapabilities?.hashCode() ?: 0)
        result = 31 * result + (startedAt?.hashCode() ?: 0)
        result = 31 * result + (stepId.hashCode())
        result = 31 * result + (targetTaskRunStatus?.hashCode() ?: 0)
        result = 31 * result + (taskRunStatus.hashCode())
        result = 31 * result + (taskRunStatusCounts.hashCode())
        result = 31 * result + (updatedAt?.hashCode() ?: 0)
        result = 31 * result + (updatedBy?.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 GetStepResponse

        if (createdAt != other.createdAt) return false
        if (createdBy != other.createdBy) return false
        if (dependencyCounts != other.dependencyCounts) return false
        if (description != other.description) return false
        if (endedAt != other.endedAt) return false
        if (lifecycleStatus != other.lifecycleStatus) return false
        if (lifecycleStatusMessage != other.lifecycleStatusMessage) return false
        if (name != other.name) return false
        if (parameterSpace != other.parameterSpace) return false
        if (requiredCapabilities != other.requiredCapabilities) return false
        if (startedAt != other.startedAt) return false
        if (stepId != other.stepId) return false
        if (targetTaskRunStatus != other.targetTaskRunStatus) return false
        if (taskRunStatus != other.taskRunStatus) return false
        if (taskRunStatusCounts != other.taskRunStatusCounts) return false
        if (updatedAt != other.updatedAt) return false
        if (updatedBy != other.updatedBy) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The date and time the resource was created.
         */
        public var createdAt: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The user or system that created this resource.
         */
        public var createdBy: kotlin.String? = null
        /**
         * The number of dependencies in the step.
         */
        public var dependencyCounts: aws.sdk.kotlin.services.deadline.model.DependencyCounts? = null
        /**
         * The description of the step.
         *
         * This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.
         */
        public var description: kotlin.String? = null
        /**
         * The date and time the resource ended running.
         */
        public var endedAt: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The life cycle status of the step.
         */
        public var lifecycleStatus: aws.sdk.kotlin.services.deadline.model.StepLifecycleStatus? = null
        /**
         * A message that describes the lifecycle status of the step.
         */
        public var lifecycleStatusMessage: kotlin.String? = null
        /**
         * The name of the step.
         */
        public var name: kotlin.String? = null
        /**
         * A list of step parameters and the combination expression for the step.
         */
        public var parameterSpace: aws.sdk.kotlin.services.deadline.model.ParameterSpace? = null
        /**
         * The required capabilities of the step.
         */
        public var requiredCapabilities: aws.sdk.kotlin.services.deadline.model.StepRequiredCapabilities? = null
        /**
         * The date and time the resource started running.
         */
        public var startedAt: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The step ID.
         */
        public var stepId: kotlin.String? = null
        /**
         * The task status with which the job started.
         */
        public var targetTaskRunStatus: aws.sdk.kotlin.services.deadline.model.StepTargetTaskRunStatus? = null
        /**
         * The task run status for the job.
         */
        public var taskRunStatus: aws.sdk.kotlin.services.deadline.model.TaskRunStatus? = null
        /**
         * The number of tasks running on the job.
         */
        public var taskRunStatusCounts: Map? = null
        /**
         * The date and time the resource was updated.
         */
        public var updatedAt: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The user or system that updated this resource.
         */
        public var updatedBy: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.deadline.model.GetStepResponse) : this() {
            this.createdAt = x.createdAt
            this.createdBy = x.createdBy
            this.dependencyCounts = x.dependencyCounts
            this.description = x.description
            this.endedAt = x.endedAt
            this.lifecycleStatus = x.lifecycleStatus
            this.lifecycleStatusMessage = x.lifecycleStatusMessage
            this.name = x.name
            this.parameterSpace = x.parameterSpace
            this.requiredCapabilities = x.requiredCapabilities
            this.startedAt = x.startedAt
            this.stepId = x.stepId
            this.targetTaskRunStatus = x.targetTaskRunStatus
            this.taskRunStatus = x.taskRunStatus
            this.taskRunStatusCounts = x.taskRunStatusCounts
            this.updatedAt = x.updatedAt
            this.updatedBy = x.updatedBy
        }

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

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

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

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

        internal fun correctErrors(): Builder {
            if (createdAt == null) createdAt = Instant.fromEpochSeconds(0)
            if (createdBy == null) createdBy = ""
            if (lifecycleStatus == null) lifecycleStatus = StepLifecycleStatus.SdkUnknown("no value provided")
            if (name == null) name = ""
            if (stepId == null) stepId = ""
            if (taskRunStatus == null) taskRunStatus = TaskRunStatus.SdkUnknown("no value provided")
            if (taskRunStatusCounts == null) taskRunStatusCounts = emptyMap()
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy