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

commonMain.aws.sdk.kotlin.services.devicefarm.model.Job.kt Maven / Gradle / Ivy

There is a newer version: 1.3.76
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.devicefarm.model

import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant

/**
 * Represents a device.
 */
public class Job private constructor(builder: Builder) {
    /**
     * The job's ARN.
     */
    public val arn: kotlin.String? = builder.arn
    /**
     * The job's result counters.
     */
    public val counters: aws.sdk.kotlin.services.devicefarm.model.Counters? = builder.counters
    /**
     * When the job was created.
     */
    public val created: aws.smithy.kotlin.runtime.time.Instant? = builder.created
    /**
     * The device (phone or tablet).
     */
    public val device: aws.sdk.kotlin.services.devicefarm.model.Device? = builder.device
    /**
     * Represents the total (metered or unmetered) minutes used by the job.
     */
    public val deviceMinutes: aws.sdk.kotlin.services.devicefarm.model.DeviceMinutes? = builder.deviceMinutes
    /**
     * The ARN of the instance.
     */
    public val instanceArn: kotlin.String? = builder.instanceArn
    /**
     * A message about the job's result.
     */
    public val message: kotlin.String? = builder.message
    /**
     * The job's name.
     */
    public val name: kotlin.String? = builder.name
    /**
     * The job's result.
     *
     * Allowed values include:
     * + PENDING
     * + PASSED
     * + WARNED
     * + FAILED
     * + SKIPPED
     * + ERRORED
     * + STOPPED
     */
    public val result: aws.sdk.kotlin.services.devicefarm.model.ExecutionResult? = builder.result
    /**
     * The job's start time.
     */
    public val started: aws.smithy.kotlin.runtime.time.Instant? = builder.started
    /**
     * The job's status.
     *
     * Allowed values include:
     * + PENDING
     * + PENDING_CONCURRENCY
     * + PENDING_DEVICE
     * + PROCESSING
     * + SCHEDULING
     * + PREPARING
     * + RUNNING
     * + COMPLETED
     * + STOPPING
     */
    public val status: aws.sdk.kotlin.services.devicefarm.model.ExecutionStatus? = builder.status
    /**
     * The job's stop time.
     */
    public val stopped: aws.smithy.kotlin.runtime.time.Instant? = builder.stopped
    /**
     * The job's type.
     *
     * Allowed values include the following:
     * + BUILTIN_FUZZ
     * + APPIUM_JAVA_JUNIT
     * + APPIUM_JAVA_TESTNG
     * + APPIUM_PYTHON
     * + APPIUM_NODE
     * + APPIUM_RUBY
     * + APPIUM_WEB_JAVA_JUNIT
     * + APPIUM_WEB_JAVA_TESTNG
     * + APPIUM_WEB_PYTHON
     * + APPIUM_WEB_NODE
     * + APPIUM_WEB_RUBY
     * + INSTRUMENTATION
     * + XCTEST
     * + XCTEST_UI
     */
    public val type: aws.sdk.kotlin.services.devicefarm.model.TestType? = builder.type
    /**
     * This value is set to true if video capture is enabled. Otherwise, it is set to false.
     */
    public val videoCapture: kotlin.Boolean? = builder.videoCapture
    /**
     * The endpoint for streaming device video.
     */
    public val videoEndpoint: kotlin.String? = builder.videoEndpoint

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

