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

There is a newer version: 1.3.99
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

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



public 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.
     */
    public val nextToken: kotlin.String? = builder.nextToken
    /**
     * The list of `ResourceCount` objects. Each object is listed in descending order by the number of resources.
     */
    public 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`.
     */
    public val totalDiscoveredResources: kotlin.Long = builder.totalDiscoveredResources

    public companion object {
        public 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")
        append(")")
    }

    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
    }

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

    public class Builder {
        /**
         * The string that you use in a subsequent request to get the next page of results in a paginated response.
         */
        public var nextToken: kotlin.String? = null
        /**
         * The list of `ResourceCount` objects. Each object is listed in descending order by the number of resources.
         */
        public 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`.
         */
        public var totalDiscoveredResources: kotlin.Long = 0L

        @PublishedApi
        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)

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy