[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-18 UTC."],[],[],null,["# Interface IndexOrBuilder (2.31.2)\n\nVersion latestkeyboard_arrow_down\n\n- [2.31.2 (latest)](/java/docs/reference/google-cloud-datastore/latest/com.google.datastore.admin.v1.IndexOrBuilder)\n- [2.31.1](/java/docs/reference/google-cloud-datastore/2.31.1/com.google.datastore.admin.v1.IndexOrBuilder)\n- [2.30.0](/java/docs/reference/google-cloud-datastore/2.30.0/com.google.datastore.admin.v1.IndexOrBuilder)\n- [2.29.1](/java/docs/reference/google-cloud-datastore/2.29.1/com.google.datastore.admin.v1.IndexOrBuilder)\n- [2.28.2](/java/docs/reference/google-cloud-datastore/2.28.2/com.google.datastore.admin.v1.IndexOrBuilder)\n- [2.27.1](/java/docs/reference/google-cloud-datastore/2.27.1/com.google.datastore.admin.v1.IndexOrBuilder)\n- [2.26.4](/java/docs/reference/google-cloud-datastore/2.26.4/com.google.datastore.admin.v1.IndexOrBuilder)\n- [2.25.2](/java/docs/reference/google-cloud-datastore/2.25.2/com.google.datastore.admin.v1.IndexOrBuilder)\n- [2.24.3](/java/docs/reference/google-cloud-datastore/2.24.3/com.google.datastore.admin.v1.IndexOrBuilder)\n- [2.23.0](/java/docs/reference/google-cloud-datastore/2.23.0/com.google.datastore.admin.v1.IndexOrBuilder)\n- [2.22.0](/java/docs/reference/google-cloud-datastore/2.22.0/com.google.datastore.admin.v1.IndexOrBuilder)\n- [2.21.3](/java/docs/reference/google-cloud-datastore/2.21.3/com.google.datastore.admin.v1.IndexOrBuilder)\n- [2.20.2](/java/docs/reference/google-cloud-datastore/2.20.2/com.google.datastore.admin.v1.IndexOrBuilder)\n- [2.19.2](/java/docs/reference/google-cloud-datastore/2.19.2/com.google.datastore.admin.v1.IndexOrBuilder)\n- [2.18.5](/java/docs/reference/google-cloud-datastore/2.18.5/com.google.datastore.admin.v1.IndexOrBuilder)\n- [2.17.6](/java/docs/reference/google-cloud-datastore/2.17.6/com.google.datastore.admin.v1.IndexOrBuilder) \n\n public interface IndexOrBuilder extends MessageOrBuilder\n\nImplements\n----------\n\n[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)\n\nMethods\n-------\n\n### getAncestor()\n\n public abstract Index.AncestorMode getAncestor()\n\nRequired. The index's ancestor mode. Must not be\nANCESTOR_MODE_UNSPECIFIED.\n\n`\n.google.datastore.admin.v1.Index.AncestorMode ancestor = 5 [(.google.api.field_behavior) = REQUIRED];\n`\n\n### getAncestorValue()\n\n public abstract int getAncestorValue()\n\nRequired. The index's ancestor mode. Must not be\nANCESTOR_MODE_UNSPECIFIED.\n\n`\n.google.datastore.admin.v1.Index.AncestorMode ancestor = 5 [(.google.api.field_behavior) = REQUIRED];\n`\n\n### getIndexId()\n\n public abstract String getIndexId()\n\nOutput only. The resource ID of the index.\n\n`string index_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];`\n\n### getIndexIdBytes()\n\n public abstract ByteString getIndexIdBytes()\n\nOutput only. The resource ID of the index.\n\n`string index_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];`\n\n### getKind()\n\n public abstract String getKind()\n\nRequired. The entity kind to which this index applies.\n\n`string kind = 4 [(.google.api.field_behavior) = REQUIRED];`\n\n### getKindBytes()\n\n public abstract ByteString getKindBytes()\n\nRequired. The entity kind to which this index applies.\n\n`string kind = 4 [(.google.api.field_behavior) = REQUIRED];`\n\n### getProjectId()\n\n public abstract String getProjectId()\n\nOutput only. Project ID.\n\n`string project_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];`\n\n### getProjectIdBytes()\n\n public abstract ByteString getProjectIdBytes()\n\nOutput only. Project ID.\n\n`string project_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];`\n\n### getProperties(int index)\n\n public abstract Index.IndexedProperty getProperties(int index)\n\nRequired. An ordered sequence of property names and their index attributes.\n\nRequires:\n\n- A maximum of 100 properties.\n\n`\nrepeated .google.datastore.admin.v1.Index.IndexedProperty properties = 6 [(.google.api.field_behavior) = REQUIRED];\n`\n\n### getPropertiesCount()\n\n public abstract int getPropertiesCount()\n\nRequired. An ordered sequence of property names and their index attributes.\n\nRequires:\n\n- A maximum of 100 properties.\n\n`\nrepeated .google.datastore.admin.v1.Index.IndexedProperty properties = 6 [(.google.api.field_behavior) = REQUIRED];\n`\n\n### getPropertiesList()\n\n public abstract List\u003cIndex.IndexedProperty\u003e getPropertiesList()\n\nRequired. An ordered sequence of property names and their index attributes.\n\nRequires:\n\n- A maximum of 100 properties.\n\n`\nrepeated .google.datastore.admin.v1.Index.IndexedProperty properties = 6 [(.google.api.field_behavior) = REQUIRED];\n`\n\n### getPropertiesOrBuilder(int index)\n\n public abstract Index.IndexedPropertyOrBuilder getPropertiesOrBuilder(int index)\n\nRequired. An ordered sequence of property names and their index attributes.\n\nRequires:\n\n- A maximum of 100 properties.\n\n`\nrepeated .google.datastore.admin.v1.Index.IndexedProperty properties = 6 [(.google.api.field_behavior) = REQUIRED];\n`\n\n### getPropertiesOrBuilderList()\n\n public abstract List\u003c? extends Index.IndexedPropertyOrBuilder\u003e getPropertiesOrBuilderList()\n\nRequired. An ordered sequence of property names and their index attributes.\n\nRequires:\n\n- A maximum of 100 properties.\n\n`\nrepeated .google.datastore.admin.v1.Index.IndexedProperty properties = 6 [(.google.api.field_behavior) = REQUIRED];\n`\n\n### getState()\n\n public abstract Index.State getState()\n\nOutput only. The state of the index.\n\n`\n.google.datastore.admin.v1.Index.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];\n`\n\n### getStateValue()\n\n public abstract int getStateValue()\n\nOutput only. The state of the index.\n\n`\n.google.datastore.admin.v1.Index.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];\n`"]]