commonMain.aws.sdk.kotlin.services.athena.model.StartCalculationExecutionRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of athena-jvm Show documentation
Show all versions of athena-jvm Show documentation
The AWS SDK for Kotlin client for Athena
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.athena.model
import aws.smithy.kotlin.runtime.SdkDsl
public class StartCalculationExecutionRequest private constructor(builder: Builder) {
/**
* Contains configuration information for the calculation.
*/
@Deprecated("Kepler Post GA Tasks : https://sim.amazon.com/issues/ATHENA-39828")
public val calculationConfiguration: aws.sdk.kotlin.services.athena.model.CalculationConfiguration? = builder.calculationConfiguration
/**
* A unique case-sensitive string used to ensure the request to create the calculation is idempotent (executes only once). If another `StartCalculationExecutionRequest` is received, the same response is returned and another calculation is not created. If a parameter has changed, an error is returned.
*
* This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services SDK for Java) auto-generate the token for users. If you are not using the Amazon Web Services SDK or the Amazon Web Services CLI, you must provide this token or the action will fail.
*/
public val clientRequestToken: kotlin.String? = builder.clientRequestToken
/**
* A string that contains the code of the calculation. Use this parameter instead of CalculationConfiguration$CodeBlock, which is deprecated.
*/
public val codeBlock: kotlin.String? = builder.codeBlock
/**
* A description of the calculation.
*/
public val description: kotlin.String? = builder.description
/**
* The session ID.
*/
public val sessionId: kotlin.String? = builder.sessionId
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.athena.model.StartCalculationExecutionRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("StartCalculationExecutionRequest(")
append("calculationConfiguration=$calculationConfiguration,")
append("clientRequestToken=$clientRequestToken,")
append("codeBlock=$codeBlock,")
append("description=$description,")
append("sessionId=$sessionId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = calculationConfiguration?.hashCode() ?: 0
result = 31 * result + (clientRequestToken?.hashCode() ?: 0)
result = 31 * result + (codeBlock?.hashCode() ?: 0)
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (sessionId?.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 StartCalculationExecutionRequest
if (calculationConfiguration != other.calculationConfiguration) return false
if (clientRequestToken != other.clientRequestToken) return false
if (codeBlock != other.codeBlock) return false
if (description != other.description) return false
if (sessionId != other.sessionId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.athena.model.StartCalculationExecutionRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Contains configuration information for the calculation.
*/
@Deprecated("Kepler Post GA Tasks : https://sim.amazon.com/issues/ATHENA-39828")
public var calculationConfiguration: aws.sdk.kotlin.services.athena.model.CalculationConfiguration? = null
/**
* A unique case-sensitive string used to ensure the request to create the calculation is idempotent (executes only once). If another `StartCalculationExecutionRequest` is received, the same response is returned and another calculation is not created. If a parameter has changed, an error is returned.
*
* This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services SDK for Java) auto-generate the token for users. If you are not using the Amazon Web Services SDK or the Amazon Web Services CLI, you must provide this token or the action will fail.
*/
public var clientRequestToken: kotlin.String? = null
/**
* A string that contains the code of the calculation. Use this parameter instead of CalculationConfiguration$CodeBlock, which is deprecated.
*/
public var codeBlock: kotlin.String? = null
/**
* A description of the calculation.
*/
public var description: kotlin.String? = null
/**
* The session ID.
*/
public var sessionId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.athena.model.StartCalculationExecutionRequest) : this() {
this.calculationConfiguration = x.calculationConfiguration
this.clientRequestToken = x.clientRequestToken
this.codeBlock = x.codeBlock
this.description = x.description
this.sessionId = x.sessionId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.athena.model.StartCalculationExecutionRequest = StartCalculationExecutionRequest(this)
/**
* construct an [aws.sdk.kotlin.services.athena.model.CalculationConfiguration] inside the given [block]
*/
@Deprecated("Kepler Post GA Tasks : https://sim.amazon.com/issues/ATHENA-39828")
public fun calculationConfiguration(block: aws.sdk.kotlin.services.athena.model.CalculationConfiguration.Builder.() -> kotlin.Unit) {
this.calculationConfiguration = aws.sdk.kotlin.services.athena.model.CalculationConfiguration.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}