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

commonMain.aws.sdk.kotlin.services.pi.model.GetResourceMetricsResponse.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.pi.model

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

public class GetResourceMetricsResponse private constructor(builder: Builder) {
    /**
     * The end time for the returned metrics, after alignment to a granular boundary (as specified by `PeriodInSeconds`). `AlignedEndTime` will be greater than or equal to the value of the user-specified `Endtime`.
     */
    public val alignedEndTime: aws.smithy.kotlin.runtime.time.Instant? = builder.alignedEndTime
    /**
     * The start time for the returned metrics, after alignment to a granular boundary (as specified by `PeriodInSeconds`). `AlignedStartTime` will be less than or equal to the value of the user-specified `StartTime`.
     */
    public val alignedStartTime: aws.smithy.kotlin.runtime.time.Instant? = builder.alignedStartTime
    /**
     * An immutable identifier for a data source that is unique for an Amazon Web Services Region. Performance Insights gathers metrics from this data source. In the console, the identifier is shown as *ResourceID*. When you call `DescribeDBInstances`, the identifier is returned as `DbiResourceId`.
     */
    public val identifier: kotlin.String? = builder.identifier
    /**
     * An array of metric results, where each array element contains all of the data points for a particular dimension.
     */
    public val metricList: List? = builder.metricList
    /**
     * An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the token, up to the value specified by `MaxRecords`.
     */
    public val nextToken: kotlin.String? = builder.nextToken

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

    override fun toString(): kotlin.String = buildString {
        append("GetResourceMetricsResponse(")
        append("alignedEndTime=$alignedEndTime,")
        append("alignedStartTime=$alignedStartTime,")
        append("identifier=$identifier,")
        append("metricList=$metricList,")
        append("nextToken=$nextToken")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = alignedEndTime?.hashCode() ?: 0
        result = 31 * result + (alignedStartTime?.hashCode() ?: 0)
        result = 31 * result + (identifier?.hashCode() ?: 0)
        result = 31 * result + (metricList?.hashCode() ?: 0)
        result = 31 * result + (nextToken?.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 GetResourceMetricsResponse

        if (alignedEndTime != other.alignedEndTime) return false
        if (alignedStartTime != other.alignedStartTime) return false
        if (identifier != other.identifier) return false
        if (metricList != other.metricList) return false
        if (nextToken != other.nextToken) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The end time for the returned metrics, after alignment to a granular boundary (as specified by `PeriodInSeconds`). `AlignedEndTime` will be greater than or equal to the value of the user-specified `Endtime`.
         */
        public var alignedEndTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The start time for the returned metrics, after alignment to a granular boundary (as specified by `PeriodInSeconds`). `AlignedStartTime` will be less than or equal to the value of the user-specified `StartTime`.
         */
        public var alignedStartTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * An immutable identifier for a data source that is unique for an Amazon Web Services Region. Performance Insights gathers metrics from this data source. In the console, the identifier is shown as *ResourceID*. When you call `DescribeDBInstances`, the identifier is returned as `DbiResourceId`.
         */
        public var identifier: kotlin.String? = null
        /**
         * An array of metric results, where each array element contains all of the data points for a particular dimension.
         */
        public var metricList: List? = null
        /**
         * An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the token, up to the value specified by `MaxRecords`.
         */
        public var nextToken: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.pi.model.GetResourceMetricsResponse) : this() {
            this.alignedEndTime = x.alignedEndTime
            this.alignedStartTime = x.alignedStartTime
            this.identifier = x.identifier
            this.metricList = x.metricList
            this.nextToken = x.nextToken
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy