commonMain.aws.sdk.kotlin.services.cloudwatch.model.GetMetricDataResponse.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cloudwatch-jvm Show documentation
Show all versions of cloudwatch-jvm Show documentation
The AWS SDK for Kotlin client for CloudWatch
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.cloudwatch.model
import aws.smithy.kotlin.runtime.SdkDsl
public class GetMetricDataResponse private constructor(builder: Builder) {
/**
* Contains a message about this `GetMetricData` operation, if the operation results in such a message. An example of a message that might be returned is `Maximum number of allowed metrics exceeded`. If there is a message, as much of the operation as possible is still executed.
*
* A message appears here only if it is related to the global `GetMetricData` operation. Any message about a specific metric returned by the operation appears in the `MetricDataResult` object returned for that metric.
*/
public val messages: List? = builder.messages
/**
* The metrics that are returned, including the metric name, namespace, and dimensions.
*/
public val metricDataResults: List? = builder.metricDataResults
/**
* A token that marks the next batch of returned results.
*/
public val nextToken: kotlin.String? = builder.nextToken
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cloudwatch.model.GetMetricDataResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetMetricDataResponse(")
append("messages=$messages,")
append("metricDataResults=$metricDataResults,")
append("nextToken=$nextToken")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = messages?.hashCode() ?: 0
result = 31 * result + (metricDataResults?.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 GetMetricDataResponse
if (messages != other.messages) return false
if (metricDataResults != other.metricDataResults) return false
if (nextToken != other.nextToken) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cloudwatch.model.GetMetricDataResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Contains a message about this `GetMetricData` operation, if the operation results in such a message. An example of a message that might be returned is `Maximum number of allowed metrics exceeded`. If there is a message, as much of the operation as possible is still executed.
*
* A message appears here only if it is related to the global `GetMetricData` operation. Any message about a specific metric returned by the operation appears in the `MetricDataResult` object returned for that metric.
*/
public var messages: List? = null
/**
* The metrics that are returned, including the metric name, namespace, and dimensions.
*/
public var metricDataResults: List? = null
/**
* A token that marks the next batch of returned results.
*/
public var nextToken: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cloudwatch.model.GetMetricDataResponse) : this() {
this.messages = x.messages
this.metricDataResults = x.metricDataResults
this.nextToken = x.nextToken
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cloudwatch.model.GetMetricDataResponse = GetMetricDataResponse(this)
internal fun correctErrors(): Builder {
return this
}
}
}