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

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

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

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

import aws.smithy.kotlin.runtime.time.Instant

/**
 * An object that contains information about a value for a time series property.
 */
public class PropertyValue private constructor(builder: Builder) {
    /**
     * ISO8601 DateTime of a value for a time series property.
     *
     * The time for when the property value was recorded in ISO 8601 format: *YYYY-MM-DDThh:mm:ss[.SSSSSSSSS][Z/±HH:mm]*.
     * + *[YYYY]*: year
     * + *[MM]*: month
     * + *[DD]*: day
     * + *[hh]*: hour
     * + *[mm]*: minute
     * + *[ss]*: seconds
     * + *[.SSSSSSSSS]*: additional precision, where precedence is maintained. For example: [.573123] is equal to 573123000 nanoseconds.
     * + *Z*: default timezone UTC
     * + *± HH:mm*: time zone offset in Hours and Minutes.
     *
     * *Required sub-fields*: YYYY-MM-DDThh:mm:ss and [Z/±HH:mm]
     */
    public val time: kotlin.String? = builder.time
    /**
     * The timestamp of a value for a time series property.
     */
    @Deprecated("No longer recommended for use. See AWS API documentation for more details.")
    public val timestamp: aws.smithy.kotlin.runtime.time.Instant? = builder.timestamp
    /**
     * An object that specifies a value for a time series property.
     */
    public val value: aws.sdk.kotlin.services.iottwinmaker.model.DataValue? = builder.value

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

    override fun toString(): kotlin.String = buildString {
        append("PropertyValue(")
        append("time=$time,")
        append("timestamp=$timestamp,")
        append("value=$value")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = time?.hashCode() ?: 0
        result = 31 * result + (timestamp?.hashCode() ?: 0)
        result = 31 * result + (value?.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 PropertyValue

        if (time != other.time) return false
        if (timestamp != other.timestamp) return false
        if (value != other.value) return false

        return true
    }

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

    public class Builder {
        /**
         * ISO8601 DateTime of a value for a time series property.
         *
         * The time for when the property value was recorded in ISO 8601 format: *YYYY-MM-DDThh:mm:ss[.SSSSSSSSS][Z/±HH:mm]*.
         * + *[YYYY]*: year
         * + *[MM]*: month
         * + *[DD]*: day
         * + *[hh]*: hour
         * + *[mm]*: minute
         * + *[ss]*: seconds
         * + *[.SSSSSSSSS]*: additional precision, where precedence is maintained. For example: [.573123] is equal to 573123000 nanoseconds.
         * + *Z*: default timezone UTC
         * + *± HH:mm*: time zone offset in Hours and Minutes.
         *
         * *Required sub-fields*: YYYY-MM-DDThh:mm:ss and [Z/±HH:mm]
         */
        public var time: kotlin.String? = null
        /**
         * The timestamp of a value for a time series property.
         */
        @Deprecated("No longer recommended for use. See AWS API documentation for more details.")
        public var timestamp: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * An object that specifies a value for a time series property.
         */
        public var value: aws.sdk.kotlin.services.iottwinmaker.model.DataValue? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iottwinmaker.model.PropertyValue) : this() {
            this.time = x.time
            this.timestamp = x.timestamp
            this.value = x.value
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy