Skip to content

Commit

Permalink
docs: Document encoding of non-UTF-8 key strings in the Cloud Datasto…
Browse files Browse the repository at this point in the history
…re API

PiperOrigin-RevId: 450535507
  • Loading branch information
Google APIs authored and Copybara-Service committed May 23, 2022
1 parent a7222a7 commit 2f003c0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions google/datastore/v1/entity.proto
Expand Up @@ -66,22 +66,33 @@ message Key {
// If neither is set, the element is incomplete.
message PathElement {
// The kind of the entity.
//
// A kind matching regex `__.*__` is reserved/read-only.
// A kind must not contain more than 1500 bytes when UTF-8 encoded.
// Cannot be `""`.
//
// Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are
// encoded as `__bytes<X>__` where `<X>` is the base-64 encoding of the
// bytes.
string kind = 1;

// The type of ID.
oneof id_type {
// The auto-allocated ID of the entity.
//
// Never equal to zero. Values less than zero are discouraged and may not
// be supported in the future.
int64 id = 2;

// The name of the entity.
//
// A name matching regex `__.*__` is reserved/read-only.
// A name must not be more than 1500 bytes when UTF-8 encoded.
// Cannot be `""`.
//
// Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are
// encoded as `__bytes<X>__` where `<X>` is the base-64 encoding of the
// bytes.
string name = 3;
}
}
Expand Down

0 comments on commit 2f003c0

Please sign in to comment.