protobufjs 4.1.2 → 5.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. package/.travis.yml +3 -1
  2. package/README.md +147 -25
  3. package/bin/pbjs +2 -2
  4. package/bower.json +3 -3
  5. package/cli/pbjs/targets/amd.js +1 -1
  6. package/cli/pbjs/targets/json.js +9 -1
  7. package/cli/pbjs/targets/proto.js +48 -24
  8. package/cli/pbjs/util.js +1 -1
  9. package/cli/pbjs.js +9 -2
  10. package/dist/README.md +10 -10
  11. package/dist/{ProtoBuf-light.js → protobuf-light.js} +207 -152
  12. package/dist/protobuf-light.min.js +94 -0
  13. package/dist/protobuf-light.min.js.gz +0 -0
  14. package/dist/protobuf-light.min.map +8 -0
  15. package/dist/{ProtoBuf.js → protobuf.js} +265 -175
  16. package/dist/protobuf.min.js +116 -0
  17. package/dist/protobuf.min.js.gz +0 -0
  18. package/dist/protobuf.min.map +8 -0
  19. package/docs/ProtoBuf.Builder.Message.html +1473 -967
  20. package/docs/ProtoBuf.Builder.Service.html +266 -197
  21. package/docs/ProtoBuf.Builder.html +758 -542
  22. package/docs/ProtoBuf.DotProto.Parser.html +223 -161
  23. package/docs/ProtoBuf.DotProto.Tokenizer.html +344 -248
  24. package/docs/ProtoBuf.DotProto.html +20 -12
  25. package/docs/ProtoBuf.Element.html +554 -554
  26. package/docs/ProtoBuf.Map.html +158 -123
  27. package/docs/ProtoBuf.Reflect.Element.html +286 -143
  28. package/docs/ProtoBuf.Reflect.Enum.Value.html +329 -228
  29. package/docs/ProtoBuf.Reflect.Enum.html +757 -537
  30. package/docs/ProtoBuf.Reflect.Extension.html +73 -56
  31. package/docs/ProtoBuf.Reflect.Message.ExtensionField.html +1013 -740
  32. package/docs/ProtoBuf.Reflect.Message.Field.html +926 -649
  33. package/docs/ProtoBuf.Reflect.Message.OneOf.html +327 -245
  34. package/docs/ProtoBuf.Reflect.Message.html +919 -652
  35. package/docs/ProtoBuf.Reflect.Namespace.html +648 -447
  36. package/docs/ProtoBuf.Reflect.Service.Method.html +363 -251
  37. package/docs/ProtoBuf.Reflect.Service.RPCMethod.html +545 -397
  38. package/docs/ProtoBuf.Reflect.Service.html +721 -511
  39. package/docs/ProtoBuf.Reflect.T.html +268 -197
  40. package/docs/ProtoBuf.Reflect.html +20 -12
  41. package/docs/ProtoBuf.Util.html +169 -118
  42. package/docs/ProtoBuf.html +840 -628
  43. package/docs/ProtoBuf.js.html +271 -180
  44. package/docs/fonts/OpenSans-Bold-webfont.eot +0 -0
  45. package/docs/fonts/OpenSans-Bold-webfont.svg +1830 -0
  46. package/docs/fonts/OpenSans-Bold-webfont.woff +0 -0
  47. package/docs/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
  48. package/docs/fonts/OpenSans-BoldItalic-webfont.svg +1830 -0
  49. package/docs/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
  50. package/docs/fonts/OpenSans-Italic-webfont.eot +0 -0
  51. package/docs/fonts/OpenSans-Italic-webfont.svg +1830 -0
  52. package/docs/fonts/OpenSans-Italic-webfont.woff +0 -0
  53. package/docs/fonts/OpenSans-Light-webfont.eot +0 -0
  54. package/docs/fonts/OpenSans-Light-webfont.svg +1831 -0
  55. package/docs/fonts/OpenSans-Light-webfont.woff +0 -0
  56. package/docs/fonts/OpenSans-LightItalic-webfont.eot +0 -0
  57. package/docs/fonts/OpenSans-LightItalic-webfont.svg +1835 -0
  58. package/docs/fonts/OpenSans-LightItalic-webfont.woff +0 -0
  59. package/docs/fonts/OpenSans-Regular-webfont.eot +0 -0
  60. package/docs/fonts/OpenSans-Regular-webfont.svg +1831 -0
  61. package/docs/fonts/OpenSans-Regular-webfont.woff +0 -0
  62. package/docs/index.html +7 -5
  63. package/docs/styles/jsdoc-default.css +95 -75
  64. package/docs/styles/prettify-tomorrow.css +1 -1
  65. package/donate.png +0 -0
  66. package/examples/protoify/json.js +123 -123
  67. package/examples/protoify/json.json +123 -123
  68. package/examples/websocket/server.js +4 -4
  69. package/externs/{ProtoBuf.js → protobuf.js} +933 -922
  70. package/index.js +1 -18
  71. package/jsdoc.json +1 -1
  72. package/package.json +11 -11
  73. package/protobuf.png +0 -0
  74. package/scripts/build.js +53 -58
  75. package/src/ProtoBuf/Builder/Message.js +18 -9
  76. package/src/ProtoBuf/Builder/Service.js +3 -0
  77. package/src/ProtoBuf/Builder.js +34 -10
  78. package/src/ProtoBuf/DotProto/Parser.js +58 -23
  79. package/src/ProtoBuf/Reflect/Element.js +17 -4
  80. package/src/ProtoBuf/Reflect/Message/Field.js +6 -5
  81. package/src/ProtoBuf/Reflect/Message.js +9 -4
  82. package/src/ProtoBuf/Util.js +116 -116
  83. package/src/bower.json +2 -2
  84. package/src/google/protobuf/descriptor.json +55 -15
  85. package/src/{ProtoBuf.js → protobuf.js} +0 -0
  86. package/src/wrap.js +4 -4
  87. package/tests/bench.txt +373 -373
  88. package/tests/complex.json +8 -1
  89. package/tests/custom-options.json +169 -169
  90. package/tests/extend.json +71 -71
  91. package/tests/imports-weak.proto +7 -0
  92. package/tests/imports.json +83 -83
  93. package/tests/nodeunit-browser/nodeunit.css +70 -70
  94. package/tests/nodeunit-browser/nodeunit.js +2108 -2108
  95. package/tests/options.json +32 -32
  96. package/tests/proto2js/Bar.json +46 -46
  97. package/tests/suite.js +107 -82
  98. package/ProtoBuf.png +0 -0
  99. package/dist/ProtoBuf-light.min.js +0 -87
  100. package/dist/ProtoBuf-light.min.js.gz +0 -0
  101. package/dist/ProtoBuf-light.min.map +0 -8
  102. package/dist/ProtoBuf.min.js +0 -108
  103. package/dist/ProtoBuf.min.js.gz +0 -0
  104. package/dist/ProtoBuf.min.map +0 -8
  105. package/externs/ByteBuffer.js +0 -767
  106. package/externs/Long.js +0 -328
  107. package/sandbox/gapi/googleapis/google/api/annotations.proto +0 -29
  108. package/sandbox/gapi/googleapis/google/api/http.proto +0 -245
  109. package/sandbox/gapi/googleapis/google/datastore/v1beta3/datastore.proto +0 -281
  110. package/sandbox/gapi/googleapis/google/datastore/v1beta3/entity.proto +0 -189
  111. package/sandbox/gapi/googleapis/google/datastore/v1beta3/query.proto +0 -281
  112. package/sandbox/gapi/googleapis/google/longrunning/operations.proto +0 -144
  113. package/sandbox/gapi/googleapis/google/protobuf/any.proto +0 -98
  114. package/sandbox/gapi/googleapis/google/protobuf/any_test.proto +0 -41
  115. package/sandbox/gapi/googleapis/google/protobuf/api.proto +0 -201
  116. package/sandbox/gapi/googleapis/google/protobuf/descriptor.proto +0 -773
  117. package/sandbox/gapi/googleapis/google/protobuf/duration.proto +0 -95
  118. package/sandbox/gapi/googleapis/google/protobuf/empty.proto +0 -50
  119. package/sandbox/gapi/googleapis/google/protobuf/field_mask.proto +0 -167
  120. package/sandbox/gapi/googleapis/google/protobuf/map_lite_unittest.proto +0 -130
  121. package/sandbox/gapi/googleapis/google/protobuf/map_proto2_unittest.proto +0 -60
  122. package/sandbox/gapi/googleapis/google/protobuf/map_unittest.proto +0 -129
  123. package/sandbox/gapi/googleapis/google/protobuf/map_unittest_proto3.proto +0 -120
  124. package/sandbox/gapi/googleapis/google/protobuf/source_context.proto +0 -47
  125. package/sandbox/gapi/googleapis/google/protobuf/struct.proto +0 -94
  126. package/sandbox/gapi/googleapis/google/protobuf/timestamp.proto +0 -107
  127. package/sandbox/gapi/googleapis/google/protobuf/type.proto +0 -176
  128. package/sandbox/gapi/googleapis/google/protobuf/unittest.proto +0 -878
  129. package/sandbox/gapi/googleapis/google/protobuf/unittest_arena.proto +0 -46
  130. package/sandbox/gapi/googleapis/google/protobuf/unittest_custom_options.proto +0 -394
  131. package/sandbox/gapi/googleapis/google/protobuf/unittest_drop_unknown_fields.proto +0 -58
  132. package/sandbox/gapi/googleapis/google/protobuf/unittest_embed_optimize_for.proto +0 -51
  133. package/sandbox/gapi/googleapis/google/protobuf/unittest_empty.proto +0 -38
  134. package/sandbox/gapi/googleapis/google/protobuf/unittest_enormous_descriptor.proto +0 -1048
  135. package/sandbox/gapi/googleapis/google/protobuf/unittest_import.proto +0 -66
  136. package/sandbox/gapi/googleapis/google/protobuf/unittest_import_lite.proto +0 -52
  137. package/sandbox/gapi/googleapis/google/protobuf/unittest_import_proto3.proto +0 -68
  138. package/sandbox/gapi/googleapis/google/protobuf/unittest_import_public.proto +0 -41
  139. package/sandbox/gapi/googleapis/google/protobuf/unittest_import_public_lite.proto +0 -43
  140. package/sandbox/gapi/googleapis/google/protobuf/unittest_import_public_proto3.proto +0 -42
  141. package/sandbox/gapi/googleapis/google/protobuf/unittest_lite.proto +0 -385
  142. package/sandbox/gapi/googleapis/google/protobuf/unittest_lite_imports_nonlite.proto +0 -44
  143. package/sandbox/gapi/googleapis/google/protobuf/unittest_mset.proto +0 -82
  144. package/sandbox/gapi/googleapis/google/protobuf/unittest_mset_wire_format.proto +0 -52
  145. package/sandbox/gapi/googleapis/google/protobuf/unittest_no_arena.proto +0 -202
  146. package/sandbox/gapi/googleapis/google/protobuf/unittest_no_arena_import.proto +0 -37
  147. package/sandbox/gapi/googleapis/google/protobuf/unittest_no_arena_lite.proto +0 -42
  148. package/sandbox/gapi/googleapis/google/protobuf/unittest_no_field_presence.proto +0 -138
  149. package/sandbox/gapi/googleapis/google/protobuf/unittest_no_generic_services.proto +0 -54
  150. package/sandbox/gapi/googleapis/google/protobuf/unittest_optimize_for.proto +0 -67
  151. package/sandbox/gapi/googleapis/google/protobuf/unittest_preserve_unknown_enum.proto +0 -71
  152. package/sandbox/gapi/googleapis/google/protobuf/unittest_preserve_unknown_enum2.proto +0 -50
  153. package/sandbox/gapi/googleapis/google/protobuf/unittest_proto3.proto +0 -388
  154. package/sandbox/gapi/googleapis/google/protobuf/unittest_proto3_arena.proto +0 -206
  155. package/sandbox/gapi/googleapis/google/protobuf/unittest_well_known_types.proto +0 -112
  156. package/sandbox/gapi/googleapis/google/protobuf/unknown_enum_test.proto +0 -62
  157. package/sandbox/gapi/googleapis/google/protobuf/wrappers.proto +0 -117
  158. package/sandbox/gapi/googleapis/google/rpc/code.proto +0 -190
  159. package/sandbox/gapi/googleapis/google/rpc/error_details.proto +0 -157
  160. package/sandbox/gapi/googleapis/google/rpc/status.proto +0 -90
  161. package/sandbox/gapi/googleapis/google/type/color.proto +0 -163
  162. package/sandbox/gapi/googleapis/google/type/date.proto +0 -43
  163. package/sandbox/gapi/googleapis/google/type/dayofweek.proto +0 -50
  164. package/sandbox/gapi/googleapis/google/type/latlng.proto +0 -36
  165. package/sandbox/gapi/googleapis/google/type/money.proto +0 -40
  166. package/sandbox/gapi/googleapis/google/type/timeofday.proto +0 -42
  167. package/sandbox/gapi/test.js +0 -17
  168. package/sandbox/gapi/test.proto +0 -12
  169. package/sandbox/issue146/MyOptions.proto +0 -28
  170. package/sandbox/issue146/Sample.proto +0 -21
  171. package/sandbox/issue146/main.js +0 -3
  172. package/sandbox/issue147/enum.proto +0 -8
  173. package/sandbox/issue147/main.js +0 -3
  174. package/sandbox/issue182/commands.proto +0 -10
  175. package/sandbox/issue182/execute.js +0 -22
  176. package/sandbox/issue182/session_commands.proto +0 -14
  177. package/sandbox/issue289/A.proto +0 -8
  178. package/sandbox/issue289/B.proto +0 -8
  179. package/sandbox/issue289/common.proto +0 -5
  180. package/sandbox/issue289/main.js +0 -7
  181. package/sandbox/issue300/IAuth.proto +0 -14
  182. package/sandbox/issue300/Request.proto +0 -14
  183. package/sandbox/issue300/main.js +0 -26
  184. package/sandbox/issue42/innerextend.proto +0 -18
  185. package/sandbox/issue42/main.js +0 -8
  186. package/sandbox/issue42/outerextend.proto +0 -17
  187. package/tests/gtfs-realtime.proto +0 -552
  188. package/webpack.config.js +0 -9
