[[["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-09-04 UTC."],[],[],null,["# Interface LookupRequestOrBuilder (2.31.2)\n\nVersion latestkeyboard_arrow_down\n\n- [2.31.2 (latest)](/java/docs/reference/google-cloud-datastore/latest/com.google.datastore.v1.LookupRequestOrBuilder)\n- [2.31.1](/java/docs/reference/google-cloud-datastore/2.31.1/com.google.datastore.v1.LookupRequestOrBuilder)\n- [2.30.0](/java/docs/reference/google-cloud-datastore/2.30.0/com.google.datastore.v1.LookupRequestOrBuilder)\n- [2.29.1](/java/docs/reference/google-cloud-datastore/2.29.1/com.google.datastore.v1.LookupRequestOrBuilder)\n- [2.28.2](/java/docs/reference/google-cloud-datastore/2.28.2/com.google.datastore.v1.LookupRequestOrBuilder)\n- [2.27.1](/java/docs/reference/google-cloud-datastore/2.27.1/com.google.datastore.v1.LookupRequestOrBuilder)\n- [2.26.4](/java/docs/reference/google-cloud-datastore/2.26.4/com.google.datastore.v1.LookupRequestOrBuilder)\n- [2.25.2](/java/docs/reference/google-cloud-datastore/2.25.2/com.google.datastore.v1.LookupRequestOrBuilder)\n- [2.24.3](/java/docs/reference/google-cloud-datastore/2.24.3/com.google.datastore.v1.LookupRequestOrBuilder)\n- [2.23.0](/java/docs/reference/google-cloud-datastore/2.23.0/com.google.datastore.v1.LookupRequestOrBuilder)\n- [2.22.0](/java/docs/reference/google-cloud-datastore/2.22.0/com.google.datastore.v1.LookupRequestOrBuilder)\n- [2.21.3](/java/docs/reference/google-cloud-datastore/2.21.3/com.google.datastore.v1.LookupRequestOrBuilder)\n- [2.20.2](/java/docs/reference/google-cloud-datastore/2.20.2/com.google.datastore.v1.LookupRequestOrBuilder)\n- [2.19.2](/java/docs/reference/google-cloud-datastore/2.19.2/com.google.datastore.v1.LookupRequestOrBuilder)\n- [2.18.5](/java/docs/reference/google-cloud-datastore/2.18.5/com.google.datastore.v1.LookupRequestOrBuilder)\n- [2.17.6](/java/docs/reference/google-cloud-datastore/2.17.6/com.google.datastore.v1.LookupRequestOrBuilder) \n\n public interface LookupRequestOrBuilder 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### getDatabaseId()\n\n public abstract String getDatabaseId()\n\nThe ID of the database against which to make the request.\n\n'(default)' is not allowed; please use empty string '' to refer the default\ndatabase.\n\n`string database_id = 9;`\n\n### getDatabaseIdBytes()\n\n public abstract ByteString getDatabaseIdBytes()\n\nThe ID of the database against which to make the request.\n\n'(default)' is not allowed; please use empty string '' to refer the default\ndatabase.\n\n`string database_id = 9;`\n\n### getKeys(int index)\n\n public abstract Key getKeys(int index)\n\nRequired. Keys of entities to look up.\n\n`repeated .google.datastore.v1.Key keys = 3 [(.google.api.field_behavior) = REQUIRED];\n`\n\n### getKeysCount()\n\n public abstract int getKeysCount()\n\nRequired. Keys of entities to look up.\n\n`repeated .google.datastore.v1.Key keys = 3 [(.google.api.field_behavior) = REQUIRED];\n`\n\n### getKeysList()\n\n public abstract List\u003cKey\u003e getKeysList()\n\nRequired. Keys of entities to look up.\n\n`repeated .google.datastore.v1.Key keys = 3 [(.google.api.field_behavior) = REQUIRED];\n`\n\n### getKeysOrBuilder(int index)\n\n public abstract KeyOrBuilder getKeysOrBuilder(int index)\n\nRequired. Keys of entities to look up.\n\n`repeated .google.datastore.v1.Key keys = 3 [(.google.api.field_behavior) = REQUIRED];\n`\n\n### getKeysOrBuilderList()\n\n public abstract List\u003c? extends KeyOrBuilder\u003e getKeysOrBuilderList()\n\nRequired. Keys of entities to look up.\n\n`repeated .google.datastore.v1.Key keys = 3 [(.google.api.field_behavior) = REQUIRED];\n`\n\n### getProjectId()\n\n public abstract String getProjectId()\n\nRequired. The ID of the project against which to make the request.\n\n`string project_id = 8 [(.google.api.field_behavior) = REQUIRED];`\n\n### getProjectIdBytes()\n\n public abstract ByteString getProjectIdBytes()\n\nRequired. The ID of the project against which to make the request.\n\n`string project_id = 8 [(.google.api.field_behavior) = REQUIRED];`\n\n### getPropertyMask()\n\n public abstract PropertyMask getPropertyMask()\n\nThe properties to return. Defaults to returning all properties.\n\nIf this field is set and an entity has a property not referenced in the\nmask, it will be absent from \\[LookupResponse.found.entity.properties\\]\\[\\].\n\nThe entity's key is always returned.\n\n`.google.datastore.v1.PropertyMask property_mask = 5;`\n\n### getPropertyMaskOrBuilder()\n\n public abstract PropertyMaskOrBuilder getPropertyMaskOrBuilder()\n\nThe properties to return. Defaults to returning all properties.\n\nIf this field is set and an entity has a property not referenced in the\nmask, it will be absent from \\[LookupResponse.found.entity.properties\\]\\[\\].\n\nThe entity's key is always returned.\n\n`.google.datastore.v1.PropertyMask property_mask = 5;`\n\n### getReadOptions()\n\n public abstract ReadOptions getReadOptions()\n\nThe options for this lookup request.\n\n`.google.datastore.v1.ReadOptions read_options = 1;`\n\n### getReadOptionsOrBuilder()\n\n public abstract ReadOptionsOrBuilder getReadOptionsOrBuilder()\n\nThe options for this lookup request.\n\n`.google.datastore.v1.ReadOptions read_options = 1;`\n\n### hasPropertyMask()\n\n public abstract boolean hasPropertyMask()\n\nThe properties to return. Defaults to returning all properties.\n\nIf this field is set and an entity has a property not referenced in the\nmask, it will be absent from \\[LookupResponse.found.entity.properties\\]\\[\\].\n\nThe entity's key is always returned.\n\n`.google.datastore.v1.PropertyMask property_mask = 5;`\n\n### hasReadOptions()\n\n public abstract boolean hasReadOptions()\n\nThe options for this lookup request.\n\n`.google.datastore.v1.ReadOptions read_options = 1;`"]]