commonMain.aws.sdk.kotlin.services.firehose.model.Processor.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of firehose-jvm Show documentation
Show all versions of firehose-jvm Show documentation
The AWS SDK for Kotlin client for Firehose
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.firehose.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Describes a data processor.
*
* If you want to add a new line delimiter between records in objects that are delivered to Amazon S3, choose `AppendDelimiterToRecord` as a processor type. You don’t have to put a processor parameter when you select `AppendDelimiterToRecord`.
*/
public class Processor private constructor(builder: Builder) {
/**
* The processor parameters.
*/
public val parameters: List? = builder.parameters
/**
* The type of processor.
*/
public val type: aws.sdk.kotlin.services.firehose.model.ProcessorType = requireNotNull(builder.type) { "A non-null value must be provided for type" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.firehose.model.Processor = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Processor(")
append("parameters=$parameters,")
append("type=$type")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = parameters?.hashCode() ?: 0
result = 31 * result + (type.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 Processor
if (parameters != other.parameters) return false
if (type != other.type) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.firehose.model.Processor = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The processor parameters.
*/
public var parameters: List? = null
/**
* The type of processor.
*/
public var type: aws.sdk.kotlin.services.firehose.model.ProcessorType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.firehose.model.Processor) : this() {
this.parameters = x.parameters
this.type = x.type
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.firehose.model.Processor = Processor(this)
internal fun correctErrors(): Builder {
if (type == null) type = ProcessorType.SdkUnknown("no value provided")
return this
}
}
}