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

commonMain.aws.sdk.kotlin.services.deadline.model.GetQueueResponse.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 GetQueueResponse private constructor(builder: Builder) {
    /**
     * The storage profile IDs for the queue.
     */
    public val allowedStorageProfileIds: List? = builder.allowedStorageProfileIds
    /**
     * The reason the queue was blocked.
     */
    public val blockedReason: aws.sdk.kotlin.services.deadline.model.QueueBlockedReason? = builder.blockedReason
    /**
     * 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 default action taken on a queue if a budget wasn't configured.
     */
    public val defaultBudgetAction: aws.sdk.kotlin.services.deadline.model.DefaultQueueBudgetAction = requireNotNull(builder.defaultBudgetAction) { "A non-null value must be provided for defaultBudgetAction" }
    /**
     * The description of the queue.
     *
     * 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 display name of the queue.
     *
     * 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 displayName: kotlin.String = requireNotNull(builder.displayName) { "A non-null value must be provided for displayName" }
    /**
     * The farm ID for the queue.
     */
    public val farmId: kotlin.String = requireNotNull(builder.farmId) { "A non-null value must be provided for farmId" }
    /**
     * The job attachment settings for the queue.
     */
    public val jobAttachmentSettings: aws.sdk.kotlin.services.deadline.model.JobAttachmentSettings? = builder.jobAttachmentSettings
    /**
     * The jobs in the queue ran as this specified POSIX user.
     */
    public val jobRunAsUser: aws.sdk.kotlin.services.deadline.model.JobRunAsUser? = builder.jobRunAsUser
    /**
     * The queue ID.
     */
    public val queueId: kotlin.String = requireNotNull(builder.queueId) { "A non-null value must be provided for queueId" }
    /**
     * A list of the required file system location names in the queue.
     */
    public val requiredFileSystemLocationNames: List? = builder.requiredFileSystemLocationNames
    /**
     * The IAM role ARN.
     */
    public val roleArn: kotlin.String? = builder.roleArn
    /**
     * The status of the queue.
     * + `ACTIVE`–The queue is active.
     * + `SCHEDULING`–The queue is scheduling.
     * + `SCHEDULING_BLOCKED`–The queue scheduling is blocked. See the provided reason.
     */
    public val status: aws.sdk.kotlin.services.deadline.model.QueueStatus = 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.GetQueueResponse = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("GetQueueResponse(")
        append("allowedStorageProfileIds=$allowedStorageProfileIds,")
        append("blockedReason=$blockedReason,")
        append("createdAt=$createdAt,")
        append("createdBy=$createdBy,")
        append("defaultBudgetAction=$defaultBudgetAction,")
        append("description=*** Sensitive Data Redacted ***,")
        append("displayName=$displayName,")
        append("farmId=$farmId,")
        append("jobAttachmentSettings=$jobAttachmentSettings,")
        append("jobRunAsUser=$jobRunAsUser,")
        append("queueId=$queueId,")
        append("requiredFileSystemLocationNames=*** Sensitive Data Redacted ***,")
        append("roleArn=$roleArn,")
        append("status=$status,")
        append("updatedAt=$updatedAt,")
        append("updatedBy=$updatedBy")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = allowedStorageProfileIds?.hashCode() ?: 0
        result = 31 * result + (blockedReason?.hashCode() ?: 0)
        result = 31 * result + (createdAt.hashCode())
        result = 31 * result + (createdBy.hashCode())
        result = 31 * result + (defaultBudgetAction.hashCode())
        result = 31 * result + (description?.hashCode() ?: 0)
        result = 31 * result + (displayName.hashCode())
        result = 31 * result + (farmId.hashCode())
        result = 31 * result + (jobAttachmentSettings?.hashCode() ?: 0)
        result = 31 * result + (jobRunAsUser?.hashCode() ?: 0)
        result = 31 * result + (queueId.hashCode())
        result = 31 * result + (requiredFileSystemLocationNames?.hashCode() ?: 0)
        result = 31 * result + (roleArn?.hashCode() ?: 0)
        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 GetQueueResponse

        if (allowedStorageProfileIds != other.allowedStorageProfileIds) return false
        if (blockedReason != other.blockedReason) return false
        if (createdAt != other.createdAt) return false
        if (createdBy != other.createdBy) return false
        if (defaultBudgetAction != other.defaultBudgetAction) return false
        if (description != other.description) return false
        if (displayName != other.displayName) return false
        if (farmId != other.farmId) return false
        if (jobAttachmentSettings != other.jobAttachmentSettings) return false
        if (jobRunAsUser != other.jobRunAsUser) return false
        if (queueId != other.queueId) return false
        if (requiredFileSystemLocationNames != other.requiredFileSystemLocationNames) return false
        if (roleArn != other.roleArn) 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.GetQueueResponse = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The storage profile IDs for the queue.
         */
        public var allowedStorageProfileIds: List? = null
        /**
         * The reason the queue was blocked.
         */
        public var blockedReason: aws.sdk.kotlin.services.deadline.model.QueueBlockedReason? = null
        /**
         * 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 default action taken on a queue if a budget wasn't configured.
         */
        public var defaultBudgetAction: aws.sdk.kotlin.services.deadline.model.DefaultQueueBudgetAction? = null
        /**
         * The description of the queue.
         *
         * 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 display name of the queue.
         *
         * 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 displayName: kotlin.String? = null
        /**
         * The farm ID for the queue.
         */
        public var farmId: kotlin.String? = null
        /**
         * The job attachment settings for the queue.
         */
        public var jobAttachmentSettings: aws.sdk.kotlin.services.deadline.model.JobAttachmentSettings? = null
        /**
         * The jobs in the queue ran as this specified POSIX user.
         */
        public var jobRunAsUser: aws.sdk.kotlin.services.deadline.model.JobRunAsUser? = null
        /**
         * The queue ID.
         */
        public var queueId: kotlin.String? = null
        /**
         * A list of the required file system location names in the queue.
         */
        public var requiredFileSystemLocationNames: List? = null
        /**
         * The IAM role ARN.
         */
        public var roleArn: kotlin.String? = null
        /**
         * The status of the queue.
         * + `ACTIVE`–The queue is active.
         * + `SCHEDULING`–The queue is scheduling.
         * + `SCHEDULING_BLOCKED`–The queue scheduling is blocked. See the provided reason.
         */
        public var status: aws.sdk.kotlin.services.deadline.model.QueueStatus? = 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.GetQueueResponse) : this() {
            this.allowedStorageProfileIds = x.allowedStorageProfileIds
            this.blockedReason = x.blockedReason
            this.createdAt = x.createdAt
            this.createdBy = x.createdBy
            this.defaultBudgetAction = x.defaultBudgetAction
            this.description = x.description
            this.displayName = x.displayName
            this.farmId = x.farmId
            this.jobAttachmentSettings = x.jobAttachmentSettings
            this.jobRunAsUser = x.jobRunAsUser
            this.queueId = x.queueId
            this.requiredFileSystemLocationNames = x.requiredFileSystemLocationNames
            this.roleArn = x.roleArn
            this.status = x.status
            this.updatedAt = x.updatedAt
            this.updatedBy = x.updatedBy
        }

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

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

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

        internal fun correctErrors(): Builder {
            if (createdAt == null) createdAt = Instant.fromEpochSeconds(0)
            if (createdBy == null) createdBy = ""
            if (defaultBudgetAction == null) defaultBudgetAction = DefaultQueueBudgetAction.SdkUnknown("no value provided")
            if (displayName == null) displayName = ""
            if (farmId == null) farmId = ""
            if (queueId == null) queueId = ""
            if (status == null) status = QueueStatus.SdkUnknown("no value provided")
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy