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

commonMain.aws.sdk.kotlin.services.resourcegroups.model.SearchResourcesRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.resourcegroups.model



public class SearchResourcesRequest private constructor(builder: Builder) {
    /**
     * The total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the maximum you specify, the `NextToken` response element is present and has a value (is not null). Include that value as the `NextToken` request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check `NextToken` after every operation to ensure that you receive all of the results.
     */
    public val maxResults: kotlin.Int? = builder.maxResults
    /**
     * The parameter for receiving additional results if you receive a `NextToken` response in a previous request. A `NextToken` response indicates that more output is available. Set this parameter to the value provided by a previous call's `NextToken` response to indicate where the output should continue from.
     */
    public val nextToken: kotlin.String? = builder.nextToken
    /**
     * The search query, using the same formats that are supported for resource group definition. For more information, see CreateGroup.
     */
    public val resourceQuery: aws.sdk.kotlin.services.resourcegroups.model.ResourceQuery? = builder.resourceQuery

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

    override fun toString(): kotlin.String = buildString {
        append("SearchResourcesRequest(")
        append("maxResults=$maxResults,")
        append("nextToken=$nextToken,")
        append("resourceQuery=$resourceQuery")
        append(")")
    }

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

        if (maxResults != other.maxResults) return false
        if (nextToken != other.nextToken) return false
        if (resourceQuery != other.resourceQuery) return false

        return true
    }

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

    public class Builder {
        /**
         * The total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the maximum you specify, the `NextToken` response element is present and has a value (is not null). Include that value as the `NextToken` request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check `NextToken` after every operation to ensure that you receive all of the results.
         */
        public var maxResults: kotlin.Int? = null
        /**
         * The parameter for receiving additional results if you receive a `NextToken` response in a previous request. A `NextToken` response indicates that more output is available. Set this parameter to the value provided by a previous call's `NextToken` response to indicate where the output should continue from.
         */
        public var nextToken: kotlin.String? = null
        /**
         * The search query, using the same formats that are supported for resource group definition. For more information, see CreateGroup.
         */
        public var resourceQuery: aws.sdk.kotlin.services.resourcegroups.model.ResourceQuery? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.resourcegroups.model.SearchResourcesRequest) : this() {
            this.maxResults = x.maxResults
            this.nextToken = x.nextToken
            this.resourceQuery = x.resourceQuery
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.resourcegroups.model.SearchResourcesRequest = SearchResourcesRequest(this)

        /**
         * construct an [aws.sdk.kotlin.services.resourcegroups.model.ResourceQuery] inside the given [block]
         */
        public fun resourceQuery(block: aws.sdk.kotlin.services.resourcegroups.model.ResourceQuery.Builder.() -> kotlin.Unit) {
            this.resourceQuery = aws.sdk.kotlin.services.resourcegroups.model.ResourceQuery.invoke(block)
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy