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

commonMain.aws.sdk.kotlin.services.glue.model.CreateClassifierRequest.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

public class CreateClassifierRequest private constructor(builder: Builder) {
    /**
     * A `CsvClassifier` object specifying the classifier to create.
     */
    public val csvClassifier: aws.sdk.kotlin.services.glue.model.CreateCsvClassifierRequest? = builder.csvClassifier
    /**
     * A `GrokClassifier` object specifying the classifier to create.
     */
    public val grokClassifier: aws.sdk.kotlin.services.glue.model.CreateGrokClassifierRequest? = builder.grokClassifier
    /**
     * A `JsonClassifier` object specifying the classifier to create.
     */
    public val jsonClassifier: aws.sdk.kotlin.services.glue.model.CreateJsonClassifierRequest? = builder.jsonClassifier
    /**
     * An `XMLClassifier` object specifying the classifier to create.
     */
    public val xmlClassifier: aws.sdk.kotlin.services.glue.model.CreateXmlClassifierRequest? = builder.xmlClassifier

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.CreateClassifierRequest = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("CreateClassifierRequest(")
        append("csvClassifier=$csvClassifier,")
        append("grokClassifier=$grokClassifier,")
        append("jsonClassifier=$jsonClassifier,")
        append("xmlClassifier=$xmlClassifier")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = csvClassifier?.hashCode() ?: 0
        result = 31 * result + (grokClassifier?.hashCode() ?: 0)
        result = 31 * result + (jsonClassifier?.hashCode() ?: 0)
        result = 31 * result + (xmlClassifier?.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 CreateClassifierRequest

        if (csvClassifier != other.csvClassifier) return false
        if (grokClassifier != other.grokClassifier) return false
        if (jsonClassifier != other.jsonClassifier) return false
        if (xmlClassifier != other.xmlClassifier) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.CreateClassifierRequest = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * A `CsvClassifier` object specifying the classifier to create.
         */
        public var csvClassifier: aws.sdk.kotlin.services.glue.model.CreateCsvClassifierRequest? = null
        /**
         * A `GrokClassifier` object specifying the classifier to create.
         */
        public var grokClassifier: aws.sdk.kotlin.services.glue.model.CreateGrokClassifierRequest? = null
        /**
         * A `JsonClassifier` object specifying the classifier to create.
         */
        public var jsonClassifier: aws.sdk.kotlin.services.glue.model.CreateJsonClassifierRequest? = null
        /**
         * An `XMLClassifier` object specifying the classifier to create.
         */
        public var xmlClassifier: aws.sdk.kotlin.services.glue.model.CreateXmlClassifierRequest? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.glue.model.CreateClassifierRequest) : this() {
            this.csvClassifier = x.csvClassifier
            this.grokClassifier = x.grokClassifier
            this.jsonClassifier = x.jsonClassifier
            this.xmlClassifier = x.xmlClassifier
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.glue.model.CreateCsvClassifierRequest] inside the given [block]
         */
        public fun csvClassifier(block: aws.sdk.kotlin.services.glue.model.CreateCsvClassifierRequest.Builder.() -> kotlin.Unit) {
            this.csvClassifier = aws.sdk.kotlin.services.glue.model.CreateCsvClassifierRequest.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.glue.model.CreateGrokClassifierRequest] inside the given [block]
         */
        public fun grokClassifier(block: aws.sdk.kotlin.services.glue.model.CreateGrokClassifierRequest.Builder.() -> kotlin.Unit) {
            this.grokClassifier = aws.sdk.kotlin.services.glue.model.CreateGrokClassifierRequest.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.glue.model.CreateJsonClassifierRequest] inside the given [block]
         */
        public fun jsonClassifier(block: aws.sdk.kotlin.services.glue.model.CreateJsonClassifierRequest.Builder.() -> kotlin.Unit) {
            this.jsonClassifier = aws.sdk.kotlin.services.glue.model.CreateJsonClassifierRequest.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.glue.model.CreateXmlClassifierRequest] inside the given [block]
         */
        public fun xmlClassifier(block: aws.sdk.kotlin.services.glue.model.CreateXmlClassifierRequest.Builder.() -> kotlin.Unit) {
            this.xmlClassifier = aws.sdk.kotlin.services.glue.model.CreateXmlClassifierRequest.invoke(block)
        }

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy