public GetIndexResult withType(IndexType type) {
        this.type = type.toString();
        return this;
    }
<p>
The type of the index in this Region. For information about the aggregator index and how it differs from a local
index, see <a
href="https://docs.aws.amazon.com/resource-explorer/latest/userguide/manage-aggregator-region.html">Turning on
cross-Region search by creating an aggregator index</a>.
</p>

@param type
       The type of the index in this Region. For information about the aggregator index and how it differs from a
       local index, see <a
       href="https://docs.aws.amazon.com/resource-explorer/latest/userguide/manage-aggregator-region.html"
       >Turning on cross-Region search by creating an aggregator index</a>.
@return Returns a reference to this object so that method calls can be chained together.
@see IndexType
aws-java-sdk-resourceexplorer2/src/main/java/com/amazonaws/services/resourceexplorer2/model/GetIndexResult.java