commonMain.aws.sdk.kotlin.services.glue.model.CreateXmlClassifierRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glue.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Specifies an XML classifier for `CreateClassifier` to create.
*/
public class CreateXmlClassifierRequest 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 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
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.CreateXmlClassifierRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateXmlClassifierRequest(")
append("classification=$classification,")
append("name=$name,")
append("rowTag=$rowTag")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = classification.hashCode()
result = 31 * result + (name.hashCode())
result = 31 * result + (rowTag?.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 CreateXmlClassifierRequest
if (classification != other.classification) return false
if (name != other.name) return false
if (rowTag != other.rowTag) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.CreateXmlClassifierRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* An identifier of the data format that the classifier matches.
*/
public var classification: kotlin.String? = 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
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.CreateXmlClassifierRequest) : this() {
this.classification = x.classification
this.name = x.name
this.rowTag = x.rowTag
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.CreateXmlClassifierRequest = CreateXmlClassifierRequest(this)
internal fun correctErrors(): Builder {
if (classification == null) classification = ""
if (name == null) name = ""
return this
}
}
}