commonMain.aws.sdk.kotlin.services.devicefarm.model.Test.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of devicefarm-jvm Show documentation
Show all versions of devicefarm-jvm Show documentation
The AWS SDK for Kotlin client for Device Farm
// 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 condition that is evaluated.
*/
public class Test private constructor(builder: Builder) {
/**
* The test's ARN.
*/
public val arn: kotlin.String? = builder.arn
/**
* The test's result counters.
*/
public val counters: aws.sdk.kotlin.services.devicefarm.model.Counters? = builder.counters
/**
* When the test was created.
*/
public val created: aws.smithy.kotlin.runtime.time.Instant? = builder.created
/**
* Represents the total (metered or unmetered) minutes used by the test.
*/
public val deviceMinutes: aws.sdk.kotlin.services.devicefarm.model.DeviceMinutes? = builder.deviceMinutes
/**
* A message about the test's result.
*/
public val message: kotlin.String? = builder.message
/**
* The test's name.
*/
public val name: kotlin.String? = builder.name
/**
* The test'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 test's start time.
*/
public val started: aws.smithy.kotlin.runtime.time.Instant? = builder.started
/**
* The test'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 test's stop time.
*/
public val stopped: aws.smithy.kotlin.runtime.time.Instant? = builder.stopped
/**
* The test's type.
*
* Must be one of the following values:
* + 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
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.devicefarm.model.Test = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Test(")
append("arn=$arn,")
append("counters=$counters,")
append("created=$created,")
append("deviceMinutes=$deviceMinutes,")
append("message=$message,")
append("name=$name,")
append("result=$result,")
append("started=$started,")
append("status=$status,")
append("stopped=$stopped,")
append("type=$type")
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 + (deviceMinutes?.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)
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 Test
if (arn != other.arn) return false
if (counters != other.counters) return false
if (created != other.created) return false
if (deviceMinutes != other.deviceMinutes) 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
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.devicefarm.model.Test = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The test's ARN.
*/
public var arn: kotlin.String? = null
/**
* The test's result counters.
*/
public var counters: aws.sdk.kotlin.services.devicefarm.model.Counters? = null
/**
* When the test was created.
*/
public var created: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* Represents the total (metered or unmetered) minutes used by the test.
*/
public var deviceMinutes: aws.sdk.kotlin.services.devicefarm.model.DeviceMinutes? = null
/**
* A message about the test's result.
*/
public var message: kotlin.String? = null
/**
* The test's name.
*/
public var name: kotlin.String? = null
/**
* The test's result.
*
* Allowed values include:
* + PENDING
* + PASSED
* + WARNED
* + FAILED
* + SKIPPED
* + ERRORED
* + STOPPED
*/
public var result: aws.sdk.kotlin.services.devicefarm.model.ExecutionResult? = null
/**
* The test's start time.
*/
public var started: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The test'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 test's stop time.
*/
public var stopped: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The test's type.
*
* Must be one of the following values:
* + 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
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.devicefarm.model.Test) : this() {
this.arn = x.arn
this.counters = x.counters
this.created = x.created
this.deviceMinutes = x.deviceMinutes
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
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.devicefarm.model.Test = Test(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.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
}
}
}