
commonMain.aws.sdk.kotlin.services.rum.model.BatchCreateRumMetricDefinitionsResponse.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.rum.model
public class BatchCreateRumMetricDefinitionsResponse private constructor(builder: Builder) {
/**
* An array of error objects, if the operation caused any errors.
*/
public val errors: List = requireNotNull(builder.errors) { "A non-null value must be provided for errors" }
/**
* An array of structures that define the extended metrics.
*/
public val metricDefinitions: List? = builder.metricDefinitions
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.rum.model.BatchCreateRumMetricDefinitionsResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("BatchCreateRumMetricDefinitionsResponse(")
append("errors=$errors,")
append("metricDefinitions=$metricDefinitions")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = errors.hashCode()
result = 31 * result + (metricDefinitions?.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 BatchCreateRumMetricDefinitionsResponse
if (errors != other.errors) return false
if (metricDefinitions != other.metricDefinitions) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.rum.model.BatchCreateRumMetricDefinitionsResponse = Builder(this).apply(block).build()
public class Builder {
/**
* An array of error objects, if the operation caused any errors.
*/
public var errors: List? = null
/**
* An array of structures that define the extended metrics.
*/
public var metricDefinitions: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.rum.model.BatchCreateRumMetricDefinitionsResponse) : this() {
this.errors = x.errors
this.metricDefinitions = x.metricDefinitions
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.rum.model.BatchCreateRumMetricDefinitionsResponse = BatchCreateRumMetricDefinitionsResponse(this)
internal fun correctErrors(): Builder {
if (errors == null) errors = emptyList()
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy