commonMain.aws.sdk.kotlin.services.glue.model.UpdateGrokClassifierRequest.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.SdkDsl
/**
* Specifies a grok classifier to update when passed to `UpdateClassifier`.
*/
public class UpdateGrokClassifierRequest private constructor(builder: Builder) {
/**
* An identifier of the data format that the classifier matches, such as Twitter, JSON, Omniture logs, Amazon CloudWatch Logs, and so on.
*/
public val classification: kotlin.String? = builder.classification
/**
* Optional custom grok patterns used by this classifier.
*/
public val customPatterns: kotlin.String? = builder.customPatterns
/**
* The grok pattern used by this classifier.
*/
public val grokPattern: kotlin.String? = builder.grokPattern
/**
* The name of the `GrokClassifier`.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.UpdateGrokClassifierRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateGrokClassifierRequest(")
append("classification=$classification,")
append("customPatterns=$customPatterns,")
append("grokPattern=$grokPattern,")
append("name=$name")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = classification?.hashCode() ?: 0
result = 31 * result + (customPatterns?.hashCode() ?: 0)
result = 31 * result + (grokPattern?.hashCode() ?: 0)
result = 31 * result + (name.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 UpdateGrokClassifierRequest
if (classification != other.classification) return false
if (customPatterns != other.customPatterns) return false
if (grokPattern != other.grokPattern) return false
if (name != other.name) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.UpdateGrokClassifierRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* An identifier of the data format that the classifier matches, such as Twitter, JSON, Omniture logs, Amazon CloudWatch Logs, and so on.
*/
public var classification: kotlin.String? = null
/**
* Optional custom grok patterns used by this classifier.
*/
public var customPatterns: kotlin.String? = null
/**
* The grok pattern used by this classifier.
*/
public var grokPattern: kotlin.String? = null
/**
* The name of the `GrokClassifier`.
*/
public var name: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.UpdateGrokClassifierRequest) : this() {
this.classification = x.classification
this.customPatterns = x.customPatterns
this.grokPattern = x.grokPattern
this.name = x.name
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.UpdateGrokClassifierRequest = UpdateGrokClassifierRequest(this)
internal fun correctErrors(): Builder {
if (name == null) name = ""
return this
}
}
}