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

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

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

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



class GetDiscoveredResourceCountsResponse private constructor(builder: Builder) {
    /**
     * The string that you use in a subsequent request to get the next page of results in a paginated response.
     */
    val nextToken: kotlin.String? = builder.nextToken
    /**
     * The list of `ResourceCount` objects. Each object is listed in descending order by the number of resources.
     */
    val resourceCounts: List? = builder.resourceCounts
    /**
     * The total number of resources that Config is recording in the region for your account. If you specify resource types in the request, Config returns only the total number of resources for those resource types.
     *
     * **Example**
     * + Config is recording three resource types in the US East (Ohio) Region for your account: 25 EC2 instances, 20 IAM users, and 15 S3 buckets, for a total of 60 resources.
     * + You make a call to the `GetDiscoveredResourceCounts` action and specify the resource type, `"AWS::EC2::Instances"`, in the request.
     * + Config returns 25 for `totalDiscoveredResources`.
     */
    val totalDiscoveredResources: kotlin.Long = builder.totalDiscoveredResources

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

    override fun toString(): kotlin.String = buildString {
        append("GetDiscoveredResourceCountsResponse(")
        append("nextToken=$nextToken,")
        append("resourceCounts=$resourceCounts,")
        append("totalDiscoveredResources=$totalDiscoveredResources)")
    }

    override fun hashCode(): kotlin.Int {
        var result = nextToken?.hashCode() ?: 0
        result = 31 * result + (resourceCounts?.hashCode() ?: 0)
        result = 31 * result + (totalDiscoveredResources.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 GetDiscoveredResourceCountsResponse

        if (nextToken != other.nextToken) return false
        if (resourceCounts != other.resourceCounts) return false
        if (totalDiscoveredResources != other.totalDiscoveredResources) return false

        return true
    }

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

    class Builder {
        /**
         * The string that you use in a subsequent request to get the next page of results in a paginated response.
         */
        var nextToken: kotlin.String? = null
        /**
         * The list of `ResourceCount` objects. Each object is listed in descending order by the number of resources.
         */
        var resourceCounts: List? = null
        /**
         * The total number of resources that Config is recording in the region for your account. If you specify resource types in the request, Config returns only the total number of resources for those resource types.
         *
         * **Example**
         * + Config is recording three resource types in the US East (Ohio) Region for your account: 25 EC2 instances, 20 IAM users, and 15 S3 buckets, for a total of 60 resources.
         * + You make a call to the `GetDiscoveredResourceCounts` action and specify the resource type, `"AWS::EC2::Instances"`, in the request.
         * + Config returns 25 for `totalDiscoveredResources`.
         */
        var totalDiscoveredResources: kotlin.Long = 0L

        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.configservice.model.GetDiscoveredResourceCountsResponse) : this() {
            this.nextToken = x.nextToken
            this.resourceCounts = x.resourceCounts
            this.totalDiscoveredResources = x.totalDiscoveredResources
        }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy