commonMain.aws.sdk.kotlin.services.cloudwatch.model.MessageData.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
/**
* A message returned by the `GetMetricData`API, including a code and a description.
*
* If a cross-Region `GetMetricData` operation fails with a code of `Forbidden` and a value of `Authentication too complex to retrieve cross region data`, you can correct the problem by running the `GetMetricData` operation in the same Region where the metric data is.
*/
public class MessageData private constructor(builder: Builder) {
/**
* The error code or status code associated with the message.
*/
public val code: kotlin.String? = builder.code
/**
* The message text.
*/
public val value: kotlin.String? = builder.value
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cloudwatch.model.MessageData = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("MessageData(")
append("code=$code,")
append("value=$value")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = code?.hashCode() ?: 0
result = 31 * result + (value?.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 MessageData
if (code != other.code) return false
if (value != other.value) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cloudwatch.model.MessageData = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The error code or status code associated with the message.
*/
public var code: kotlin.String? = null
/**
* The message text.
*/
public var value: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cloudwatch.model.MessageData) : this() {
this.code = x.code
this.value = x.value
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cloudwatch.model.MessageData = MessageData(this)
internal fun correctErrors(): Builder {
return this
}
}
}