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

commonMain.aws.sdk.kotlin.services.devicefarm.model.ScheduleRunRequest.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

/**
 * Represents a request to the schedule run operation.
 */
public class ScheduleRunRequest private constructor(builder: Builder) {
    /**
     * The ARN of an application package to run tests against, created with CreateUpload. See ListUploads.
     */
    public val appArn: kotlin.String? = builder.appArn
    /**
     * Information about the settings for the run to be scheduled.
     */
    public val configuration: aws.sdk.kotlin.services.devicefarm.model.ScheduleRunConfiguration? = builder.configuration
    /**
     * The ARN of the device pool for the run to be scheduled.
     */
    public val devicePoolArn: kotlin.String? = builder.devicePoolArn
    /**
     * The filter criteria used to dynamically select a set of devices for a test run and the maximum number of devices to be included in the run.
     *
     * Either **`devicePoolArn`** or **`deviceSelectionConfiguration`** is required in a request.
     */
    public val deviceSelectionConfiguration: aws.sdk.kotlin.services.devicefarm.model.DeviceSelectionConfiguration? = builder.deviceSelectionConfiguration
    /**
     * Specifies configuration information about a test run, such as the execution timeout (in minutes).
     */
    public val executionConfiguration: aws.sdk.kotlin.services.devicefarm.model.ExecutionConfiguration? = builder.executionConfiguration
    /**
     * The name for the run to be scheduled.
     */
    public val name: kotlin.String? = builder.name
    /**
     * The ARN of the project for the run to be scheduled.
     */
    public val projectArn: kotlin.String? = builder.projectArn
    /**
     * Information about the test for the run to be scheduled.
     */
    public val test: aws.sdk.kotlin.services.devicefarm.model.ScheduleRunTest? = builder.test

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

    override fun toString(): kotlin.String = buildString {
        append("ScheduleRunRequest(")
        append("appArn=$appArn,")
        append("configuration=$configuration,")
        append("devicePoolArn=$devicePoolArn,")
        append("deviceSelectionConfiguration=$deviceSelectionConfiguration,")
        append("executionConfiguration=$executionConfiguration,")
        append("name=$name,")
        append("projectArn=$projectArn,")
        append("test=$test")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = appArn?.hashCode() ?: 0
        result = 31 * result + (configuration?.hashCode() ?: 0)
        result = 31 * result + (devicePoolArn?.hashCode() ?: 0)
        result = 31 * result + (deviceSelectionConfiguration?.hashCode() ?: 0)
        result = 31 * result + (executionConfiguration?.hashCode() ?: 0)
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (projectArn?.hashCode() ?: 0)
        result = 31 * result + (test?.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 ScheduleRunRequest

        if (appArn != other.appArn) return false
        if (configuration != other.configuration) return false
        if (devicePoolArn != other.devicePoolArn) return false
        if (deviceSelectionConfiguration != other.deviceSelectionConfiguration) return false
        if (executionConfiguration != other.executionConfiguration) return false
        if (name != other.name) return false
        if (projectArn != other.projectArn) return false
        if (test != other.test) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The ARN of an application package to run tests against, created with CreateUpload. See ListUploads.
         */
        public var appArn: kotlin.String? = null
        /**
         * Information about the settings for the run to be scheduled.
         */
        public var configuration: aws.sdk.kotlin.services.devicefarm.model.ScheduleRunConfiguration? = null
        /**
         * The ARN of the device pool for the run to be scheduled.
         */
        public var devicePoolArn: kotlin.String? = null
        /**
         * The filter criteria used to dynamically select a set of devices for a test run and the maximum number of devices to be included in the run.
         *
         * Either **`devicePoolArn`** or **`deviceSelectionConfiguration`** is required in a request.
         */
        public var deviceSelectionConfiguration: aws.sdk.kotlin.services.devicefarm.model.DeviceSelectionConfiguration? = null
        /**
         * Specifies configuration information about a test run, such as the execution timeout (in minutes).
         */
        public var executionConfiguration: aws.sdk.kotlin.services.devicefarm.model.ExecutionConfiguration? = null
        /**
         * The name for the run to be scheduled.
         */
        public var name: kotlin.String? = null
        /**
         * The ARN of the project for the run to be scheduled.
         */
        public var projectArn: kotlin.String? = null
        /**
         * Information about the test for the run to be scheduled.
         */
        public var test: aws.sdk.kotlin.services.devicefarm.model.ScheduleRunTest? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.devicefarm.model.ScheduleRunRequest) : this() {
            this.appArn = x.appArn
            this.configuration = x.configuration
            this.devicePoolArn = x.devicePoolArn
            this.deviceSelectionConfiguration = x.deviceSelectionConfiguration
            this.executionConfiguration = x.executionConfiguration
            this.name = x.name
            this.projectArn = x.projectArn
            this.test = x.test
        }

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

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

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy