commonMain.aws.sdk.kotlin.services.codecatalyst.model.ExecuteCommandSessionConfiguration.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of codecatalyst-jvm Show documentation
Show all versions of codecatalyst-jvm Show documentation
The AWS SDK for Kotlin client for CodeCatalyst
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.codecatalyst.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Information about the commands that will be run on a Dev Environment when an SSH session begins.
*/
public class ExecuteCommandSessionConfiguration private constructor(builder: Builder) {
/**
* An array of arguments containing arguments and members.
*/
public val arguments: List? = builder.arguments
/**
* The command used at the beginning of the SSH session to a Dev Environment.
*/
public val command: kotlin.String = requireNotNull(builder.command) { "A non-null value must be provided for command" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codecatalyst.model.ExecuteCommandSessionConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ExecuteCommandSessionConfiguration(")
append("arguments=$arguments,")
append("command=$command")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = arguments?.hashCode() ?: 0
result = 31 * result + (command.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 ExecuteCommandSessionConfiguration
if (arguments != other.arguments) return false
if (command != other.command) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codecatalyst.model.ExecuteCommandSessionConfiguration = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* An array of arguments containing arguments and members.
*/
public var arguments: List? = null
/**
* The command used at the beginning of the SSH session to a Dev Environment.
*/
public var command: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codecatalyst.model.ExecuteCommandSessionConfiguration) : this() {
this.arguments = x.arguments
this.command = x.command
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codecatalyst.model.ExecuteCommandSessionConfiguration = ExecuteCommandSessionConfiguration(this)
internal fun correctErrors(): Builder {
if (command == null) command = ""
return this
}
}
}