@@ -1,281 +0,0 @@
1
- // Copyright (c) 2015, Google Inc.
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
-
15
- syntax = "proto3";
16
-
17
- package google.datastore.v1beta3;
18
-
19
- import "google/api/annotations.proto";
20
- import "google/datastore/v1beta3/entity.proto";
21
- import "google/datastore/v1beta3/query.proto";
22
-
23
- option java_multiple_files = true;
24
- option java_outer_classname = "DatastoreProto";
25
- option java_package = "com.google.datastore.v1beta3";
26
-
27
-
28
- // Each RPC normalizes the partition IDs of the keys in its input entities,
29
- // and always returns entities with keys with normalized partition IDs.
30
- // This applies to all keys and entities, including those in values.
31
- //
32
- service Datastore {
33
- // Look up entities by key.
34
- rpc Lookup(LookupRequest) returns (LookupResponse) {
35
- option (google.api.http) = { post: "/v1beta3/projects/{project_id}:lookup" body: "*" };
36
- }
37
-
38
- // Query for entities.
39
- rpc RunQuery(RunQueryRequest) returns (RunQueryResponse) {
40
- option (google.api.http) = { post: "/v1beta3/projects/{project_id}:runQuery" body: "*" };
41
- }
42
-
43
- // Begin a new transaction.
44
- rpc BeginTransaction(BeginTransactionRequest) returns (BeginTransactionResponse) {
45
- option (google.api.http) = { post: "/v1beta3/projects/{project_id}:beginTransaction" body: "*" };
46
- }
47
-
48
- // Commit a transaction, optionally creating, deleting or modifying some
49
- // entities.
50
- rpc Commit(CommitRequest) returns (CommitResponse) {
51
- option (google.api.http) = { post: "/v1beta3/projects/{project_id}:commit" body: "*" };
52
- }
53
-
54
- // Roll back a transaction.
55
- rpc Rollback(RollbackRequest) returns (RollbackResponse) {
56
- option (google.api.http) = { post: "/v1beta3/projects/{project_id}:rollback" body: "*" };
57
- }
58
-
59
- // Allocate IDs for the given keys (useful for referencing an entity before
60
- // it is inserted).
61
- rpc AllocateIds(AllocateIdsRequest) returns (AllocateIdsResponse) {
62
- option (google.api.http) = { post: "/v1beta3/projects/{project_id}:allocateIds" body: "*" };
63
- }
64
- }
65
-
66
- // The request for [google.datastore.v1beta3.Datastore.Lookup][google.datastore.v1beta3.Datastore.Lookup].
67
- message LookupRequest {
68
- // Project ID against which to make the request. Not required if the request
69
- // is made over HTTP.
70
- string project_id = 8;
71
-
72
- // Options for this lookup request.
73
- ReadOptions read_options = 1;
74
-
75
- // Keys of entities to look up.
76
- repeated Key keys = 3;
77
- }
78
-
79
- // The response for [google.datastore.v1beta3.Datastore.Lookup][google.datastore.v1beta3.Datastore.Lookup].
80
- message LookupResponse {
81
- // Entities found as `ResultType.FULL` entities. The order of results in this
82
- // field is undefined and has no relation to the order of the keys in the
83
- // input.
84
- repeated EntityResult found = 1;
85
-
86
- // Entities not found as `ResultType.KEY_ONLY` entities. The order of results
87
- // in this field is undefined and has no relation to the order of the keys
88
- // in the input.
89
- repeated EntityResult missing = 2;
90
-
91
- // A list of keys that were not looked up due to resource constraints. The
92
- // order of results in this field is undefined and has no relation to the
93
- // order of the keys in the input.
94
- repeated Key deferred = 3;
95
- }
96
-
97
- // The request for [google.datastore.v1beta3.Datastore.RunQuery][google.datastore.v1beta3.Datastore.RunQuery].
98
- message RunQueryRequest {
99
- // Project ID against which to make the request. Not required if the request
100
- // is made over HTTP.
101
- string project_id = 8;
102
-
103
- // Entities are partitioned into subsets, identified by a partition ID.
104
- // Queries are scoped to a single partition.
105
- // This partition ID is normalized with the standard default context
106
- // partition ID, but all other partition IDs in `RunQueryRequest` are
107
- // normalized with this partition ID as the context partition ID.
108
- PartitionId partition_id = 2;
109
-
110
- // The options for this query.
111
- ReadOptions read_options = 1;
112
-
113
- // The type of query.
114
- oneof query_type {
115
- // The query to run.
116
- Query query = 3;
117
-
118
- // The GQL query to run.
119
- GqlQuery gql_query = 7;
120
- }
121
- }
122
-
123
- // The response for [google.datastore.v1beta3.Datastore.RunQuery][google.datastore.v1beta3.Datastore.RunQuery].
124
- message RunQueryResponse {
125
- // A batch of query results (always present).
126
- QueryResultBatch batch = 1;
127
-
128
- // The parsed form of the `GqlQuery` from the request, if it was set.
129
- Query query = 2;
130
- }
131
-
132
- // The request for [google.datastore.v1beta3.Datastore.BeginTransaction][google.datastore.v1beta3.Datastore.BeginTransaction].
133
- message BeginTransactionRequest {
134
- // Project ID against which to make the request. Not required if the request
135
- // is made over HTTP.
136
- string project_id = 8;
137
- }
138
-
139
- // The response for [google.datastore.v1beta3.Datastore.BeginTransaction][google.datastore.v1beta3.Datastore.BeginTransaction].
140
- message BeginTransactionResponse {
141
- // The transaction identifier (always present).
142
- bytes transaction = 1;
143
- }
144
-
145
- // The request for [google.datastore.v1beta3.Datastore.Rollback][google.datastore.v1beta3.Datastore.Rollback].
146
- message RollbackRequest {
147
- // Project ID against which to make the request. Not required if the request
148
- // is made over HTTP.
149
- string project_id = 8;
150
-
151
- // The transaction identifier, returned by a call to
152
- // [google.datastore.v1beta3.Datastore.BeginTransaction][google.datastore.v1beta3.Datastore.BeginTransaction].
153
- bytes transaction = 1;
154
- }
155
-
156
- // The response for [google.datastore.v1beta3.Datastore.Rollback][google.datastore.v1beta3.Datastore.Rollback]
157
- // (an empty message).
158
- message RollbackResponse {
159
-
160
- }
161
-
162
- // The request for [google.datastore.v1beta3.Datastore.Commit][google.datastore.v1beta3.Datastore.Commit].
163
- message CommitRequest {
164
- // Commit modes.
165
- enum Mode {
166
- // Unspecified.
167
- MODE_UNSPECIFIED = 0;
168
-
169
- // Transactional.
170
- TRANSACTIONAL = 1;
171
-
172
- // Non-transactional.
173
- NON_TRANSACTIONAL = 2;
174
- }
175
-
176
- // Project ID against which to make the request. Not required if the request
177
- // is made over HTTP.
178
- string project_id = 8;
179
-
180
- // The type of commit to perform. Defaults to `TRANSACTIONAL`.
181
- Mode mode = 5;
182
-
183
- // The transaction identifier, returned by a call to
184
- // [google.datastore.v1beta3.Datastore.BeginTransaction][google.datastore.v1beta3.Datastore.BeginTransaction].
185
- // Must be set when mode is `TRANSACTIONAL`.
186
- bytes transaction = 1;
187
-
188
- // The mutations to perform.
189
- repeated Mutation mutations = 6;
190
- }
191
-
192
- // The response for [google.datastore.v1beta3.Datastore.Commit][google.datastore.v1beta3.Datastore.Commit].
193
- message CommitResponse {
194
- // The result of performing the mutations.
195
- // The i-th mutation result corresponds to the i-th mutation in the request.
196
- repeated MutationResult mutation_results = 3;
197
-
198
- // The number of index entries updated during the commit.
199
- int32 index_updates = 4;
200
- }
201
-
202
- // The request for [google.datastore.v1beta3.Datastore.AllocateIds][google.datastore.v1beta3.Datastore.AllocateIds].
203
- message AllocateIdsRequest {
204
- // Project ID against which to make the request. Not required if the request
205
- // is made over HTTP.
206
- string project_id = 8;
207
-
208
- // A list of keys with incomplete key paths for which to allocate IDs.
209
- // No key may be reserved/read-only.
210
- repeated Key keys = 1;
211
- }
212
-
213
- // The response for [google.datastore.v1beta3.Datastore.AllocateIds][google.datastore.v1beta3.Datastore.AllocateIds].
214
- message AllocateIdsResponse {
215
- // The keys specified in the request (in the same order), each with
216
- // its key path completed with a newly allocated ID.
217
- repeated Key keys = 1;
218
- }
219
-
220
- // A mutation to apply to an entity.
221
- message Mutation {
222
- // The mutation operation.
223
- //
224
- // For `insert`, `update`, and `upsert`:
225
- // - The entity's key must not be reserved/read-only.
226
- // - No property in the entity may have a reserved name,
227
- // not even a property in an entity in a value.
228
- // - No value in the entity may have meaning 18,
229
- // not even a value in an entity in another value.
230
- oneof operation {
231
- // The entity to insert. The entity must not already exist.
232
- // The entity's key's final path element may be incomplete.
233
- Entity insert = 4;
234
-
235
- // The entity to update. The entity must already exist.
236
- // Must have a complete key path.
237
- Entity update = 5;
238
-
239
- // The entity to upsert. The entity may or may not already exist.
240
- // The entity's key's final path element may be incomplete.
241
- Entity upsert = 6;
242
-
243
- // The key of the entity to delete. The entity may or may not already exist.
244
- // Must have a complete key path and must not be reserved/read-only.
245
- Key delete = 7;
246
- }
247
- }
248
-
249
- // The result of applying a mutation.
250
- message MutationResult {
251
- // The automatically allocated key.
252
- // Set only when the mutation allocated a key.
253
- Key key = 3;
254
- }
255
-
256
- // Options shared by read requests.
257
- message ReadOptions {
258
- // Read consistencies.
259
- enum ReadConsistency {
260
- // Unspecified.
261
- READ_CONSISTENCY_UNSPECIFIED = 0;
262
-
263
- // Strong consistency.
264
- STRONG = 1;
265
-
266
- // Eventual consistency.
267
- EVENTUAL = 2;
268
- }
269
-
270
- // If not specified, lookups and ancestor queries default to
271
- // `read_consistency`=`STRONG`, global queries default to
272
- // `read_consistency`=`EVENTUAL`.
273
- oneof consistency_type {
274
- // The non-transactional read consistency to use.
275
- // Cannot be set to `STRONG` for global queries.
276
- ReadConsistency read_consistency = 1;
277
-
278
- // The transaction identifier to use.
279
- bytes transaction = 2;
280
- }
281
- }
@@ -1,189 +0,0 @@
1
- // Copyright (c) 2015, Google Inc.
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
-
15
- syntax = "proto3";
16
-
17
- package google.datastore.v1beta3;
18
-
19
- import "google/api/annotations.proto";
20
- import "google/protobuf/struct.proto";
21
- import "google/protobuf/timestamp.proto";
22
- import "google/type/latlng.proto";
23
-
24
- option java_multiple_files = true;
25
- option java_outer_classname = "EntityProto";
26
- option java_package = "com.google.datastore.v1beta3";
27
-
28
-
29
- // A partition ID identifies a grouping of entities. The grouping is always
30
- // by project and namespace, however the namespace ID may be empty.
31
- //
32
- // A partition ID contains several dimensions:
33
- // project ID and namespace ID.
34
- // 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}`
38
- // If the value of any dimension matches regex `__.*__`, the partition is
39
- // reserved/read-only.
40
- // A reserved/read-only partition ID is forbidden in certain documented
41
- // contexts.
42
- message PartitionId {
43
- // Project ID.
44
- string project_id = 2;
45
-
46
- // Namespace ID.
47
- string namespace_id = 4;
48
- }
49
-
50
- // A unique identifier for an entity.
51
- // If a key's partition id or any of its path kinds or names are
52
- // reserved/read-only, the key is reserved/read-only.
53
- // A reserved/read-only key is forbidden in certain documented contexts.
54
- message Key {
55
- // A (kind, ID/name) pair used to construct a key path.
56
- //
57
- // If either name nor ID is set, the element is complete.
58
- // If neither is set, the element is incomplete.
59
- message PathElement {
60
- // The kind of the entity.
61
- // A kind matching regex `__.*__` is reserved/read-only.
62
- // A kind must not contain more than 1500 bytes when UTF-8 encoded.
63
- // Cannot be `""`.
64
- string kind = 1;
65
-
66
- // The type of id.
67
- oneof id_type {
68
- // The auto allocated ID of the entity.
69
- // Never equal to zero. Values less than zero are discouraged and may not
70
- // be supported in the future.
71
- int64 id = 2;
72
-
73
- // The name of the entity.
74
- // A name matching regex `__.*__` is reserved/read-only.
75
- // A name must not be more than 1500 bytes when UTF-8 encoded.
76
- // Cannot be `""`.
77
- string name = 3;
78
- }
79
- }
80
-
81
- // Entities are partitioned into subsets, currently identified by a dataset
82
- // (usually implicitly specified by the project) and namespace ID.
83
- // Queries are scoped to a single partition.
84
- PartitionId partition_id = 1;
85
-
86
- // The entity path.
87
- // An entity path consists of one or more elements composed of a kind and a
88
- // string or numerical identifier, which identify entities. The first
89
- // element identifies a _root entity_, the second element identifies
90
- // a _child_ of the root entity, the third element a child of the
91
- // second entity, and so forth. The entities identified by all prefixes of
92
- // the path are called the element's _ancestors_.
93
- // An entity path is always fully complete: *all* of the entity's ancestors
94
- // are required to be in the path along with the entity identifier itself.
95
- // The only exception is that in some documented cases, the identifier in the
96
- // last path element (for the entity) itself may be omitted. A path can never
97
- // be empty. The path can have at most 100 elements.
98
- repeated PathElement path = 2;
99
- }
100
-
101
- // An array value.
102
- message ArrayValue {
103
- // Values in the array.
104
- repeated Value values = 1;
105
- }
106
-
107
- // A message that can hold any of the supported value types and associated
108
- // metadata.
109
- message Value {
110
- // Must have a value set.
111
- oneof value_type {
112
- // A null value.
113
- google.protobuf.NullValue null_value = 11;
114
-
115
- // A boolean value.
116
- bool boolean_value = 1;
117
-
118
- // An integer value.
119
- int64 integer_value = 2;
120
-
121
- // A double value.
122
- double double_value = 3;
123
-
124
- // A timestamp value.
125
- // When stored in the Datastore, precise only to microseconds;
126
- // any additional precision is rounded down.
127
- google.protobuf.Timestamp timestamp_value = 10;
128
-
129
- // A key value.
130
- Key key_value = 5;
131
-
132
- // A UTF-8 encoded string value.
133
- // When `exclude_from_indexes` is false (it is indexed) and meaning is not
134
- // 2, may have at most 1500 bytes.
135
- // When meaning is 2, may have at most 2083 bytes.
136
- // Otherwise, may be set to at least 1,000,000 bytes
137
- string string_value = 17;
138
-
139
- // A blob value.
140
- // May have at most 1,000,000 bytes.
141
- // When `exclude_from_indexes` is false, may have at most 1500 bytes.
142
- bytes blob_value = 18;
143
-
144
- // A geo point value representing a point on the surface of Earth.
145
- google.type.LatLng geo_point_value = 8;
146
-
147
- // An entity value.
148
- // May have no key.
149
- // May have a key with an incomplete key path.
150
- // May have a reserved/read-only key.
151
- Entity entity_value = 6;
152
-
153
- // An array value.
154
- // Cannot contain another array value.
155
- // A `Value` instance that sets field `array_value` must not set fields
156
- // `meaning` or `exclude_from_indexes`.
157
- ArrayValue array_value = 9;
158
- }
159
-
160
- // The `meaning` field should only be populated for backwards compatibility.
161
- int32 meaning = 14;
162
-
163
- // If the value should be excluded from all indexes including those defined
164
- // explicitly.
165
- bool exclude_from_indexes = 19;
166
- }
167
-
168
- // An entity.
169
- //
170
- // An entity is limited to 1 megabyte when stored. That _roughly_
171
- // corresponds to a limit of 1 megabyte for the serialized form of this
172
- // message.
173
- message Entity {
174
- // The entity's key.
175
- //
176
- // An entity must have a key, unless otherwise documented (for example,
177
- // an entity in `Value.entity_value` may have no key).
178
- // An entity's kind is its key's path's last element's kind,
179
- // or null if it has no key.
180
- Key key = 1;
181
-
182
- // The entity's properties.
183
- // The map's keys are property names.
184
- // A property name matching regex `__.*__` is reserved.
185
- // A reserved property name is forbidden in certain documented contexts.
186
- // The name must not contain more than 500 characters.
187
- // The name cannot be `""`.
188
- map<string, Value> properties = 3;
189
- }