commonMain.aws.sdk.kotlin.services.redshift.model.RecommendedAction.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of redshift-jvm Show documentation
Show all versions of redshift-jvm Show documentation
The AWS SDK for Kotlin client for Redshift
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.redshift.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The recommended action from the Amazon Redshift Advisor recommendation.
*/
public class RecommendedAction private constructor(builder: Builder) {
/**
* The command to run.
*/
public val command: kotlin.String? = builder.command
/**
* The database name to perform the action on. Only applicable if the type of command is SQL.
*/
public val database: kotlin.String? = builder.database
/**
* The specific instruction about the command.
*/
public val text: kotlin.String? = builder.text
/**
* The type of command.
*/
public val type: aws.sdk.kotlin.services.redshift.model.RecommendedActionType? = builder.type
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.redshift.model.RecommendedAction = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("RecommendedAction(")
append("command=$command,")
append("database=$database,")
append("text=$text,")
append("type=$type")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = command?.hashCode() ?: 0
result = 31 * result + (database?.hashCode() ?: 0)
result = 31 * result + (text?.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 RecommendedAction
if (command != other.command) return false
if (database != other.database) return false
if (text != other.text) return false
if (type != other.type) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.redshift.model.RecommendedAction = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The command to run.
*/
public var command: kotlin.String? = null
/**
* The database name to perform the action on. Only applicable if the type of command is SQL.
*/
public var database: kotlin.String? = null
/**
* The specific instruction about the command.
*/
public var text: kotlin.String? = null
/**
* The type of command.
*/
public var type: aws.sdk.kotlin.services.redshift.model.RecommendedActionType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.redshift.model.RecommendedAction) : this() {
this.command = x.command
this.database = x.database
this.text = x.text
this.type = x.type
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.redshift.model.RecommendedAction = RecommendedAction(this)
internal fun correctErrors(): Builder {
return this
}
}
}