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

commonMain.aws.sdk.kotlin.services.lookoutequipment.model.CreateLabelRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.lookoutequipment.model

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

public class CreateLabelRequest private constructor(builder: Builder) {
    /**
     * A unique identifier for the request to create a label. If you do not set the client request token, Lookout for Equipment generates one.
     */
    public val clientToken: kotlin.String? = builder.clientToken
    /**
     * The end time of the labeled event.
     */
    public val endTime: aws.smithy.kotlin.runtime.time.Instant? = builder.endTime
    /**
     * Indicates that a label pertains to a particular piece of equipment.
     *
     * Data in this field will be retained for service usage. Follow best practices for the security of your data.
     */
    public val equipment: kotlin.String? = builder.equipment
    /**
     * Provides additional information about the label. The fault code must be defined in the FaultCodes attribute of the label group.
     *
     * Data in this field will be retained for service usage. Follow best practices for the security of your data.
     */
    public val faultCode: kotlin.String? = builder.faultCode
    /**
     * The name of a group of labels.
     *
     * Data in this field will be retained for service usage. Follow best practices for the security of your data.
     */
    public val labelGroupName: kotlin.String? = builder.labelGroupName
    /**
     * Metadata providing additional information about the label.
     *
     * Data in this field will be retained for service usage. Follow best practices for the security of your data.
     */
    public val notes: kotlin.String? = builder.notes
    /**
     * Indicates whether a labeled event represents an anomaly.
     */
    public val rating: aws.sdk.kotlin.services.lookoutequipment.model.LabelRating? = builder.rating
    /**
     * The start time of the labeled event.
     */
    public val startTime: aws.smithy.kotlin.runtime.time.Instant? = builder.startTime

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

    override fun toString(): kotlin.String = buildString {
        append("CreateLabelRequest(")
        append("clientToken=$clientToken,")
        append("endTime=$endTime,")
        append("equipment=$equipment,")
        append("faultCode=$faultCode,")
        append("labelGroupName=$labelGroupName,")
        append("notes=$notes,")
        append("rating=$rating,")
        append("startTime=$startTime")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = clientToken?.hashCode() ?: 0
        result = 31 * result + (endTime?.hashCode() ?: 0)
        result = 31 * result + (equipment?.hashCode() ?: 0)
        result = 31 * result + (faultCode?.hashCode() ?: 0)
        result = 31 * result + (labelGroupName?.hashCode() ?: 0)
        result = 31 * result + (notes?.hashCode() ?: 0)
        result = 31 * result + (rating?.hashCode() ?: 0)
        result = 31 * result + (startTime?.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 CreateLabelRequest

        if (clientToken != other.clientToken) return false
        if (endTime != other.endTime) return false
        if (equipment != other.equipment) return false
        if (faultCode != other.faultCode) return false
        if (labelGroupName != other.labelGroupName) return false
        if (notes != other.notes) return false
        if (rating != other.rating) return false
        if (startTime != other.startTime) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A unique identifier for the request to create a label. If you do not set the client request token, Lookout for Equipment generates one.
         */
        public var clientToken: kotlin.String? = null
        /**
         * The end time of the labeled event.
         */
        public var endTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * Indicates that a label pertains to a particular piece of equipment.
         *
         * Data in this field will be retained for service usage. Follow best practices for the security of your data.
         */
        public var equipment: kotlin.String? = null
        /**
         * Provides additional information about the label. The fault code must be defined in the FaultCodes attribute of the label group.
         *
         * Data in this field will be retained for service usage. Follow best practices for the security of your data.
         */
        public var faultCode: kotlin.String? = null
        /**
         * The name of a group of labels.
         *
         * Data in this field will be retained for service usage. Follow best practices for the security of your data.
         */
        public var labelGroupName: kotlin.String? = null
        /**
         * Metadata providing additional information about the label.
         *
         * Data in this field will be retained for service usage. Follow best practices for the security of your data.
         */
        public var notes: kotlin.String? = null
        /**
         * Indicates whether a labeled event represents an anomaly.
         */
        public var rating: aws.sdk.kotlin.services.lookoutequipment.model.LabelRating? = null
        /**
         * The start time of the labeled event.
         */
        public var startTime: aws.smithy.kotlin.runtime.time.Instant? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.lookoutequipment.model.CreateLabelRequest) : this() {
            this.clientToken = x.clientToken
            this.endTime = x.endTime
            this.equipment = x.equipment
            this.faultCode = x.faultCode
            this.labelGroupName = x.labelGroupName
            this.notes = x.notes
            this.rating = x.rating
            this.startTime = x.startTime
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy