All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.glue.model.UpdateXmlClassifierRequest.kt Maven / Gradle / Ivy

There is a newer version: 1.3.76
Show newest version
// 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 to be updated.
 */
public class UpdateXmlClassifierRequest private constructor(builder: Builder) {
    /**
     * An identifier of the data format that the classifier matches.
     */
    public val classification: kotlin.String? = builder.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 cannot 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.UpdateXmlClassifierRequest = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("UpdateXmlClassifierRequest(")
        append("classification=$classification,")
        append("name=$name,")
        append("rowTag=$rowTag")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = classification?.hashCode() ?: 0
        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 UpdateXmlClassifierRequest

        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.UpdateXmlClassifierRequest = 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 cannot 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.UpdateXmlClassifierRequest) : this() {
            this.classification = x.classification
            this.name = x.name
            this.rowTag = x.rowTag
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.glue.model.UpdateXmlClassifierRequest = UpdateXmlClassifierRequest(this)

        internal fun correctErrors(): Builder {
            if (name == null) name = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy