commonMain.aws.sdk.kotlin.services.appsync.model.DataSourceIntrospectionModel.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of appsync-jvm Show documentation
Show all versions of appsync-jvm Show documentation
The AWS SDK for Kotlin client for AppSync
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.appsync.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Contains the introspected data that was retrieved from the data source.
*/
public class DataSourceIntrospectionModel private constructor(builder: Builder) {
/**
* The `DataSourceIntrospectionModelField` object data.
*/
public val fields: List? = builder.fields
/**
* The array of `DataSourceIntrospectionModelIndex` objects.
*/
public val indexes: List? = builder.indexes
/**
* The name of the model. For example, this could be the name of a single table in a database.
*/
public val name: kotlin.String? = builder.name
/**
* The primary key stored as a `DataSourceIntrospectionModelIndex` object.
*/
public val primaryKey: aws.sdk.kotlin.services.appsync.model.DataSourceIntrospectionModelIndex? = builder.primaryKey
/**
* Contains the output of the SDL that was generated from the introspected types. This is controlled by the `includeModelsSDL` parameter of the `GetDataSourceIntrospection` operation.
*/
public val sdl: kotlin.String? = builder.sdl
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.appsync.model.DataSourceIntrospectionModel = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("DataSourceIntrospectionModel(")
append("fields=$fields,")
append("indexes=$indexes,")
append("name=$name,")
append("primaryKey=$primaryKey,")
append("sdl=$sdl")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = fields?.hashCode() ?: 0
result = 31 * result + (indexes?.hashCode() ?: 0)
result = 31 * result + (name?.hashCode() ?: 0)
result = 31 * result + (primaryKey?.hashCode() ?: 0)
result = 31 * result + (sdl?.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 DataSourceIntrospectionModel
if (fields != other.fields) return false
if (indexes != other.indexes) return false
if (name != other.name) return false
if (primaryKey != other.primaryKey) return false
if (sdl != other.sdl) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.appsync.model.DataSourceIntrospectionModel = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The `DataSourceIntrospectionModelField` object data.
*/
public var fields: List? = null
/**
* The array of `DataSourceIntrospectionModelIndex` objects.
*/
public var indexes: List? = null
/**
* The name of the model. For example, this could be the name of a single table in a database.
*/
public var name: kotlin.String? = null
/**
* The primary key stored as a `DataSourceIntrospectionModelIndex` object.
*/
public var primaryKey: aws.sdk.kotlin.services.appsync.model.DataSourceIntrospectionModelIndex? = null
/**
* Contains the output of the SDL that was generated from the introspected types. This is controlled by the `includeModelsSDL` parameter of the `GetDataSourceIntrospection` operation.
*/
public var sdl: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.appsync.model.DataSourceIntrospectionModel) : this() {
this.fields = x.fields
this.indexes = x.indexes
this.name = x.name
this.primaryKey = x.primaryKey
this.sdl = x.sdl
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.appsync.model.DataSourceIntrospectionModel = DataSourceIntrospectionModel(this)
/**
* construct an [aws.sdk.kotlin.services.appsync.model.DataSourceIntrospectionModelIndex] inside the given [block]
*/
public fun primaryKey(block: aws.sdk.kotlin.services.appsync.model.DataSourceIntrospectionModelIndex.Builder.() -> kotlin.Unit) {
this.primaryKey = aws.sdk.kotlin.services.appsync.model.DataSourceIntrospectionModelIndex.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}