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

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

public class CreateQueueEnvironmentRequest private constructor(builder: Builder) {
    /**
     * The unique token which the server uses to recognize retries of the same request.
     */
    public val clientToken: kotlin.String? = builder.clientToken
    /**
     * The farm ID of the farm to connect to the environment.
     */
    public val farmId: kotlin.String? = builder.farmId
    /**
     * Sets the priority of the environments in the queue from 0 to 10,000, where 0 is the highest priority. If two environments share the same priority value, the environment created first takes higher priority.
     */
    public val priority: kotlin.Int? = builder.priority
    /**
     * The queue ID to connect the queue and environment.
     */
    public val queueId: kotlin.String? = builder.queueId
    /**
     * The environment template to use in the queue.
     */
    public val template: kotlin.String? = builder.template
    /**
     * The template's file type, `JSON` or `YAML`.
     */
    public val templateType: aws.sdk.kotlin.services.deadline.model.EnvironmentTemplateType? = builder.templateType

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

    override fun toString(): kotlin.String = buildString {
        append("CreateQueueEnvironmentRequest(")
        append("clientToken=$clientToken,")
        append("farmId=$farmId,")
        append("priority=$priority,")
        append("queueId=$queueId,")
        append("template=*** Sensitive Data Redacted ***,")
        append("templateType=$templateType")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = clientToken?.hashCode() ?: 0
        result = 31 * result + (farmId?.hashCode() ?: 0)
        result = 31 * result + (priority ?: 0)
        result = 31 * result + (queueId?.hashCode() ?: 0)
        result = 31 * result + (template?.hashCode() ?: 0)
        result = 31 * result + (templateType?.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 CreateQueueEnvironmentRequest

        if (clientToken != other.clientToken) return false
        if (farmId != other.farmId) return false
        if (priority != other.priority) return false
        if (queueId != other.queueId) return false
        if (template != other.template) return false
        if (templateType != other.templateType) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The unique token which the server uses to recognize retries of the same request.
         */
        public var clientToken: kotlin.String? = null
        /**
         * The farm ID of the farm to connect to the environment.
         */
        public var farmId: kotlin.String? = null
        /**
         * Sets the priority of the environments in the queue from 0 to 10,000, where 0 is the highest priority. If two environments share the same priority value, the environment created first takes higher priority.
         */
        public var priority: kotlin.Int? = null
        /**
         * The queue ID to connect the queue and environment.
         */
        public var queueId: kotlin.String? = null
        /**
         * The environment template to use in the queue.
         */
        public var template: kotlin.String? = null
        /**
         * The template's file type, `JSON` or `YAML`.
         */
        public var templateType: aws.sdk.kotlin.services.deadline.model.EnvironmentTemplateType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.deadline.model.CreateQueueEnvironmentRequest) : this() {
            this.clientToken = x.clientToken
            this.farmId = x.farmId
            this.priority = x.priority
            this.queueId = x.queueId
            this.template = x.template
            this.templateType = x.templateType
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy