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

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

/**
 * The details of a queue-fleet association.
 */
public class QueueFleetAssociationSummary 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 fleet ID.
     */
    public val fleetId: kotlin.String = requireNotNull(builder.fleetId) { "A non-null value must be provided for fleetId" }
    /**
     * The queue ID.
     */
    public val queueId: kotlin.String = requireNotNull(builder.queueId) { "A non-null value must be provided for queueId" }
    /**
     * The status of task scheduling in the queue-fleet association.
     * + `ACTIVE`–Association is active.
     * + `STOP_SCHEDULING_AND_COMPLETE_TASKS`–Association has stopped scheduling new tasks and is completing current tasks.
     * + `STOP_SCHEDULING_AND_CANCEL_TASKS`–Association has stopped scheduling new tasks and is canceling current tasks.
     * + `STOPPED`–Association has been stopped.
     */
    public val status: aws.sdk.kotlin.services.deadline.model.QueueFleetAssociationStatus = requireNotNull(builder.status) { "A non-null value must be provided for status" }
    /**
     * 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.QueueFleetAssociationSummary = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("QueueFleetAssociationSummary(")
        append("createdAt=$createdAt,")
        append("createdBy=$createdBy,")
        append("fleetId=$fleetId,")
        append("queueId=$queueId,")
        append("status=$status,")
        append("updatedAt=$updatedAt,")
        append("updatedBy=$updatedBy")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = createdAt.hashCode()
        result = 31 * result + (createdBy.hashCode())
        result = 31 * result + (fleetId.hashCode())
        result = 31 * result + (queueId.hashCode())
        result = 31 * result + (status.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 QueueFleetAssociationSummary

        if (createdAt != other.createdAt) return false
        if (createdBy != other.createdBy) return false
        if (fleetId != other.fleetId) return false
        if (queueId != other.queueId) return false
        if (status != other.status) 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.QueueFleetAssociationSummary = 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 fleet ID.
         */
        public var fleetId: kotlin.String? = null
        /**
         * The queue ID.
         */
        public var queueId: kotlin.String? = null
        /**
         * The status of task scheduling in the queue-fleet association.
         * + `ACTIVE`–Association is active.
         * + `STOP_SCHEDULING_AND_COMPLETE_TASKS`–Association has stopped scheduling new tasks and is completing current tasks.
         * + `STOP_SCHEDULING_AND_CANCEL_TASKS`–Association has stopped scheduling new tasks and is canceling current tasks.
         * + `STOPPED`–Association has been stopped.
         */
        public var status: aws.sdk.kotlin.services.deadline.model.QueueFleetAssociationStatus? = 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.QueueFleetAssociationSummary) : this() {
            this.createdAt = x.createdAt
            this.createdBy = x.createdBy
            this.fleetId = x.fleetId
            this.queueId = x.queueId
            this.status = x.status
            this.updatedAt = x.updatedAt
            this.updatedBy = x.updatedBy
        }

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

        internal fun correctErrors(): Builder {
            if (createdAt == null) createdAt = Instant.fromEpochSeconds(0)
            if (createdBy == null) createdBy = ""
            if (fleetId == null) fleetId = ""
            if (queueId == null) queueId = ""
            if (status == null) status = QueueFleetAssociationStatus.SdkUnknown("no value provided")
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy