
commonMain.aws.sdk.kotlin.services.apptest.model.Script.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.apptest.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Specifies the script.
*/
public class Script private constructor(builder: Builder) {
/**
* The script location of the scripts.
*/
public val scriptLocation: kotlin.String = requireNotNull(builder.scriptLocation) { "A non-null value must be provided for scriptLocation" }
/**
* The type of the scripts.
*/
public val type: aws.sdk.kotlin.services.apptest.model.ScriptType = requireNotNull(builder.type) { "A non-null value must be provided for type" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.apptest.model.Script = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Script(")
append("scriptLocation=$scriptLocation,")
append("type=$type")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = scriptLocation.hashCode()
result = 31 * result + (type.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 Script
if (scriptLocation != other.scriptLocation) return false
if (type != other.type) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.apptest.model.Script = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The script location of the scripts.
*/
public var scriptLocation: kotlin.String? = null
/**
* The type of the scripts.
*/
public var type: aws.sdk.kotlin.services.apptest.model.ScriptType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.apptest.model.Script) : this() {
this.scriptLocation = x.scriptLocation
this.type = x.type
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.apptest.model.Script = Script(this)
internal fun correctErrors(): Builder {
if (scriptLocation == null) scriptLocation = ""
if (type == null) type = ScriptType.SdkUnknown("no value provided")
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy