Reference documentation and code samples for the Firestore in Datastore mode V1 API class Google::Cloud::Datastore::V1::PartitionId.
A partition ID identifies a grouping of entities. The grouping is always
by project and namespace, however the namespace ID may be empty.
A partition ID contains several dimensions:
project ID and namespace ID.
Partition dimensions:
May be "".
Must be valid UTF-8 bytes.
Must have values that match regex [A-Za-z\d.-]{1,100}
If the value of any dimension matches regex _.*__, the partition is
reserved/read-only.
A reserved/read-only partition ID is forbidden in certain documented
contexts.
Foreign partition IDs (in which the project ID does
not match the context project ID ) are discouraged.
Reads and writes of foreign partition IDs may fail if the project is not in
an active state.
Inherits
Object
Extended By
Google::Protobuf::MessageExts::ClassMethods
Includes
Google::Protobuf::MessageExts
Methods
#database_id
defdatabase_id()->::String
Returns
(::String) — If not empty, the ID of the database to which the entities
belong.
#database_id=
defdatabase_id=(value)->::String
Parameter
value (::String) — If not empty, the ID of the database to which the entities
belong.
Returns
(::String) — If not empty, the ID of the database to which the entities
belong.
#namespace_id
defnamespace_id()->::String
Returns
(::String) — If not empty, the ID of the namespace to which the entities belong.
#namespace_id=
defnamespace_id=(value)->::String
Parameter
value (::String) — If not empty, the ID of the namespace to which the entities belong.
Returns
(::String) — If not empty, the ID of the namespace to which the entities belong.
#project_id
defproject_id()->::String
Returns
(::String) — The ID of the project to which the entities belong.
#project_id=
defproject_id=(value)->::String
Parameter
value (::String) — The ID of the project to which the entities belong.
Returns
(::String) — The ID of the project to which the entities belong.
[[["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,["# Firestore in Datastore mode V1 API - Class Google::Cloud::Datastore::V1::PartitionId (v1.4.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.4.1 (latest)](/ruby/docs/reference/google-cloud-datastore-v1/latest/Google-Cloud-Datastore-V1-PartitionId)\n- [1.4.0](/ruby/docs/reference/google-cloud-datastore-v1/1.4.0/Google-Cloud-Datastore-V1-PartitionId)\n- [1.3.1](/ruby/docs/reference/google-cloud-datastore-v1/1.3.1/Google-Cloud-Datastore-V1-PartitionId)\n- [1.2.0](/ruby/docs/reference/google-cloud-datastore-v1/1.2.0/Google-Cloud-Datastore-V1-PartitionId)\n- [1.1.0](/ruby/docs/reference/google-cloud-datastore-v1/1.1.0/Google-Cloud-Datastore-V1-PartitionId)\n- [1.0.1](/ruby/docs/reference/google-cloud-datastore-v1/1.0.1/Google-Cloud-Datastore-V1-PartitionId)\n- [0.19.0](/ruby/docs/reference/google-cloud-datastore-v1/0.19.0/Google-Cloud-Datastore-V1-PartitionId)\n- [0.18.0](/ruby/docs/reference/google-cloud-datastore-v1/0.18.0/Google-Cloud-Datastore-V1-PartitionId)\n- [0.17.0](/ruby/docs/reference/google-cloud-datastore-v1/0.17.0/Google-Cloud-Datastore-V1-PartitionId)\n- [0.16.3](/ruby/docs/reference/google-cloud-datastore-v1/0.16.3/Google-Cloud-Datastore-V1-PartitionId)\n- [0.15.0](/ruby/docs/reference/google-cloud-datastore-v1/0.15.0/Google-Cloud-Datastore-V1-PartitionId)\n- [0.14.0](/ruby/docs/reference/google-cloud-datastore-v1/0.14.0/Google-Cloud-Datastore-V1-PartitionId)\n- [0.13.1](/ruby/docs/reference/google-cloud-datastore-v1/0.13.1/Google-Cloud-Datastore-V1-PartitionId)\n- [0.12.0](/ruby/docs/reference/google-cloud-datastore-v1/0.12.0/Google-Cloud-Datastore-V1-PartitionId)\n- [0.11.1](/ruby/docs/reference/google-cloud-datastore-v1/0.11.1/Google-Cloud-Datastore-V1-PartitionId)\n- [0.10.0](/ruby/docs/reference/google-cloud-datastore-v1/0.10.0/Google-Cloud-Datastore-V1-PartitionId)\n- [0.9.0](/ruby/docs/reference/google-cloud-datastore-v1/0.9.0/Google-Cloud-Datastore-V1-PartitionId)\n- [0.8.0](/ruby/docs/reference/google-cloud-datastore-v1/0.8.0/Google-Cloud-Datastore-V1-PartitionId)\n- [0.7.0](/ruby/docs/reference/google-cloud-datastore-v1/0.7.0/Google-Cloud-Datastore-V1-PartitionId)\n- [0.6.0](/ruby/docs/reference/google-cloud-datastore-v1/0.6.0/Google-Cloud-Datastore-V1-PartitionId)\n- [0.5.0](/ruby/docs/reference/google-cloud-datastore-v1/0.5.0/Google-Cloud-Datastore-V1-PartitionId)\n- [0.4.0](/ruby/docs/reference/google-cloud-datastore-v1/0.4.0/Google-Cloud-Datastore-V1-PartitionId)\n- [0.3.5](/ruby/docs/reference/google-cloud-datastore-v1/0.3.5/Google-Cloud-Datastore-V1-PartitionId) \nReference documentation and code samples for the Firestore in Datastore mode V1 API class Google::Cloud::Datastore::V1::PartitionId.\n\nA partition ID identifies a grouping of entities. The grouping is always\nby project and namespace, however the namespace ID may be empty.\n\n\nA partition ID contains several dimensions:\nproject ID and namespace ID.\n\nPartition dimensions:\n\n- May be `\"\"`.\n- Must be valid UTF-8 bytes.\n- Must have values that match regex `[A-Za-z\\d.-`*]{1,100}* If the value of any dimension matches regex `_.*__`, the partition is reserved/read-only. A reserved/read-only partition ID is forbidden in certain documented contexts.\n\n\u003cbr /\u003e\n\nForeign partition IDs (in which the project ID does\nnot match the context project ID ) are discouraged.\nReads and writes of foreign partition IDs may fail if the project is not in\nan active state. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #database_id\n\n def database_id() -\u003e ::String\n\n**Returns**\n\n- (::String) --- If not empty, the ID of the database to which the entities belong.\n\n### #database_id=\n\n def database_id=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- If not empty, the ID of the database to which the entities belong. \n**Returns**\n\n- (::String) --- If not empty, the ID of the database to which the entities belong.\n\n### #namespace_id\n\n def namespace_id() -\u003e ::String\n\n**Returns**\n\n- (::String) --- If not empty, the ID of the namespace to which the entities belong.\n\n### #namespace_id=\n\n def namespace_id=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- If not empty, the ID of the namespace to which the entities belong. \n**Returns**\n\n- (::String) --- If not empty, the ID of the namespace to which the entities belong.\n\n### #project_id\n\n def project_id() -\u003e ::String\n\n**Returns**\n\n- (::String) --- The ID of the project to which the entities belong.\n\n### #project_id=\n\n def project_id=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- The ID of the project to which the entities belong. \n**Returns**\n\n- (::String) --- The ID of the project to which the entities belong."]]