
commonMain.aws.sdk.kotlin.services.iottwinmaker.model.OrderBy.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iottwinmaker.model
/**
* Filter criteria that orders the return output. It can be sorted in ascending or descending order.
*/
public class OrderBy private constructor(builder: Builder) {
/**
* The set order that filters results.
*/
public val order: aws.sdk.kotlin.services.iottwinmaker.model.Order? = builder.order
/**
* The property name.
*/
public val propertyName: kotlin.String = requireNotNull(builder.propertyName) { "A non-null value must be provided for propertyName" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iottwinmaker.model.OrderBy = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("OrderBy(")
append("order=$order,")
append("propertyName=$propertyName")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = order?.hashCode() ?: 0
result = 31 * result + (propertyName.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 OrderBy
if (order != other.order) return false
if (propertyName != other.propertyName) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iottwinmaker.model.OrderBy = Builder(this).apply(block).build()
public class Builder {
/**
* The set order that filters results.
*/
public var order: aws.sdk.kotlin.services.iottwinmaker.model.Order? = null
/**
* The property name.
*/
public var propertyName: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iottwinmaker.model.OrderBy) : this() {
this.order = x.order
this.propertyName = x.propertyName
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iottwinmaker.model.OrderBy = OrderBy(this)
internal fun correctErrors(): Builder {
if (propertyName == null) propertyName = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy