
commonMain.aws.sdk.kotlin.services.iottwinmaker.model.DataConnector.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iottwinmaker.model
/**
* The data connector.
*/
public class DataConnector private constructor(builder: Builder) {
/**
* A Boolean value that specifies whether the data connector is native to IoT TwinMaker.
*/
public val isNative: kotlin.Boolean? = builder.isNative
/**
* The Lambda function associated with this data connector.
*/
public val lambda: aws.sdk.kotlin.services.iottwinmaker.model.LambdaFunction? = builder.lambda
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iottwinmaker.model.DataConnector = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("DataConnector(")
append("isNative=$isNative,")
append("lambda=$lambda")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = isNative?.hashCode() ?: 0
result = 31 * result + (lambda?.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 DataConnector
if (isNative != other.isNative) return false
if (lambda != other.lambda) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iottwinmaker.model.DataConnector = Builder(this).apply(block).build()
public class Builder {
/**
* A Boolean value that specifies whether the data connector is native to IoT TwinMaker.
*/
public var isNative: kotlin.Boolean? = null
/**
* The Lambda function associated with this data connector.
*/
public var lambda: aws.sdk.kotlin.services.iottwinmaker.model.LambdaFunction? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iottwinmaker.model.DataConnector) : this() {
this.isNative = x.isNative
this.lambda = x.lambda
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iottwinmaker.model.DataConnector = DataConnector(this)
/**
* construct an [aws.sdk.kotlin.services.iottwinmaker.model.LambdaFunction] inside the given [block]
*/
public fun lambda(block: aws.sdk.kotlin.services.iottwinmaker.model.LambdaFunction.Builder.() -> kotlin.Unit) {
this.lambda = aws.sdk.kotlin.services.iottwinmaker.model.LambdaFunction.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy