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

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

/**
 * The job details for a specific job.
 */
public class JobDetailsEntity private constructor(builder: Builder) {
    /**
     * The job attachment settings.
     */
    public val jobAttachmentSettings: aws.sdk.kotlin.services.deadline.model.JobAttachmentSettings? = builder.jobAttachmentSettings
    /**
     * The job ID.
     */
    public val jobId: kotlin.String = requireNotNull(builder.jobId) { "A non-null value must be provided for jobId" }
    /**
     * The user name and group that the job uses when run.
     */
    public val jobRunAsUser: aws.sdk.kotlin.services.deadline.model.JobRunAsUser? = builder.jobRunAsUser
    /**
     * The log group name.
     */
    public val logGroupName: kotlin.String = requireNotNull(builder.logGroupName) { "A non-null value must be provided for logGroupName" }
    /**
     * The parameters.
     */
    public val parameters: Map? = builder.parameters
    /**
     * The path mapping rules.
     */
    public val pathMappingRules: List? = builder.pathMappingRules
    /**
     * The queue role ARN.
     */
    public val queueRoleArn: kotlin.String? = builder.queueRoleArn
    /**
     * The schema version.
     */
    public val schemaVersion: kotlin.String = requireNotNull(builder.schemaVersion) { "A non-null value must be provided for schemaVersion" }

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

    override fun toString(): kotlin.String = buildString {
        append("JobDetailsEntity(")
        append("jobAttachmentSettings=$jobAttachmentSettings,")
        append("jobId=$jobId,")
        append("jobRunAsUser=$jobRunAsUser,")
        append("logGroupName=$logGroupName,")
        append("parameters=*** Sensitive Data Redacted ***,")
        append("pathMappingRules=*** Sensitive Data Redacted ***,")
        append("queueRoleArn=$queueRoleArn,")
        append("schemaVersion=$schemaVersion")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = jobAttachmentSettings?.hashCode() ?: 0
        result = 31 * result + (jobId.hashCode())
        result = 31 * result + (jobRunAsUser?.hashCode() ?: 0)
        result = 31 * result + (logGroupName.hashCode())
        result = 31 * result + (parameters?.hashCode() ?: 0)
        result = 31 * result + (pathMappingRules?.hashCode() ?: 0)
        result = 31 * result + (queueRoleArn?.hashCode() ?: 0)
        result = 31 * result + (schemaVersion.hashCode())
        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 JobDetailsEntity

        if (jobAttachmentSettings != other.jobAttachmentSettings) return false
        if (jobId != other.jobId) return false
        if (jobRunAsUser != other.jobRunAsUser) return false
        if (logGroupName != other.logGroupName) return false
        if (parameters != other.parameters) return false
        if (pathMappingRules != other.pathMappingRules) return false
        if (queueRoleArn != other.queueRoleArn) return false
        if (schemaVersion != other.schemaVersion) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The job attachment settings.
         */
        public var jobAttachmentSettings: aws.sdk.kotlin.services.deadline.model.JobAttachmentSettings? = null
        /**
         * The job ID.
         */
        public var jobId: kotlin.String? = null
        /**
         * The user name and group that the job uses when run.
         */
        public var jobRunAsUser: aws.sdk.kotlin.services.deadline.model.JobRunAsUser? = null
        /**
         * The log group name.
         */
        public var logGroupName: kotlin.String? = null
        /**
         * The parameters.
         */
        public var parameters: Map? = null
        /**
         * The path mapping rules.
         */
        public var pathMappingRules: List? = null
        /**
         * The queue role ARN.
         */
        public var queueRoleArn: kotlin.String? = null
        /**
         * The schema version.
         */
        public var schemaVersion: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.deadline.model.JobDetailsEntity) : this() {
            this.jobAttachmentSettings = x.jobAttachmentSettings
            this.jobId = x.jobId
            this.jobRunAsUser = x.jobRunAsUser
            this.logGroupName = x.logGroupName
            this.parameters = x.parameters
            this.pathMappingRules = x.pathMappingRules
            this.queueRoleArn = x.queueRoleArn
            this.schemaVersion = x.schemaVersion
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.deadline.model.JobDetailsEntity = JobDetailsEntity(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 (jobId == null) jobId = ""
            if (logGroupName == null) logGroupName = ""
            if (schemaVersion == null) schemaVersion = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy