commonMain.aws.sdk.kotlin.services.deadline.model.CreateJobRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of deadline-jvm Show documentation
Show all versions of deadline-jvm Show documentation
The AWS SDK for Kotlin client for deadline
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.deadline.model
import aws.smithy.kotlin.runtime.SdkDsl
public class CreateJobRequest private constructor(builder: Builder) {
/**
* The attachments for the job. Attach files required for the job to run to a render job.
*/
public val attachments: aws.sdk.kotlin.services.deadline.model.Attachments? = builder.attachments
/**
* 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 job.
*/
public val farmId: kotlin.String? = builder.farmId
/**
* The number of task failures before the job stops running and is marked as `FAILED`.
*/
public val maxFailedTasksCount: kotlin.Int? = builder.maxFailedTasksCount
/**
* The maximum number of retries for each task.
*/
public val maxRetriesPerTask: kotlin.Int? = builder.maxRetriesPerTask
/**
* The parameters for the job.
*/
public val parameters: Map? = builder.parameters
/**
* The priority of the job on a scale of 0 to 100. The highest priority (first scheduled) is 100. When two jobs have the same priority, the oldest job is scheduled first.
*/
public val priority: kotlin.Int? = builder.priority
/**
* The ID of the queue that the job is submitted to.
*/
public val queueId: kotlin.String? = builder.queueId
/**
* The storage profile ID for the storage profile to connect to the job.
*/
public val storageProfileId: kotlin.String? = builder.storageProfileId
/**
* The initial job status when it is created. Jobs that are created with a `SUSPENDED` status will not run until manually requeued.
*/
public val targetTaskRunStatus: aws.sdk.kotlin.services.deadline.model.CreateJobTargetTaskRunStatus? = builder.targetTaskRunStatus
/**
* The job template to use for this job.
*/
public val template: kotlin.String? = builder.template
/**
* The file type for the job template.
*/
public val templateType: aws.sdk.kotlin.services.deadline.model.JobTemplateType? = builder.templateType
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.deadline.model.CreateJobRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateJobRequest(")
append("attachments=$attachments,")
append("clientToken=$clientToken,")
append("farmId=$farmId,")
append("maxFailedTasksCount=$maxFailedTasksCount,")
append("maxRetriesPerTask=$maxRetriesPerTask,")
append("parameters=*** Sensitive Data Redacted ***,")
append("priority=$priority,")
append("queueId=$queueId,")
append("storageProfileId=$storageProfileId,")
append("targetTaskRunStatus=$targetTaskRunStatus,")
append("template=*** Sensitive Data Redacted ***,")
append("templateType=$templateType")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = attachments?.hashCode() ?: 0
result = 31 * result + (clientToken?.hashCode() ?: 0)
result = 31 * result + (farmId?.hashCode() ?: 0)
result = 31 * result + (maxFailedTasksCount ?: 0)
result = 31 * result + (maxRetriesPerTask ?: 0)
result = 31 * result + (parameters?.hashCode() ?: 0)
result = 31 * result + (priority ?: 0)
result = 31 * result + (queueId?.hashCode() ?: 0)
result = 31 * result + (storageProfileId?.hashCode() ?: 0)
result = 31 * result + (targetTaskRunStatus?.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 CreateJobRequest
if (attachments != other.attachments) return false
if (clientToken != other.clientToken) return false
if (farmId != other.farmId) return false
if (maxFailedTasksCount != other.maxFailedTasksCount) return false
if (maxRetriesPerTask != other.maxRetriesPerTask) return false
if (parameters != other.parameters) return false
if (priority != other.priority) return false
if (queueId != other.queueId) return false
if (storageProfileId != other.storageProfileId) return false
if (targetTaskRunStatus != other.targetTaskRunStatus) 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.CreateJobRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The attachments for the job. Attach files required for the job to run to a render job.
*/
public var attachments: aws.sdk.kotlin.services.deadline.model.Attachments? = null
/**
* 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 job.
*/
public var farmId: kotlin.String? = null
/**
* The number of task failures before the job stops running and is marked as `FAILED`.
*/
public var maxFailedTasksCount: kotlin.Int? = null
/**
* The maximum number of retries for each task.
*/
public var maxRetriesPerTask: kotlin.Int? = null
/**
* The parameters for the job.
*/
public var parameters: Map? = null
/**
* The priority of the job on a scale of 0 to 100. The highest priority (first scheduled) is 100. When two jobs have the same priority, the oldest job is scheduled first.
*/
public var priority: kotlin.Int? = null
/**
* The ID of the queue that the job is submitted to.
*/
public var queueId: kotlin.String? = null
/**
* The storage profile ID for the storage profile to connect to the job.
*/
public var storageProfileId: kotlin.String? = null
/**
* The initial job status when it is created. Jobs that are created with a `SUSPENDED` status will not run until manually requeued.
*/
public var targetTaskRunStatus: aws.sdk.kotlin.services.deadline.model.CreateJobTargetTaskRunStatus? = null
/**
* The job template to use for this job.
*/
public var template: kotlin.String? = null
/**
* The file type for the job template.
*/
public var templateType: aws.sdk.kotlin.services.deadline.model.JobTemplateType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.deadline.model.CreateJobRequest) : this() {
this.attachments = x.attachments
this.clientToken = x.clientToken
this.farmId = x.farmId
this.maxFailedTasksCount = x.maxFailedTasksCount
this.maxRetriesPerTask = x.maxRetriesPerTask
this.parameters = x.parameters
this.priority = x.priority
this.queueId = x.queueId
this.storageProfileId = x.storageProfileId
this.targetTaskRunStatus = x.targetTaskRunStatus
this.template = x.template
this.templateType = x.templateType
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.deadline.model.CreateJobRequest = CreateJobRequest(this)
/**
* construct an [aws.sdk.kotlin.services.deadline.model.Attachments] inside the given [block]
*/
public fun attachments(block: aws.sdk.kotlin.services.deadline.model.Attachments.Builder.() -> kotlin.Unit) {
this.attachments = aws.sdk.kotlin.services.deadline.model.Attachments.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}