
commonMain.aws.sdk.kotlin.services.rum.model.BatchDeleteRumMetricDefinitionsError.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.rum.model
/**
* A structure that defines one error caused by a [BatchCreateRumMetricsDefinitions](https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_BatchDeleteRumMetricsDefinitions.html) operation.
*/
public class BatchDeleteRumMetricDefinitionsError private constructor(builder: Builder) {
/**
* The error code.
*/
public val errorCode: kotlin.String = requireNotNull(builder.errorCode) { "A non-null value must be provided for errorCode" }
/**
* The error message for this metric definition.
*/
public val errorMessage: kotlin.String = requireNotNull(builder.errorMessage) { "A non-null value must be provided for errorMessage" }
/**
* The ID of the metric definition that caused this error.
*/
public val metricDefinitionId: kotlin.String = requireNotNull(builder.metricDefinitionId) { "A non-null value must be provided for metricDefinitionId" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.rum.model.BatchDeleteRumMetricDefinitionsError = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("BatchDeleteRumMetricDefinitionsError(")
append("errorCode=$errorCode,")
append("errorMessage=$errorMessage,")
append("metricDefinitionId=$metricDefinitionId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = errorCode.hashCode()
result = 31 * result + (errorMessage.hashCode())
result = 31 * result + (metricDefinitionId.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 BatchDeleteRumMetricDefinitionsError
if (errorCode != other.errorCode) return false
if (errorMessage != other.errorMessage) return false
if (metricDefinitionId != other.metricDefinitionId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.rum.model.BatchDeleteRumMetricDefinitionsError = Builder(this).apply(block).build()
public class Builder {
/**
* The error code.
*/
public var errorCode: kotlin.String? = null
/**
* The error message for this metric definition.
*/
public var errorMessage: kotlin.String? = null
/**
* The ID of the metric definition that caused this error.
*/
public var metricDefinitionId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.rum.model.BatchDeleteRumMetricDefinitionsError) : this() {
this.errorCode = x.errorCode
this.errorMessage = x.errorMessage
this.metricDefinitionId = x.metricDefinitionId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.rum.model.BatchDeleteRumMetricDefinitionsError = BatchDeleteRumMetricDefinitionsError(this)
internal fun correctErrors(): Builder {
if (errorCode == null) errorCode = ""
if (errorMessage == null) errorMessage = ""
if (metricDefinitionId == null) metricDefinitionId = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy