
commonMain.aws.sdk.kotlin.services.pi.model.ResponsePartitionKey.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.pi.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* If `PartitionBy` was specified in a `DescribeDimensionKeys` request, the dimensions are returned in an array. Each element in the array specifies one dimension.
*/
public class ResponsePartitionKey private constructor(builder: Builder) {
/**
* A dimension map that contains the dimensions for this partition.
*/
public val dimensions: Map = requireNotNull(builder.dimensions) { "A non-null value must be provided for dimensions" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.pi.model.ResponsePartitionKey = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ResponsePartitionKey(")
append("dimensions=$dimensions")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = dimensions.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 ResponsePartitionKey
if (dimensions != other.dimensions) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.pi.model.ResponsePartitionKey = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A dimension map that contains the dimensions for this partition.
*/
public var dimensions: Map? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.pi.model.ResponsePartitionKey) : this() {
this.dimensions = x.dimensions
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.pi.model.ResponsePartitionKey = ResponsePartitionKey(this)
internal fun correctErrors(): Builder {
if (dimensions == null) dimensions = emptyMap()
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy