commonMain.aws.sdk.kotlin.services.glue.model.ViewRepresentation.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
/**
* A structure that contains the dialect of the view, and the query that defines the view.
*/
public class ViewRepresentation 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
/**
* Dialects marked as stale are no longer valid and must be updated before they can be queried in their respective query engines.
*/
public val isStale: kotlin.Boolean? = builder.isStale
/**
* The name of the connection to be used to validate the specific representation of the view.
*/
public val validationConnection: kotlin.String? = builder.validationConnection
/**
* The expanded SQL for the view. This SQL is used by engines while processing a query on a view. Engines may perform operations during view creation to transform `ViewOriginalText` to `ViewExpandedText`. For example:
* + Fully qualified identifiers: `SELECT * from table1 -> SELECT * from db1.table1`
*/
public val viewExpandedText: kotlin.String? = builder.viewExpandedText
/**
* The `SELECT` query provided by the customer during `CREATE VIEW DDL`. This SQL is not used during a query on a view (`ViewExpandedText` is used instead). `ViewOriginalText` is used for cases like `SHOW CREATE VIEW` where users want to see the original DDL command that created the view.
*/
public val viewOriginalText: kotlin.String? = builder.viewOriginalText
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.ViewRepresentation = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ViewRepresentation(")
append("dialect=$dialect,")
append("dialectVersion=$dialectVersion,")
append("isStale=$isStale,")
append("validationConnection=$validationConnection,")
append("viewExpandedText=$viewExpandedText,")
append("viewOriginalText=$viewOriginalText")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = dialect?.hashCode() ?: 0
result = 31 * result + (dialectVersion?.hashCode() ?: 0)
result = 31 * result + (isStale?.hashCode() ?: 0)
result = 31 * result + (validationConnection?.hashCode() ?: 0)
result = 31 * result + (viewExpandedText?.hashCode() ?: 0)
result = 31 * result + (viewOriginalText?.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 ViewRepresentation
if (dialect != other.dialect) return false
if (dialectVersion != other.dialectVersion) return false
if (isStale != other.isStale) return false
if (validationConnection != other.validationConnection) return false
if (viewExpandedText != other.viewExpandedText) return false
if (viewOriginalText != other.viewOriginalText) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.ViewRepresentation = 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
/**
* Dialects marked as stale are no longer valid and must be updated before they can be queried in their respective query engines.
*/
public var isStale: kotlin.Boolean? = null
/**
* The name of the connection to be used to validate the specific representation of the view.
*/
public var validationConnection: kotlin.String? = null
/**
* The expanded SQL for the view. This SQL is used by engines while processing a query on a view. Engines may perform operations during view creation to transform `ViewOriginalText` to `ViewExpandedText`. For example:
* + Fully qualified identifiers: `SELECT * from table1 -> SELECT * from db1.table1`
*/
public var viewExpandedText: kotlin.String? = null
/**
* The `SELECT` query provided by the customer during `CREATE VIEW DDL`. This SQL is not used during a query on a view (`ViewExpandedText` is used instead). `ViewOriginalText` is used for cases like `SHOW CREATE VIEW` where users want to see the original DDL command that created the view.
*/
public var viewOriginalText: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.ViewRepresentation) : this() {
this.dialect = x.dialect
this.dialectVersion = x.dialectVersion
this.isStale = x.isStale
this.validationConnection = x.validationConnection
this.viewExpandedText = x.viewExpandedText
this.viewOriginalText = x.viewOriginalText
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.ViewRepresentation = ViewRepresentation(this)
internal fun correctErrors(): Builder {
return this
}
}
}