
commonMain.aws.sdk.kotlin.services.ssm.model.InventoryGroup.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.ssm.model
/**
* A user-defined set of one or more filters on which to aggregate inventory data. Groups return a count of resources that match and don't match the specified criteria.
*/
public class InventoryGroup private constructor(builder: Builder) {
/**
* Filters define the criteria for the group. The `matchingCount` field displays the number of resources that match the criteria. The `notMatchingCount` field displays the number of resources that don't match the criteria.
*/
public val filters: List = requireNotNull(builder.filters) { "A non-null value must be provided for filters" }
/**
* The name of the group.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ssm.model.InventoryGroup = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("InventoryGroup(")
append("filters=$filters,")
append("name=$name")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = filters.hashCode()
result = 31 * result + (name.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 InventoryGroup
if (filters != other.filters) return false
if (name != other.name) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ssm.model.InventoryGroup = Builder(this).apply(block).build()
public class Builder {
/**
* Filters define the criteria for the group. The `matchingCount` field displays the number of resources that match the criteria. The `notMatchingCount` field displays the number of resources that don't match the criteria.
*/
public var filters: List? = null
/**
* The name of the group.
*/
public var name: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.ssm.model.InventoryGroup) : this() {
this.filters = x.filters
this.name = x.name
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.ssm.model.InventoryGroup = InventoryGroup(this)
internal fun correctErrors(): Builder {
if (filters == null) filters = emptyList()
if (name == null) name = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy