commonMain.aws.sdk.kotlin.services.glue.model.JsonClassifier.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.time.Instant
/**
* A classifier for `JSON` content.
*/
public class JsonClassifier private constructor(builder: Builder) {
/**
* The time that this classifier was registered.
*/
public val creationTime: aws.smithy.kotlin.runtime.time.Instant? = builder.creationTime
/**
* A `JsonPath` string defining the JSON data for the classifier to classify. Glue supports a subset of JsonPath, as described in [Writing JsonPath Custom Classifiers](https://docs.aws.amazon.com/glue/latest/dg/custom-classifier.html#custom-classifier-json).
*/
public val jsonPath: kotlin.String = requireNotNull(builder.jsonPath) { "A non-null value must be provided for jsonPath" }
/**
* The time that this classifier was last updated.
*/
public val lastUpdated: aws.smithy.kotlin.runtime.time.Instant? = builder.lastUpdated
/**
* The name of the classifier.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
/**
* The version of this classifier.
*/
public val version: kotlin.Long = builder.version
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.JsonClassifier = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("JsonClassifier(")
append("creationTime=$creationTime,")
append("jsonPath=$jsonPath,")
append("lastUpdated=$lastUpdated,")
append("name=$name,")
append("version=$version")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = creationTime?.hashCode() ?: 0
result = 31 * result + (jsonPath.hashCode())
result = 31 * result + (lastUpdated?.hashCode() ?: 0)
result = 31 * result + (name.hashCode())
result = 31 * result + (version.hashCode())
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 JsonClassifier
if (creationTime != other.creationTime) return false
if (jsonPath != other.jsonPath) return false
if (lastUpdated != other.lastUpdated) return false
if (name != other.name) return false
if (version != other.version) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.JsonClassifier = Builder(this).apply(block).build()
public class Builder {
/**
* The time that this classifier was registered.
*/
public var creationTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* A `JsonPath` string defining the JSON data for the classifier to classify. Glue supports a subset of JsonPath, as described in [Writing JsonPath Custom Classifiers](https://docs.aws.amazon.com/glue/latest/dg/custom-classifier.html#custom-classifier-json).
*/
public var jsonPath: kotlin.String? = null
/**
* The time that this classifier was last updated.
*/
public var lastUpdated: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The name of the classifier.
*/
public var name: kotlin.String? = null
/**
* The version of this classifier.
*/
public var version: kotlin.Long = 0L
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.JsonClassifier) : this() {
this.creationTime = x.creationTime
this.jsonPath = x.jsonPath
this.lastUpdated = x.lastUpdated
this.name = x.name
this.version = x.version
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.JsonClassifier = JsonClassifier(this)
internal fun correctErrors(): Builder {
if (jsonPath == null) jsonPath = ""
if (name == null) name = ""
return this
}
}
}