    override fun toString(): kotlin.String = buildString {
        append("Job(")
        append("arn=$arn,")
        append("counters=$counters,")
        append("created=$created,")
        append("device=$device,")
        append("deviceMinutes=$deviceMinutes,")
        append("instanceArn=$instanceArn,")
        append("message=$message,")
        append("name=$name,")
        append("result=$result,")
        append("started=$started,")
        append("status=$status,")
        append("stopped=$stopped,")
        append("type=$type,")
        append("videoCapture=$videoCapture,")
        append("videoEndpoint=$videoEndpoint")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = arn?.hashCode() ?: 0
        result = 31 * result + (counters?.hashCode() ?: 0)
        result = 31 * result + (created?.hashCode() ?: 0)
        result = 31 * result + (device?.hashCode() ?: 0)
        result = 31 * result + (deviceMinutes?.hashCode() ?: 0)
        result = 31 * result + (instanceArn?.hashCode() ?: 0)
        result = 31 * result + (message?.hashCode() ?: 0)
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (result?.hashCode() ?: 0)
        result = 31 * result + (started?.hashCode() ?: 0)
        result = 31 * result + (status?.hashCode() ?: 0)
        result = 31 * result + (stopped?.hashCode() ?: 0)
        result = 31 * result + (type?.hashCode() ?: 0)
        result = 31 * result + (videoCapture?.hashCode() ?: 0)
        result = 31 * result + (videoEndpoint?.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 Job

        if (arn != other.arn) return false
        if (counters != other.counters) return false
        if (created != other.created) return false
        if (device != other.device) return false
        if (deviceMinutes != other.deviceMinutes) return false
        if (instanceArn != other.instanceArn) return false
        if (message != other.message) return false
        if (name != other.name) return false
        if (result != other.result) return false
        if (started != other.started) return false
        if (status != other.status) return false
        if (stopped != other.stopped) return false
        if (type != other.type) return false
        if (videoCapture != other.videoCapture) return false
        if (videoEndpoint != other.videoEndpoint) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The job's ARN.
         */
        public var arn: kotlin.String? = null
        /**
         * The job's result counters.
         */
        public var counters: aws.sdk.kotlin.services.devicefarm.model.Counters? = null
        /**
         * When the job was created.
         */
        public var created: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The device (phone or tablet).
         */
        public var device: aws.sdk.kotlin.services.devicefarm.model.Device? = null
        /**
         * Represents the total (metered or unmetered) minutes used by the job.
         */
        public var deviceMinutes: aws.sdk.kotlin.services.devicefarm.model.DeviceMinutes? = null
        /**
         * The ARN of the instance.
         */
        public var instanceArn: kotlin.String? = null
        /**
         * A message about the job's result.
         */
        public var message: kotlin.String? = null
        /**
         * The job's name.
         */
        public var name: kotlin.String? = null
        /**
         * The job's result.
         *
         * Allowed values include:
         * + PENDING
         * + PASSED
         * + WARNED
         * + FAILED
         * + SKIPPED
         * + ERRORED
         * + STOPPED
         */
        public var result: aws.sdk.kotlin.services.devicefarm.model.ExecutionResult? = null
        /**
         * The job's start time.
         */
        public var started: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The job's status.
         *
         * Allowed values include:
         * + PENDING
         * + PENDING_CONCURRENCY
         * + PENDING_DEVICE
         * + PROCESSING
         * + SCHEDULING
         * + PREPARING
         * + RUNNING
         * + COMPLETED
         * + STOPPING
         */
        public var status: aws.sdk.kotlin.services.devicefarm.model.ExecutionStatus? = null
        /**
         * The job's stop time.
         */
        public var stopped: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The job's type.
         *
         * Allowed values include the following:
         * + BUILTIN_FUZZ
         * + APPIUM_JAVA_JUNIT
         * + APPIUM_JAVA_TESTNG
         * + APPIUM_PYTHON
         * + APPIUM_NODE
         * + APPIUM_RUBY
         * + APPIUM_WEB_JAVA_JUNIT
         * + APPIUM_WEB_JAVA_TESTNG
         * + APPIUM_WEB_PYTHON
         * + APPIUM_WEB_NODE
         * + APPIUM_WEB_RUBY
         * + INSTRUMENTATION
         * + XCTEST
         * + XCTEST_UI
         */
        public var type: aws.sdk.kotlin.services.devicefarm.model.TestType? = null
        /**
         * This value is set to true if video capture is enabled. Otherwise, it is set to false.
         */
        public var videoCapture: kotlin.Boolean? = null
        /**
         * The endpoint for streaming device video.
         */
        public var videoEndpoint: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.devicefarm.model.Job) : this() {
            this.arn = x.arn
            this.counters = x.counters
            this.created = x.created
            this.device = x.device
            this.deviceMinutes = x.deviceMinutes
            this.instanceArn = x.instanceArn
            this.message = x.message
            this.name = x.name
            this.result = x.result
            this.started = x.started
            this.status = x.status
            this.stopped = x.stopped
            this.type = x.type
            this.videoCapture = x.videoCapture
            this.videoEndpoint = x.videoEndpoint
        }

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

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy