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

commonMain.aws.sdk.kotlin.services.iotsitewise.model.MeasurementProcessingConfig.kt Maven / Gradle / Ivy

There is a newer version: 1.3.99
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.iotsitewise.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The processing configuration for the given measurement property. You can configure measurements to be kept at the edge or forwarded to the Amazon Web Services Cloud. By default, measurements are forwarded to the cloud.
 */
public class MeasurementProcessingConfig private constructor(builder: Builder) {
    /**
     * The forwarding configuration for the given measurement property.
     */
    public val forwardingConfig: aws.sdk.kotlin.services.iotsitewise.model.ForwardingConfig? = builder.forwardingConfig

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

    override fun toString(): kotlin.String = buildString {
        append("MeasurementProcessingConfig(")
        append("forwardingConfig=$forwardingConfig")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = forwardingConfig?.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 MeasurementProcessingConfig

        if (forwardingConfig != other.forwardingConfig) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The forwarding configuration for the given measurement property.
         */
        public var forwardingConfig: aws.sdk.kotlin.services.iotsitewise.model.ForwardingConfig? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iotsitewise.model.MeasurementProcessingConfig) : this() {
            this.forwardingConfig = x.forwardingConfig
        }

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy