commonMain.aws.sdk.kotlin.services.glue.model.XmlClassifier.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 `XML` content.
*/
public class XmlClassifier private constructor(builder: Builder) {
/**
* An identifier of the data format that the classifier matches.
*/
public val classification: kotlin.String = requireNotNull(builder.classification) { "A non-null value must be provided for classification" }
/**
* The time that this classifier was registered.
*/
public val creationTime: aws.smithy.kotlin.runtime.time.Instant? = builder.creationTime
/**
* 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 XML tag designating the element that contains each record in an XML document being parsed. This can't identify a self-closing element (closed by `/>`). An empty row element that contains only attributes can be parsed as long as it ends with a closing tag (for example, `
` is okay, but `
` is not).
*/
public val rowTag: kotlin.String? = builder.rowTag
/**
* 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.XmlClassifier = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("XmlClassifier(")
append("classification=$classification,")
append("creationTime=$creationTime,")
append("lastUpdated=$lastUpdated,")
append("name=$name,")
append("rowTag=$rowTag,")
append("version=$version")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = classification.hashCode()
result = 31 * result + (creationTime?.hashCode() ?: 0)
result = 31 * result + (lastUpdated?.hashCode() ?: 0)
result = 31 * result + (name.hashCode())
result = 31 * result + (rowTag?.hashCode() ?: 0)
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 XmlClassifier
if (classification != other.classification) return false
if (creationTime != other.creationTime) return false
if (lastUpdated != other.lastUpdated) return false
if (name != other.name) return false
if (rowTag != other.rowTag) return false
if (version != other.version) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.XmlClassifier = Builder(this).apply(block).build()
public class Builder {
/**
* An identifier of the data format that the classifier matches.
*/
public var classification: kotlin.String? = null
/**
* The time that this classifier was registered.
*/
public var creationTime: aws.smithy.kotlin.runtime.time.Instant? = 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 XML tag designating the element that contains each record in an XML document being parsed. This can't identify a self-closing element (closed by `/>`). An empty row element that contains only attributes can be parsed as long as it ends with a closing tag (for example, `
` is okay, but `
` is not).
*/
public var rowTag: 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.XmlClassifier) : this() {
this.classification = x.classification
this.creationTime = x.creationTime
this.lastUpdated = x.lastUpdated
this.name = x.name
this.rowTag = x.rowTag
this.version = x.version
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.XmlClassifier = XmlClassifier(this)
internal fun correctErrors(): Builder {
if (classification == null) classification = ""
if (name == null) name = ""
return this
}
}
}