commonMain.aws.sdk.kotlin.services.cloudwatch.model.PutMetricDataRequest.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 PutMetricDataRequest private constructor(builder: Builder) {
/**
* The data for the metric. The array can include no more than 1000 metrics per call.
*/
public val metricData: List? = builder.metricData
/**
* The namespace for the metric data. You can use ASCII characters for the namespace, except for control characters which are not supported.
*
* To avoid conflicts with Amazon Web Services service namespaces, you should not specify a namespace that begins with `AWS/`
*/
public val namespace: kotlin.String? = builder.namespace
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cloudwatch.model.PutMetricDataRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PutMetricDataRequest(")
append("metricData=$metricData,")
append("namespace=$namespace")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = metricData?.hashCode() ?: 0
result = 31 * result + (namespace?.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 PutMetricDataRequest
if (metricData != other.metricData) return false
if (namespace != other.namespace) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cloudwatch.model.PutMetricDataRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The data for the metric. The array can include no more than 1000 metrics per call.
*/
public var metricData: List? = null
/**
* The namespace for the metric data. You can use ASCII characters for the namespace, except for control characters which are not supported.
*
* To avoid conflicts with Amazon Web Services service namespaces, you should not specify a namespace that begins with `AWS/`
*/
public var namespace: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cloudwatch.model.PutMetricDataRequest) : this() {
this.metricData = x.metricData
this.namespace = x.namespace
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cloudwatch.model.PutMetricDataRequest = PutMetricDataRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}