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

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

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

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



/**
 * An object that contains response data from a property definition request.
 */
public class PropertyDefinitionResponse private constructor(builder: Builder) {
    /**
     * A mapping that specifies configuration information about the property.
     */
    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 = requireNotNull(builder.isExternalId) { "A non-null value must be provided for isExternalId" }
    /**
     * A Boolean value that specifies whether the property definition can be updated.
     */
    public val isFinal: kotlin.Boolean = requireNotNull(builder.isFinal) { "A non-null value must be provided for isFinal" }
    /**
     * A Boolean value that specifies whether the property definition is imported from an external data store.
     */
    public val isImported: kotlin.Boolean = requireNotNull(builder.isImported) { "A non-null value must be provided for isImported" }
    /**
     * A Boolean value that specifies whether the property definition is inherited from a parent entity.
     */
    public val isInherited: kotlin.Boolean = requireNotNull(builder.isInherited) { "A non-null value must be provided for isInherited" }
    /**
     * A Boolean value that specifies whether the property is required in an entity.
     */
    public val isRequiredInEntity: kotlin.Boolean = requireNotNull(builder.isRequiredInEntity) { "A non-null value must be provided for isRequiredInEntity" }
    /**
     * A Boolean value that specifies whether the property is stored externally.
     */
    public val isStoredExternally: kotlin.Boolean = requireNotNull(builder.isStoredExternally) { "A non-null value must be provided for isStoredExternally" }
    /**
     * A Boolean value that specifies whether the property consists of time series data.
     */
    public val isTimeSeries: kotlin.Boolean = requireNotNull(builder.isTimeSeries) { "A non-null value must be provided for isTimeSeries" }

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

    override fun toString(): kotlin.String = buildString {
        append("PropertyDefinitionResponse(")
        append("configuration=$configuration,")
        append("dataType=$dataType,")
        append("defaultValue=$defaultValue,")
        append("displayName=$displayName,")
        append("isExternalId=$isExternalId,")
        append("isFinal=$isFinal,")
        append("isImported=$isImported,")
        append("isInherited=$isInherited,")
        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())
        result = 31 * result + (isFinal.hashCode())
        result = 31 * result + (isImported.hashCode())
        result = 31 * result + (isInherited.hashCode())
        result = 31 * result + (isRequiredInEntity.hashCode())
        result = 31 * result + (isStoredExternally.hashCode())
        result = 31 * result + (isTimeSeries.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 PropertyDefinitionResponse

        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 (isFinal != other.isFinal) return false
        if (isImported != other.isImported) return false
        if (isInherited != other.isInherited) 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.PropertyDefinitionResponse = Builder(this).apply(block).build()

    public class Builder {
        /**
         * A mapping that specifies configuration information about the property.
         */
        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 definition can be updated.
         */
        public var isFinal: kotlin.Boolean? = null
        /**
         * A Boolean value that specifies whether the property definition is imported from an external data store.
         */
        public var isImported: kotlin.Boolean? = null
        /**
         * A Boolean value that specifies whether the property definition is inherited from a parent entity.
         */
        public var isInherited: kotlin.Boolean? = null
        /**
         * A Boolean value that specifies whether the property is required in an entity.
         */
        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.PropertyDefinitionResponse) : this() {
            this.configuration = x.configuration
            this.dataType = x.dataType
            this.defaultValue = x.defaultValue
            this.displayName = x.displayName
            this.isExternalId = x.isExternalId
            this.isFinal = x.isFinal
            this.isImported = x.isImported
            this.isInherited = x.isInherited
            this.isRequiredInEntity = x.isRequiredInEntity
            this.isStoredExternally = x.isStoredExternally
            this.isTimeSeries = x.isTimeSeries
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.iottwinmaker.model.PropertyDefinitionResponse = PropertyDefinitionResponse(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 {
            if (isExternalId == null) isExternalId = false
            if (isFinal == null) isFinal = false
            if (isImported == null) isImported = false
            if (isInherited == null) isInherited = false
            if (isRequiredInEntity == null) isRequiredInEntity = false
            if (isStoredExternally == null) isStoredExternally = false
            if (isTimeSeries == null) isTimeSeries = false
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy