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

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

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

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

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

public class DescribeFleetMetricResponse 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 date when the fleet metric is created.
     */
    public val creationDate: aws.smithy.kotlin.runtime.time.Instant? = builder.creationDate
    /**
     * The fleet metric description.
     */
    public val description: kotlin.String? = builder.description
    /**
     * The name of the index to search.
     */
    public val indexName: kotlin.String? = builder.indexName
    /**
     * The date when the fleet metric is last modified.
     */
    public val lastModifiedDate: aws.smithy.kotlin.runtime.time.Instant? = builder.lastModifiedDate
    /**
     * The ARN of the fleet metric to describe.
     */
    public val metricArn: kotlin.String? = builder.metricArn
    /**
     * The name of the fleet metric to describe.
     */
    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 query version.
     */
    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
    /**
     * The version of the fleet metric.
     */
    public val version: kotlin.Long = builder.version

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

    override fun toString(): kotlin.String = buildString {
        append("DescribeFleetMetricResponse(")
        append("aggregationField=$aggregationField,")
        append("aggregationType=$aggregationType,")
        append("creationDate=$creationDate,")
        append("description=$description,")
        append("indexName=$indexName,")
        append("lastModifiedDate=$lastModifiedDate,")
        append("metricArn=$metricArn,")
        append("metricName=$metricName,")
        append("period=$period,")
        append("queryString=$queryString,")
        append("queryVersion=$queryVersion,")
        append("unit=$unit,")
        append("version=$version")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = aggregationField?.hashCode() ?: 0
        result = 31 * result + (aggregationType?.hashCode() ?: 0)
        result = 31 * result + (creationDate?.hashCode() ?: 0)
        result = 31 * result + (description?.hashCode() ?: 0)
        result = 31 * result + (indexName?.hashCode() ?: 0)
        result = 31 * result + (lastModifiedDate?.hashCode() ?: 0)
        result = 31 * result + (metricArn?.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)
        result = 31 * result + (version.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 DescribeFleetMetricResponse

        if (aggregationField != other.aggregationField) return false
        if (aggregationType != other.aggregationType) return false
        if (creationDate != other.creationDate) return false
        if (description != other.description) return false
        if (indexName != other.indexName) return false
        if (lastModifiedDate != other.lastModifiedDate) return false
        if (metricArn != other.metricArn) 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
        if (version != other.version) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iot.model.DescribeFleetMetricResponse = 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 date when the fleet metric is created.
         */
        public var creationDate: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The fleet metric description.
         */
        public var description: kotlin.String? = null
        /**
         * The name of the index to search.
         */
        public var indexName: kotlin.String? = null
        /**
         * The date when the fleet metric is last modified.
         */
        public var lastModifiedDate: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The ARN of the fleet metric to describe.
         */
        public var metricArn: kotlin.String? = null
        /**
         * The name of the fleet metric to describe.
         */
        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 query version.
         */
        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
        /**
         * The version of the fleet metric.
         */
        public var version: kotlin.Long = 0L

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

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.iot.model.DescribeFleetMetricResponse = DescribeFleetMetricResponse(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