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

commonMain.aws.sdk.kotlin.services.iot.model.UpdateFleetMetricRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.iot.model



public class UpdateFleetMetricRequest private constructor(builder: Builder) {
    /**
     * The field to aggregate.
     */
    public val aggregationField: kotlin.String? = builder.aggregationField
    /**
     * The type of the aggregation query.
     */
    public val aggregationType: aws.sdk.kotlin.services.iot.model.AggregationType? = builder.aggregationType
    /**
     * The description of the fleet metric.
     */
    public val description: kotlin.String? = builder.description
    /**
     * The expected version of the fleet metric record in the registry.
     */
    public val expectedVersion: kotlin.Long? = builder.expectedVersion
    /**
     * The name of the index to search.
     */
    public val indexName: kotlin.String? = builder.indexName
    /**
     * The name of the fleet metric to update.
     */
    public val metricName: kotlin.String? = builder.metricName
    /**
     * The time in seconds between fleet metric emissions. Range [60(1 min), 86400(1 day)] and must be multiple of 60.
     */
    public val period: kotlin.Int? = builder.period
    /**
     * The search query string.
     */
    public val queryString: kotlin.String? = builder.queryString
    /**
     * The version of the query.
     */
    public val queryVersion: kotlin.String? = builder.queryVersion
    /**
     * Used to support unit transformation such as milliseconds to seconds. The unit must be supported by [CW metric](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_MetricDatum.html).
     */
    public val unit: aws.sdk.kotlin.services.iot.model.FleetMetricUnit? = builder.unit

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

    override fun toString(): kotlin.String = buildString {
        append("UpdateFleetMetricRequest(")
        append("aggregationField=$aggregationField,")
        append("aggregationType=$aggregationType,")
        append("description=$description,")
        append("expectedVersion=$expectedVersion,")
        append("indexName=$indexName,")
        append("metricName=$metricName,")
        append("period=$period,")
        append("queryString=$queryString,")
        append("queryVersion=$queryVersion,")
        append("unit=$unit")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = aggregationField?.hashCode() ?: 0
        result = 31 * result + (aggregationType?.hashCode() ?: 0)
        result = 31 * result + (description?.hashCode() ?: 0)
        result = 31 * result + (expectedVersion?.hashCode() ?: 0)
        result = 31 * result + (indexName?.hashCode() ?: 0)
        result = 31 * result + (metricName?.hashCode() ?: 0)
        result = 31 * result + (period ?: 0)
        result = 31 * result + (queryString?.hashCode() ?: 0)
        result = 31 * result + (queryVersion?.hashCode() ?: 0)
        result = 31 * result + (unit?.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 UpdateFleetMetricRequest

        if (aggregationField != other.aggregationField) return false
        if (aggregationType != other.aggregationType) return false
        if (description != other.description) return false
        if (expectedVersion != other.expectedVersion) return false
        if (indexName != other.indexName) return false
        if (metricName != other.metricName) return false
        if (period != other.period) return false
        if (queryString != other.queryString) return false
        if (queryVersion != other.queryVersion) return false
        if (unit != other.unit) return false

        return true
    }

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

    public class Builder {
        /**
         * The field to aggregate.
         */
        public var aggregationField: kotlin.String? = null
        /**
         * The type of the aggregation query.
         */
        public var aggregationType: aws.sdk.kotlin.services.iot.model.AggregationType? = null
        /**
         * The description of the fleet metric.
         */
        public var description: kotlin.String? = null
        /**
         * The expected version of the fleet metric record in the registry.
         */
        public var expectedVersion: kotlin.Long? = null
        /**
         * The name of the index to search.
         */
        public var indexName: kotlin.String? = null
        /**
         * The name of the fleet metric to update.
         */
        public var metricName: kotlin.String? = null
        /**
         * The time in seconds between fleet metric emissions. Range [60(1 min), 86400(1 day)] and must be multiple of 60.
         */
        public var period: kotlin.Int? = null
        /**
         * The search query string.
         */
        public var queryString: kotlin.String? = null
        /**
         * The version of the query.
         */
        public var queryVersion: kotlin.String? = null
        /**
         * Used to support unit transformation such as milliseconds to seconds. The unit must be supported by [CW metric](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_MetricDatum.html).
         */
        public var unit: aws.sdk.kotlin.services.iot.model.FleetMetricUnit? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iot.model.UpdateFleetMetricRequest) : this() {
            this.aggregationField = x.aggregationField
            this.aggregationType = x.aggregationType
            this.description = x.description
            this.expectedVersion = x.expectedVersion
            this.indexName = x.indexName
            this.metricName = x.metricName
            this.period = x.period
            this.queryString = x.queryString
            this.queryVersion = x.queryVersion
            this.unit = x.unit
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy