All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.configservice.model.GroupedResourceCount.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.configservice.model



/**
 * The count of resources that are grouped by the group name.
 */
class GroupedResourceCount private constructor(builder: Builder) {
    /**
     * The name of the group that can be region, account ID, or resource type. For example, region1, region2 if the region was chosen as `GroupByKey`.
     */
    val groupName: kotlin.String? = builder.groupName
    /**
     * The number of resources in the group.
     */
    val resourceCount: kotlin.Long = builder.resourceCount

    companion object {
        operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.configservice.model.GroupedResourceCount = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("GroupedResourceCount(")
        append("groupName=$groupName,")
        append("resourceCount=$resourceCount)")
    }

    override fun hashCode(): kotlin.Int {
        var result = groupName?.hashCode() ?: 0
        result = 31 * result + (resourceCount.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 GroupedResourceCount

        if (groupName != other.groupName) return false
        if (resourceCount != other.resourceCount) return false

        return true
    }

    inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.configservice.model.GroupedResourceCount = Builder(this).apply(block).build()

    class Builder {
        /**
         * The name of the group that can be region, account ID, or resource type. For example, region1, region2 if the region was chosen as `GroupByKey`.
         */
        var groupName: kotlin.String? = null
        /**
         * The number of resources in the group.
         */
        var resourceCount: kotlin.Long = 0L

        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.configservice.model.GroupedResourceCount) : this() {
            this.groupName = x.groupName
            this.resourceCount = x.resourceCount
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.configservice.model.GroupedResourceCount = GroupedResourceCount(this)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy