Skip to content

Commit 6c49c54

Browse files
authored
Merge pull request #2081 from dhermes/update-datastore-generated
Updating datastore generated modules.
2 parents bd5273e + 99581d9 commit 6c49c54

File tree

7 files changed

+389
-361
lines changed

7 files changed

+389
-361
lines changed

gcloud/datastore/_generated/_datastore.proto

Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -32,46 +32,47 @@ option java_package = "com.google.datastore.v1beta3";
3232
// input keys sets the project ID (if not already set) to the project ID from
3333
// the request.
3434
//
35+
//
3536
service Datastore {
36-
// Look up entities by key.
37+
// Looks up entities by key.
3738
rpc Lookup(LookupRequest) returns (LookupResponse) {
3839
option (google.api.http) = { post: "/v1beta3/projects/{project_id}:lookup" body: "*" };
3940
}
4041

41-
// Query for entities.
42+
// Queries for entities.
4243
rpc RunQuery(RunQueryRequest) returns (RunQueryResponse) {
4344
option (google.api.http) = { post: "/v1beta3/projects/{project_id}:runQuery" body: "*" };
4445
}
4546

46-
// Begin a new transaction.
47+
// Begins a new transaction.
4748
rpc BeginTransaction(BeginTransactionRequest) returns (BeginTransactionResponse) {
4849
option (google.api.http) = { post: "/v1beta3/projects/{project_id}:beginTransaction" body: "*" };
4950
}
5051

51-
// Commit a transaction, optionally creating, deleting or modifying some
52+
// Commits a transaction, optionally creating, deleting or modifying some
5253
// entities.
5354
rpc Commit(CommitRequest) returns (CommitResponse) {
5455
option (google.api.http) = { post: "/v1beta3/projects/{project_id}:commit" body: "*" };
5556
}
5657

57-
// Roll back a transaction.
58+
// Rolls back a transaction.
5859
rpc Rollback(RollbackRequest) returns (RollbackResponse) {
5960
option (google.api.http) = { post: "/v1beta3/projects/{project_id}:rollback" body: "*" };
6061
}
6162

62-
// Allocate IDs for the given keys (useful for referencing an entity before
63-
// it is inserted).
63+
// Allocates IDs for the given keys, which is useful for referencing an entity
64+
// before it is inserted.
6465
rpc AllocateIds(AllocateIdsRequest) returns (AllocateIdsResponse) {
6566
option (google.api.http) = { post: "/v1beta3/projects/{project_id}:allocateIds" body: "*" };
6667
}
6768
}
6869

6970
// The request for [google.datastore.v1beta3.Datastore.Lookup][google.datastore.v1beta3.Datastore.Lookup].
7071
message LookupRequest {
71-
// Project ID against which to make the request.
72+
// The ID of the project against which to make the request.
7273
string project_id = 8;
7374

74-
// Options for this lookup request.
75+
// The options for this lookup request.
7576
ReadOptions read_options = 1;
7677

7778
// Keys of entities to look up.
@@ -98,7 +99,7 @@ message LookupResponse {
9899

99100
// The request for [google.datastore.v1beta3.Datastore.RunQuery][google.datastore.v1beta3.Datastore.RunQuery].
100101
message RunQueryRequest {
101-
// Project ID against which to make the request.
102+
// The ID of the project against which to make the request.
102103
string project_id = 8;
103104

104105
// Entities are partitioned into subsets, identified by a partition ID.
@@ -131,7 +132,7 @@ message RunQueryResponse {
131132

132133
// The request for [google.datastore.v1beta3.Datastore.BeginTransaction][google.datastore.v1beta3.Datastore.BeginTransaction].
133134
message BeginTransactionRequest {
134-
// Project ID against which to make the request.
135+
// The ID of the project against which to make the request.
135136
string project_id = 8;
136137
}
137138

@@ -143,7 +144,7 @@ message BeginTransactionResponse {
143144

144145
// The request for [google.datastore.v1beta3.Datastore.Rollback][google.datastore.v1beta3.Datastore.Rollback].
145146
message RollbackRequest {
146-
// Project ID against which to make the request.
147+
// The ID of the project against which to make the request.
147148
string project_id = 8;
148149

149150
// The transaction identifier, returned by a call to
@@ -159,27 +160,30 @@ message RollbackResponse {
159160

160161
// The request for [google.datastore.v1beta3.Datastore.Commit][google.datastore.v1beta3.Datastore.Commit].
161162
message CommitRequest {
162-
// Commit modes.
163+
// The modes available for commits.
163164
enum Mode {
164-
// Unspecified.
165+
// Unspecified. This value must not be used.
165166
MODE_UNSPECIFIED = 0;
166167

167-
// Transactional.
168+
// Transactional: The mutations are either all applied, or none are applied.
169+
// Learn about transactions [here](https://cloud.google.com/datastore/docs/concepts/transactions).
168170
TRANSACTIONAL = 1;
169171

170-
// Non-transactional.
172+
// Non-transactional: The mutations may not apply as all or none.
171173
NON_TRANSACTIONAL = 2;
172174
}
173175

174-
// Project ID against which to make the request.
176+
// The ID of the project against which to make the request.
175177
string project_id = 8;
176178

177179
// The type of commit to perform. Defaults to `TRANSACTIONAL`.
178180
Mode mode = 5;
179181

180182
// Must be set when mode is `TRANSACTIONAL`.
181183
oneof transaction_selector {
182-
// The transaction in which to write.
184+
// The identifier of the transaction associated with the commit. A
185+
// transaction identifier is returned by a call to
186+
// [BeginTransaction][google.datastore.v1beta3.Datastore.BeginTransaction].
183187
bytes transaction = 1;
184188
}
185189

@@ -188,6 +192,7 @@ message CommitRequest {
188192
// When mode is `TRANSACTIONAL`, mutations affecting a single entity are
189193
// applied in order. The following sequences of mutations affecting a single
190194
// entity are not permitted in a single `Commit` request:
195+
//
191196
// - `insert` followed by `insert`
192197
// - `update` followed by `insert`
193198
// - `upsert` followed by `insert`
@@ -204,13 +209,14 @@ message CommitResponse {
204209
// The i-th mutation result corresponds to the i-th mutation in the request.
205210
repeated MutationResult mutation_results = 3;
206211

207-
// The number of index entries updated during the commit.
212+
// The number of index entries updated during the commit, or zero if none were
213+
// updated.
208214
int32 index_updates = 4;
209215
}
210216

211217
// The request for [google.datastore.v1beta3.Datastore.AllocateIds][google.datastore.v1beta3.Datastore.AllocateIds].
212218
message AllocateIdsRequest {
213-
// Project ID against which to make the request.
219+
// The ID of the project against which to make the request.
214220
string project_id = 8;
215221

216222
// A list of keys with incomplete key paths for which to allocate IDs.
@@ -237,15 +243,15 @@ message Mutation {
237243
// not even a value in an entity in another value.
238244
oneof operation {
239245
// The entity to insert. The entity must not already exist.
240-
// The entity's key's final path element may be incomplete.
246+
// The entity key's final path element may be incomplete.
241247
Entity insert = 4;
242248

243249
// The entity to update. The entity must already exist.
244250
// Must have a complete key path.
245251
Entity update = 5;
246252

247253
// The entity to upsert. The entity may or may not already exist.
248-
// The entity's key's final path element may be incomplete.
254+
// The entity key's final path element may be incomplete.
249255
Entity upsert = 6;
250256

251257
// The key of the entity to delete. The entity may or may not already exist.
@@ -261,11 +267,11 @@ message MutationResult {
261267
Key key = 3;
262268
}
263269

264-
// Options shared by read requests.
270+
// The options shared by read requests.
265271
message ReadOptions {
266-
// Read consistencies.
272+
// The possible values for read consistencies.
267273
enum ReadConsistency {
268-
// Unspecified.
274+
// Unspecified. This value must not be used.
269275
READ_CONSISTENCY_UNSPECIFIED = 0;
270276

271277
// Strong consistency.

gcloud/datastore/_generated/_entity.proto

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,12 @@ option java_package = "com.google.datastore.v1beta3";
3131
//
3232
// A partition ID contains several dimensions:
3333
// project ID and namespace ID.
34+
//
3435
// Partition dimensions:
35-
// - A dimension may be `""`.
36-
// - A dimension must be valid UTF-8 bytes.
37-
// - A dimension's value must match regex `[A-Za-z\d\.\-_]{1,100}`
36+
//
37+
// - May be `""`.
38+
// - Must be valid UTF-8 bytes.
39+
// - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
3840
// If the value of any dimension matches regex `__.*__`, the partition is
3941
// reserved/read-only.
4042
// A reserved/read-only partition ID is forbidden in certain documented
@@ -44,21 +46,21 @@ option java_package = "com.google.datastore.v1beta3";
4446
// not match the context project ID ) are discouraged.
4547
// Reads and writes of foreign partition IDs may fail if the project is not in an active state.
4648
message PartitionId {
47-
// Project ID.
49+
// The ID of the project to which the entities belong.
4850
string project_id = 2;
4951

50-
// Namespace ID.
52+
// If not empty, the ID of the namespace to which the entities belong.
5153
string namespace_id = 4;
5254
}
5355

5456
// A unique identifier for an entity.
55-
// If a key's partition id or any of its path kinds or names are
57+
// If a key's partition ID or any of its path kinds or names are
5658
// reserved/read-only, the key is reserved/read-only.
5759
// A reserved/read-only key is forbidden in certain documented contexts.
5860
message Key {
5961
// A (kind, ID/name) pair used to construct a key path.
6062
//
61-
// If either name nor ID is set, the element is complete.
63+
// If either name or ID is set, the element is complete.
6264
// If neither is set, the element is incomplete.
6365
message PathElement {
6466
// The kind of the entity.
@@ -67,9 +69,9 @@ message Key {
6769
// Cannot be `""`.
6870
string kind = 1;
6971

70-
// The type of id.
72+
// The type of ID.
7173
oneof id_type {
72-
// The auto allocated ID of the entity.
74+
// The auto-allocated ID of the entity.
7375
// Never equal to zero. Values less than zero are discouraged and may not
7476
// be supported in the future.
7577
int64 id = 2;
@@ -82,23 +84,27 @@ message Key {
8284
}
8385
}
8486

85-
// Entities are partitioned into subsets, currently identified by a dataset
86-
// (usually implicitly specified by the project) and namespace ID.
87+
// Entities are partitioned into subsets, currently identified by a project
88+
// ID and namespace ID.
8789
// Queries are scoped to a single partition.
8890
PartitionId partition_id = 1;
8991

9092
// The entity path.
9193
// An entity path consists of one or more elements composed of a kind and a
9294
// string or numerical identifier, which identify entities. The first
9395
// element identifies a _root entity_, the second element identifies
94-
// a _child_ of the root entity, the third element a child of the
96+
// a _child_ of the root entity, the third element identifies a child of the
9597
// second entity, and so forth. The entities identified by all prefixes of
9698
// the path are called the element's _ancestors_.
99+
//
97100
// An entity path is always fully complete: *all* of the entity's ancestors
98101
// are required to be in the path along with the entity identifier itself.
99102
// The only exception is that in some documented cases, the identifier in the
100-
// last path element (for the entity) itself may be omitted. A path can never
101-
// be empty. The path can have at most 100 elements.
103+
// last path element (for the entity) itself may be omitted. For example,
104+
// the last path element of the key of `Mutation.insert` may have no
105+
// identifier.
106+
//
107+
// A path can never be empty, and a path can have at most 100 elements.
102108
repeated PathElement path = 2;
103109
}
104110

@@ -136,10 +142,8 @@ message Value {
136142
Key key_value = 5;
137143

138144
// A UTF-8 encoded string value.
139-
// When `exclude_from_indexes` is false (it is indexed) and meaning is not
140-
// 2, may have at most 1500 bytes.
141-
// When meaning is 2, may have at most 2083 bytes.
142-
// Otherwise, may be set to at least 1,000,000 bytes
145+
// When `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes.
146+
// Otherwise, may be set to at least 1,000,000 bytes.
143147
string string_value = 17;
144148

145149
// A blob value.
@@ -152,9 +156,10 @@ message Value {
152156
google.type.LatLng geo_point_value = 8;
153157

154158
// An entity value.
155-
// May have no key.
156-
// May have a key with an incomplete key path.
157-
// May have a reserved/read-only key.
159+
//
160+
// - May have no key.
161+
// - May have a key with an incomplete key path.
162+
// - May have a reserved/read-only key.
158163
Entity entity_value = 6;
159164

160165
// An array value.
@@ -172,7 +177,7 @@ message Value {
172177
bool exclude_from_indexes = 19;
173178
}
174179

175-
// An entity.
180+
// A Datastore data object.
176181
//
177182
// An entity is limited to 1 megabyte when stored. That _roughly_
178183
// corresponds to a limit of 1 megabyte for the serialized form of this
@@ -182,7 +187,7 @@ message Entity {
182187
//
183188
// An entity must have a key, unless otherwise documented (for example,
184189
// an entity in `Value.entity_value` may have no key).
185-
// An entity's kind is its key's path's last element's kind,
190+
// An entity's kind is its key path's last element's kind,
186191
// or null if it has no key.
187192
Key key = 1;
188193

0 commit comments

Comments
 (0)