commonMain.aws.sdk.kotlin.services.glue.model.ViewValidation.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of glue-jvm Show documentation
Show all versions of glue-jvm Show documentation
The AWS SDK for Kotlin client for Glue
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glue.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant
/**
* A structure that contains information for an analytical engine to validate a view, prior to persisting the view metadata. Used in the case of direct `UpdateTable` or `CreateTable` API calls.
*/
public class ViewValidation private constructor(builder: Builder) {
/**
* The dialect of the query engine.
*/
public val dialect: aws.sdk.kotlin.services.glue.model.ViewDialect? = builder.dialect
/**
* The version of the dialect of the query engine. For example, 3.0.0.
*/
public val dialectVersion: kotlin.String? = builder.dialectVersion
/**
* An error associated with the validation.
*/
public val error: aws.sdk.kotlin.services.glue.model.ErrorDetail? = builder.error
/**
* The state of the validation.
*/
public val state: aws.sdk.kotlin.services.glue.model.ResourceState? = builder.state
/**
* The time of the last update.
*/
public val updateTime: aws.smithy.kotlin.runtime.time.Instant? = builder.updateTime
/**
* The `SELECT` query that defines the view, as provided by the customer.
*/
public val viewValidationText: kotlin.String? = builder.viewValidationText
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.ViewValidation = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ViewValidation(")
append("dialect=$dialect,")
append("dialectVersion=$dialectVersion,")
append("error=$error,")
append("state=$state,")
append("updateTime=$updateTime,")
append("viewValidationText=$viewValidationText")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = dialect?.hashCode() ?: 0
result = 31 * result + (dialectVersion?.hashCode() ?: 0)
result = 31 * result + (error?.hashCode() ?: 0)
result = 31 * result + (state?.hashCode() ?: 0)
result = 31 * result + (updateTime?.hashCode() ?: 0)
result = 31 * result + (viewValidationText?.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 ViewValidation
if (dialect != other.dialect) return false
if (dialectVersion != other.dialectVersion) return false
if (error != other.error) return false
if (state != other.state) return false
if (updateTime != other.updateTime) return false
if (viewValidationText != other.viewValidationText) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.ViewValidation = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The dialect of the query engine.
*/
public var dialect: aws.sdk.kotlin.services.glue.model.ViewDialect? = null
/**
* The version of the dialect of the query engine. For example, 3.0.0.
*/
public var dialectVersion: kotlin.String? = null
/**
* An error associated with the validation.
*/
public var error: aws.sdk.kotlin.services.glue.model.ErrorDetail? = null
/**
* The state of the validation.
*/
public var state: aws.sdk.kotlin.services.glue.model.ResourceState? = null
/**
* The time of the last update.
*/
public var updateTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The `SELECT` query that defines the view, as provided by the customer.
*/
public var viewValidationText: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.ViewValidation) : this() {
this.dialect = x.dialect
this.dialectVersion = x.dialectVersion
this.error = x.error
this.state = x.state
this.updateTime = x.updateTime
this.viewValidationText = x.viewValidationText
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.ViewValidation = ViewValidation(this)
/**
* construct an [aws.sdk.kotlin.services.glue.model.ErrorDetail] inside the given [block]
*/
public fun error(block: aws.sdk.kotlin.services.glue.model.ErrorDetail.Builder.() -> kotlin.Unit) {
this.error = aws.sdk.kotlin.services.glue.model.ErrorDetail.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}