commonMain.aws.sdk.kotlin.services.datapipeline.model.Selector.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of datapipeline-jvm Show documentation
Show all versions of datapipeline-jvm Show documentation
The AWS SDK for Kotlin client for Data Pipeline
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.datapipeline.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* A comparision that is used to determine whether a query should return this object.
*/
public class Selector private constructor(builder: Builder) {
/**
* The name of the field that the operator will be applied to. The field name is the "key" portion of the field definition in the pipeline definition syntax that is used by the AWS Data Pipeline API. If the field is not set on the object, the condition fails.
*/
public val fieldName: kotlin.String? = builder.fieldName
/**
* Contains a logical operation for comparing the value of a field with a specified value.
*/
public val operator: aws.sdk.kotlin.services.datapipeline.model.Operator? = builder.operator
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.datapipeline.model.Selector = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Selector(")
append("fieldName=$fieldName,")
append("operator=$operator")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = fieldName?.hashCode() ?: 0
result = 31 * result + (operator?.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 Selector
if (fieldName != other.fieldName) return false
if (operator != other.operator) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.datapipeline.model.Selector = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name of the field that the operator will be applied to. The field name is the "key" portion of the field definition in the pipeline definition syntax that is used by the AWS Data Pipeline API. If the field is not set on the object, the condition fails.
*/
public var fieldName: kotlin.String? = null
/**
* Contains a logical operation for comparing the value of a field with a specified value.
*/
public var operator: aws.sdk.kotlin.services.datapipeline.model.Operator? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.datapipeline.model.Selector) : this() {
this.fieldName = x.fieldName
this.operator = x.operator
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.datapipeline.model.Selector = Selector(this)
/**
* construct an [aws.sdk.kotlin.services.datapipeline.model.Operator] inside the given [block]
*/
public fun operator(block: aws.sdk.kotlin.services.datapipeline.model.Operator.Builder.() -> kotlin.Unit) {
this.operator = aws.sdk.kotlin.services.datapipeline.model.Operator.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy