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

commonMain.aws.sdk.kotlin.services.iottwinmaker.model.PropertyDefinitionRequest.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.iottwinmaker.model



/**
 * An object that sets information about a property.
 */
public class PropertyDefinitionRequest private constructor(builder: Builder) {
    /**
     * A mapping that specifies configuration information about the property. Use this field to specify information that you read from and write to an external source.
     */
    public val configuration: Map? = builder.configuration
    /**
     * An object that contains information about the data type.
     */
    public val dataType: aws.sdk.kotlin.services.iottwinmaker.model.DataType? = builder.dataType
    /**
     * An object that contains the default value.
     */
    public val defaultValue: aws.sdk.kotlin.services.iottwinmaker.model.DataValue? = builder.defaultValue
    /**
     * A friendly name for the property.
     */
    public val displayName: kotlin.String? = builder.displayName
    /**
     * A Boolean value that specifies whether the property ID comes from an external data store.
     */
    public val isExternalId: kotlin.Boolean? = builder.isExternalId
    /**
     * A Boolean value that specifies whether the property is required.
     */
    public val isRequiredInEntity: kotlin.Boolean? = builder.isRequiredInEntity
    /**
     * A Boolean value that specifies whether the property is stored externally.
     */
    public val isStoredExternally: kotlin.Boolean? = builder.isStoredExternally
    /**
     * A Boolean value that specifies whether the property consists of time series data.
     */
    public val isTimeSeries: kotlin.Boolean? = builder.isTimeSeries

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

    override fun toString(): kotlin.String = buildString {
        append("PropertyDefinitionRequest(")
        append("configuration=$configuration,")
        append("dataType=$dataType,")
        append("defaultValue=$defaultValue,")
        append("displayName=$displayName,")
        append("isExternalId=$isExternalId,")
        append("isRequiredInEntity=$isRequiredInEntity,")
        append("isStoredExternally=$isStoredExternally,")
        append("isTimeSeries=$isTimeSeries")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = configuration?.hashCode() ?: 0
        result = 31 * result + (dataType?.hashCode() ?: 0)
        result = 31 * result + (defaultValue?.hashCode() ?: 0)
        result = 31 * result + (displayName?.hashCode() ?: 0)
        result = 31 * result + (isExternalId?.hashCode() ?: 0)
        result = 31 * result + (isRequiredInEntity?.hashCode() ?: 0)
        result = 31 * result + (isStoredExternally?.hashCode() ?: 0)
        result = 31 * result + (isTimeSeries?.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 PropertyDefinitionRequest

        if (configuration != other.configuration) return false
        if (dataType != other.dataType) return false
        if (defaultValue != other.defaultValue) return false
        if (displayName != other.displayName) return false
        if (isExternalId != other.isExternalId) return false
        if (isRequiredInEntity != other.isRequiredInEntity) return false
        if (isStoredExternally != other.isStoredExternally) return false
        if (isTimeSeries != other.isTimeSeries) return false

        return true
    }

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

    public class Builder {
        /**
         * A mapping that specifies configuration information about the property. Use this field to specify information that you read from and write to an external source.
         */
        public var configuration: Map? = null
        /**
         * An object that contains information about the data type.
         */
        public var dataType: aws.sdk.kotlin.services.iottwinmaker.model.DataType? = null
        /**
         * An object that contains the default value.
         */
        public var defaultValue: aws.sdk.kotlin.services.iottwinmaker.model.DataValue? = null
        /**
         * A friendly name for the property.
         */
        public var displayName: kotlin.String? = null
        /**
         * A Boolean value that specifies whether the property ID comes from an external data store.
         */
        public var isExternalId: kotlin.Boolean? = null
        /**
         * A Boolean value that specifies whether the property is required.
         */
        public var isRequiredInEntity: kotlin.Boolean? = null
        /**
         * A Boolean value that specifies whether the property is stored externally.
         */
        public var isStoredExternally: kotlin.Boolean? = null
        /**
         * A Boolean value that specifies whether the property consists of time series data.
         */
        public var isTimeSeries: kotlin.Boolean? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iottwinmaker.model.PropertyDefinitionRequest) : this() {
            this.configuration = x.configuration
            this.dataType = x.dataType
            this.defaultValue = x.defaultValue
            this.displayName = x.displayName
            this.isExternalId = x.isExternalId
            this.isRequiredInEntity = x.isRequiredInEntity
            this.isStoredExternally = x.isStoredExternally
            this.isTimeSeries = x.isTimeSeries
        }

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy