commonMain.aws.sdk.kotlin.services.sagemakermetrics.model.BatchPutMetricsError.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sagemakermetrics-jvm Show documentation
Show all versions of sagemakermetrics-jvm Show documentation
The AWS Kotlin client for SageMaker Metrics
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.sagemakermetrics.model
/**
* An error that occured when putting the metric data.
*/
public class BatchPutMetricsError private constructor(builder: Builder) {
/**
* The error code of an error that occured when attempting to put metrics.
* + `METRIC_LIMIT_EXCEEDED`: The maximum amount of metrics per resource is exceeded.
* + `INTERNAL_ERROR`: An internal error occured.
* + `VALIDATION_ERROR`: The metric data failed validation.
* + `CONFLICT_ERROR`: Multiple requests attempted to modify the same data simultaneously.
*/
public val code: aws.sdk.kotlin.services.sagemakermetrics.model.PutMetricsErrorCode? = builder.code
/**
* An index that corresponds to the metric in the request.
*/
public val metricIndex: kotlin.Int? = builder.metricIndex
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.sagemakermetrics.model.BatchPutMetricsError = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("BatchPutMetricsError(")
append("code=$code,")
append("metricIndex=$metricIndex")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = code?.hashCode() ?: 0
result = 31 * result + (metricIndex ?: 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 BatchPutMetricsError
if (code != other.code) return false
if (metricIndex != other.metricIndex) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.sagemakermetrics.model.BatchPutMetricsError = Builder(this).apply(block).build()
public class Builder {
/**
* The error code of an error that occured when attempting to put metrics.
* + `METRIC_LIMIT_EXCEEDED`: The maximum amount of metrics per resource is exceeded.
* + `INTERNAL_ERROR`: An internal error occured.
* + `VALIDATION_ERROR`: The metric data failed validation.
* + `CONFLICT_ERROR`: Multiple requests attempted to modify the same data simultaneously.
*/
public var code: aws.sdk.kotlin.services.sagemakermetrics.model.PutMetricsErrorCode? = null
/**
* An index that corresponds to the metric in the request.
*/
public var metricIndex: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.sagemakermetrics.model.BatchPutMetricsError) : this() {
this.code = x.code
this.metricIndex = x.metricIndex
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.sagemakermetrics.model.BatchPutMetricsError = BatchPutMetricsError(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy