commonMain.aws.sdk.kotlin.services.devicefarm.model.TestGridSessionAction.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
/**
* An action taken by a TestGridSession browser instance.
*/
public class TestGridSessionAction private constructor(builder: Builder) {
/**
* The action taken by the session.
*/
public val action: kotlin.String? = builder.action
/**
* The time, in milliseconds, that the action took to complete in the browser.
*/
public val duration: kotlin.Long? = builder.duration
/**
* HTTP method that the browser used to make the request.
*/
public val requestMethod: kotlin.String? = builder.requestMethod
/**
* The time that the session invoked the action.
*/
public val started: aws.smithy.kotlin.runtime.time.Instant? = builder.started
/**
* HTTP status code returned to the browser when the action was taken.
*/
public val statusCode: kotlin.String? = builder.statusCode
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.devicefarm.model.TestGridSessionAction = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("TestGridSessionAction(")
append("action=$action,")
append("duration=$duration,")
append("requestMethod=$requestMethod,")
append("started=$started,")
append("statusCode=$statusCode")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = action?.hashCode() ?: 0
result = 31 * result + (duration?.hashCode() ?: 0)
result = 31 * result + (requestMethod?.hashCode() ?: 0)
result = 31 * result + (started?.hashCode() ?: 0)
result = 31 * result + (statusCode?.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 TestGridSessionAction
if (action != other.action) return false
if (duration != other.duration) return false
if (requestMethod != other.requestMethod) return false
if (started != other.started) return false
if (statusCode != other.statusCode) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.devicefarm.model.TestGridSessionAction = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The action taken by the session.
*/
public var action: kotlin.String? = null
/**
* The time, in milliseconds, that the action took to complete in the browser.
*/
public var duration: kotlin.Long? = null
/**
* HTTP method that the browser used to make the request.
*/
public var requestMethod: kotlin.String? = null
/**
* The time that the session invoked the action.
*/
public var started: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* HTTP status code returned to the browser when the action was taken.
*/
public var statusCode: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.devicefarm.model.TestGridSessionAction) : this() {
this.action = x.action
this.duration = x.duration
this.requestMethod = x.requestMethod
this.started = x.started
this.statusCode = x.statusCode
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.devicefarm.model.TestGridSessionAction = TestGridSessionAction(this)
internal fun correctErrors(): Builder {
return this
}
}
}