@restorecommerce/protos 0.4.5

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 (61) hide show
  1. package/CHANGELOG.md +214 -0
  2. package/LICENSE +19 -0
  3. package/README.md +9 -0
  4. package/google/protobuf/any.proto +133 -0
  5. package/google/protobuf/descriptor.proto +805 -0
  6. package/google/protobuf/empty.proto +53 -0
  7. package/google/protobuf/struct.proto +96 -0
  8. package/google/protobuf/wrappers.proto +123 -0
  9. package/grpc/health/v1/health.proto +50 -0
  10. package/grpc/reflection/v1alpha/reflection.proto +154 -0
  11. package/io/restorecommerce/access_control.proto +48 -0
  12. package/io/restorecommerce/address.proto +65 -0
  13. package/io/restorecommerce/attribute.proto +13 -0
  14. package/io/restorecommerce/auth.proto +48 -0
  15. package/io/restorecommerce/authentication_log.proto +56 -0
  16. package/io/restorecommerce/command.proto +57 -0
  17. package/io/restorecommerce/commandinterface.proto +30 -0
  18. package/io/restorecommerce/contact_point.proto +49 -0
  19. package/io/restorecommerce/contact_point_type.proto +46 -0
  20. package/io/restorecommerce/country.proto +49 -0
  21. package/io/restorecommerce/credential.proto +51 -0
  22. package/io/restorecommerce/customer.proto +63 -0
  23. package/io/restorecommerce/filter.proto +38 -0
  24. package/io/restorecommerce/fulfillment.proto +199 -0
  25. package/io/restorecommerce/fulfillment_courier.proto +54 -0
  26. package/io/restorecommerce/fulfillment_product.proto +49 -0
  27. package/io/restorecommerce/graph.proto +76 -0
  28. package/io/restorecommerce/image.proto +24 -0
  29. package/io/restorecommerce/invoice.proto +121 -0
  30. package/io/restorecommerce/job.proto +173 -0
  31. package/io/restorecommerce/locale.proto +47 -0
  32. package/io/restorecommerce/location.proto +53 -0
  33. package/io/restorecommerce/manufacturer.proto +45 -0
  34. package/io/restorecommerce/meta.proto +15 -0
  35. package/io/restorecommerce/notification.proto +52 -0
  36. package/io/restorecommerce/notification_channel.proto +50 -0
  37. package/io/restorecommerce/notification_req.proto +49 -0
  38. package/io/restorecommerce/order.proto +121 -0
  39. package/io/restorecommerce/organization.proto +63 -0
  40. package/io/restorecommerce/ostorage.proto +154 -0
  41. package/io/restorecommerce/payment.proto +115 -0
  42. package/io/restorecommerce/payment_method.proto +60 -0
  43. package/io/restorecommerce/policy.proto +59 -0
  44. package/io/restorecommerce/policy_set.proto +53 -0
  45. package/io/restorecommerce/price_group.proto +45 -0
  46. package/io/restorecommerce/product.proto +101 -0
  47. package/io/restorecommerce/product_category.proto +53 -0
  48. package/io/restorecommerce/product_prototype.proto +47 -0
  49. package/io/restorecommerce/rendering.proto +34 -0
  50. package/io/restorecommerce/resource_base.proto +137 -0
  51. package/io/restorecommerce/role.proto +45 -0
  52. package/io/restorecommerce/rule.proto +86 -0
  53. package/io/restorecommerce/search.proto +21 -0
  54. package/io/restorecommerce/status.proto +26 -0
  55. package/io/restorecommerce/tax.proto +49 -0
  56. package/io/restorecommerce/tax_type.proto +47 -0
  57. package/io/restorecommerce/timezone.proto +46 -0
  58. package/io/restorecommerce/token.proto +36 -0
  59. package/io/restorecommerce/user.proto +258 -0
  60. package/package.json +19 -0
  61. package/test/test.proto +71 -0
@@ -0,0 +1,805 @@
1
+ /// Protocol Buffers - Google's data interchange format
2
+ /// Copyright 2008 Google Inc. All rights reserved.
3
+ /// https://developers.google.com/protocol-buffers/
4
+ ///
5
+ /// Redistribution and use in source and binary forms, with or without
6
+ /// modification, are permitted provided that the following conditions are
7
+ /// met:
8
+ ///
9
+ /// * Redistributions of source code must retain the above copyright
10
+ /// notice, this list of conditions and the following disclaimer.
11
+ /// * Redistributions in binary form must reproduce the above
12
+ /// copyright notice, this list of conditions and the following disclaimer
13
+ /// in the documentation and/or other materials provided with the
14
+ /// distribution.
15
+ /// * Neither the name of Google Inc. nor the names of its
16
+ /// contributors may be used to endorse or promote products derived from
17
+ /// this software without specific prior written permission.
18
+ ///
19
+ /// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20
+ /// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21
+ /// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22
+ /// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23
+ /// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24
+ /// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25
+ /// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26
+ /// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27
+ /// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28
+ /// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
+ /// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
+
31
+ /// Author: kenton@google.com (Kenton Varda)
32
+ /// Based on original Protocol Buffers design by
33
+ /// Sanjay Ghemawat, Jeff Dean, and others.
34
+ ///
35
+ /// The messages in this file describe the definitions found in .proto files.
36
+ /// A valid .proto file can be translated directly to a FileDescriptorProto
37
+ /// without any other information (e.g. without reading its imports).
38
+
39
+
40
+ syntax = "proto2";
41
+
42
+ package google.protobuf;
43
+ option go_package = "descriptor";
44
+ option java_package = "com.google.protobuf";
45
+ option java_outer_classname = "DescriptorProtos";
46
+ option csharp_namespace = "Google.Protobuf.Reflection";
47
+ option objc_class_prefix = "GPB";
48
+
49
+ /** descriptor.proto must be optimized for speed because reflection-based
50
+ * algorithms don't work during bootstrapping.
51
+ */
52
+ option optimize_for = SPEED;
53
+
54
+ /* The protocol compiler can output a FileDescriptorSet containing the .proto
55
+ * files it parses.
56
+ */
57
+ message FileDescriptorSet {
58
+ repeated FileDescriptorProto file = 1;
59
+ }
60
+
61
+ /// Describes a complete .proto file.
62
+ message FileDescriptorProto {
63
+ optional string name = 1; /// file name, relative to root of source tree
64
+ optional string package = 2; /// e.g. "foo", "foo.bar", etc.
65
+
66
+ /// Names of files imported by this file.
67
+ repeated string dependency = 3;
68
+ /// Indexes of the public imported files in the dependency list above.
69
+ repeated int32 public_dependency = 10;
70
+ /// Indexes of the weak imported files in the dependency list.
71
+ /// For Google-internal migration only. Do not use.
72
+ repeated int32 weak_dependency = 11;
73
+
74
+ /// All top-level definitions in this file.
75
+ repeated DescriptorProto message_type = 4;
76
+ repeated EnumDescriptorProto enum_type = 5;
77
+ repeated ServiceDescriptorProto service = 6;
78
+ repeated FieldDescriptorProto extension = 7;
79
+
80
+ optional FileOptions options = 8;
81
+
82
+ /// This field contains optional information about the original source code.
83
+ /// You may safely remove this entire field without harming runtime
84
+ /// functionality of the descriptors -- the information is needed only by
85
+ /// development tools.
86
+ optional SourceCodeInfo source_code_info = 9;
87
+
88
+ /// The syntax of the proto file.
89
+ /// The supported values are "proto2" and "proto3".
90
+ optional string syntax = 12;
91
+ }
92
+
93
+ /// Describes a message type.
94
+ message DescriptorProto {
95
+ optional string name = 1;
96
+
97
+ repeated FieldDescriptorProto field = 2;
98
+ repeated FieldDescriptorProto extension = 6;
99
+
100
+ repeated DescriptorProto nested_type = 3;
101
+ repeated EnumDescriptorProto enum_type = 4;
102
+
103
+ message ExtensionRange {
104
+ optional int32 start = 1;
105
+ optional int32 end = 2;
106
+ }
107
+ repeated ExtensionRange extension_range = 5;
108
+
109
+ repeated OneofDescriptorProto oneof_decl = 8;
110
+
111
+ optional MessageOptions options = 7;
112
+
113
+ /// Range of reserved tag numbers. Reserved tag numbers may not be used by
114
+ /// fields or extension ranges in the same message. Reserved ranges may
115
+ /// not overlap.
116
+ message ReservedRange {
117
+ optional int32 start = 1; /// Inclusive.
118
+ optional int32 end = 2; /// Exclusive.
119
+ }
120
+ repeated ReservedRange reserved_range = 9;
121
+ /// Reserved field names, which may not be used by fields in the same message.
122
+ /// A given name may only be reserved once.
123
+ repeated string reserved_name = 10;
124
+ }
125
+
126
+ /// Describes a field within a message.
127
+ message FieldDescriptorProto {
128
+ enum Type {
129
+ /// 0 is reserved for errors.
130
+ /// Order is weird for historical reasons.
131
+ TYPE_DOUBLE = 1;
132
+ TYPE_FLOAT = 2;
133
+ /// Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if
134
+ /// negative values are likely.
135
+ TYPE_INT64 = 3;
136
+ TYPE_UINT64 = 4;
137
+ /// Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if
138
+ /// negative values are likely.
139
+ TYPE_INT32 = 5;
140
+ TYPE_FIXED64 = 6;
141
+ TYPE_FIXED32 = 7;
142
+ TYPE_BOOL = 8;
143
+ TYPE_STRING = 9;
144
+ TYPE_GROUP = 10; /// Tag-delimited aggregate.
145
+ TYPE_MESSAGE = 11; /// Length-delimited aggregate.
146
+
147
+ /// New in version 2.
148
+ TYPE_BYTES = 12;
149
+ TYPE_UINT32 = 13;
150
+ TYPE_ENUM = 14;
151
+ TYPE_SFIXED32 = 15;
152
+ TYPE_SFIXED64 = 16;
153
+ TYPE_SINT32 = 17; /// Uses ZigZag encoding.
154
+ TYPE_SINT64 = 18; /// Uses ZigZag encoding.
155
+ };
156
+
157
+ enum Label {
158
+ /// 0 is reserved for errors
159
+ LABEL_OPTIONAL = 1;
160
+ LABEL_REQUIRED = 2;
161
+ LABEL_REPEATED = 3;
162
+ /// TODO(sanjay): Should we add LABEL_MAP?
163
+ };
164
+
165
+ optional string name = 1;
166
+ optional int32 number = 3;
167
+ optional Label label = 4;
168
+
169
+ /// If type_name is set, this need not be set. If both this and type_name
170
+ /// are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
171
+ optional Type type = 5;
172
+
173
+ /// For message and enum types, this is the name of the type. If the name
174
+ /// starts with a '.', it is fully-qualified. Otherwise, C++-like scoping
175
+ /// rules are used to find the type (i.e. first the nested types within this
176
+ /// message are searched, then within the parent, on up to the root
177
+ /// namespace).
178
+ optional string type_name = 6;
179
+
180
+ /// For extensions, this is the name of the type being extended. It is
181
+ /// resolved in the same manner as type_name.
182
+ optional string extendee = 2;
183
+
184
+ /// For numeric types, contains the original text representation of the value.
185
+ /// For booleans, "true" or "false".
186
+ /// For strings, contains the default text contents (not escaped in any way).
187
+ /// For bytes, contains the C escaped value. All bytes >= 128 are escaped.
188
+ /// TODO(kenton): Base-64 encode?
189
+ optional string default_value = 7;
190
+
191
+ /// If set, gives the index of a oneof in the containing type's oneof_decl
192
+ /// list. This field is a member of that oneof.
193
+ optional int32 oneof_index = 9;
194
+
195
+ /// JSON name of this field. The value is set by protocol compiler. If the
196
+ /// user has set a "json_name" option on this field, that option's value
197
+ /// will be used. Otherwise, it's deduced from the field's name by converting
198
+ /// it to camelCase.
199
+ optional string json_name = 10;
200
+
201
+ optional FieldOptions options = 8;
202
+ }
203
+
204
+ /// Describes a oneof.
205
+ message OneofDescriptorProto {
206
+ optional string name = 1;
207
+ }
208
+
209
+ /// Describes an enum type.
210
+ message EnumDescriptorProto {
211
+ optional string name = 1;
212
+
213
+ repeated EnumValueDescriptorProto value = 2;
214
+
215
+ optional EnumOptions options = 3;
216
+ }
217
+
218
+ /// Describes a value within an enum.
219
+ message EnumValueDescriptorProto {
220
+ optional string name = 1;
221
+ optional int32 number = 2;
222
+
223
+ optional EnumValueOptions options = 3;
224
+ }
225
+
226
+ /// Describes a service.
227
+ message ServiceDescriptorProto {
228
+ optional string name = 1;
229
+ repeated MethodDescriptorProto method = 2;
230
+
231
+ optional ServiceOptions options = 3;
232
+ }
233
+
234
+ /// Describes a method of a service.
235
+ message MethodDescriptorProto {
236
+ optional string name = 1;
237
+
238
+ /// Input and output type names. These are resolved in the same way as
239
+ /// FieldDescriptorProto.type_name, but must refer to a message type.
240
+ optional string input_type = 2;
241
+ optional string output_type = 3;
242
+
243
+ optional MethodOptions options = 4;
244
+
245
+ /// Identifies if client streams multiple client messages
246
+ optional bool client_streaming = 5 [default=false];
247
+ /// Identifies if server streams multiple server messages
248
+ optional bool server_streaming = 6 [default=false];
249
+ }
250
+
251
+
252
+ /// ===================================================================
253
+ /// Options
254
+
255
+ /// Each of the definitions above may have "options" attached. These are
256
+ /// just annotations which may cause code to be generated slightly differently
257
+ /// or may contain hints for code that manipulates protocol messages.
258
+ //
259
+ /// Clients may define custom options as extensions of the *Options messages.
260
+ /// These extensions may not yet be known at parsing time, so the parser cannot
261
+ /// store the values in them. Instead it stores them in a field in the *Options
262
+ /// message called uninterpreted_option. This field must have the same name
263
+ /// across all *Options messages. We then use this field to populate the
264
+ /// extensions when we build a descriptor, at which point all protos have been
265
+ /// parsed and so all extensions are known.
266
+ //
267
+ /// Extension numbers for custom options may be chosen as follows:
268
+ /// * For options which will only be used within a single application or
269
+ /// organization, or for experimental options, use field numbers 50000
270
+ /// through 99999. It is up to you to ensure that you do not use the
271
+ /// same number for multiple options.
272
+ /// * For options which will be published and used publicly by multiple
273
+ /// independent entities, e-mail protobuf-global-extension-registry@google.com
274
+ /// to reserve extension numbers. Simply provide your project name (e.g.
275
+ /// Objective-C plugin) and your project website (if available) -- there's no
276
+ /// need to explain how you intend to use them. Usually you only need one
277
+ /// extension number. You can declare multiple options with only one extension
278
+ /// number by putting them in a sub-message. See the Custom Options section of
279
+ /// the docs for examples:
280
+ /// https://developers.google.com/protocol-buffers/docs/proto#options
281
+ /// If this turns out to be popular, a web service will be set up
282
+ /// to automatically assign option numbers.
283
+
284
+
285
+ message FileOptions {
286
+
287
+ /// Sets the Java package where classes generated from this .proto will be
288
+ /// placed. By default, the proto package is used, but this is often
289
+ /// inappropriate because proto packages do not normally start with backwards
290
+ /// domain names.
291
+ optional string java_package = 1;
292
+
293
+
294
+ /// If set, all the classes from the .proto file are wrapped in a single
295
+ /// outer class with the given name. This applies to both Proto1
296
+ /// (equivalent to the old "--one_java_file" option) and Proto2 (where
297
+ /// a .proto always translates to a single class, but you may want to
298
+ /// explicitly choose the class name).
299
+ optional string java_outer_classname = 8;
300
+
301
+ /// If set true, then the Java code generator will generate a separate .java
302
+ /// file for each top-level message, enum, and service defined in the .proto
303
+ /// file. Thus, these types will *not* be nested inside the outer class
304
+ /// named by java_outer_classname. However, the outer class will still be
305
+ /// generated to contain the file's getDescriptor() method as well as any
306
+ /// top-level extensions defined in the file.
307
+ optional bool java_multiple_files = 10 [default=false];
308
+
309
+ /// If set true, then the Java code generator will generate equals() and
310
+ /// hashCode() methods for all messages defined in the .proto file.
311
+ /// This increases generated code size, potentially substantially for large
312
+ /// protos, which may harm a memory-constrained application.
313
+ /// - In the full runtime this is a speed optimization, as the
314
+ /// AbstractMessage base class includes reflection-based implementations of
315
+ /// these methods.
316
+ /// - In the lite runtime, setting this option changes the semantics of
317
+ /// equals() and hashCode() to more closely match those of the full runtime;
318
+ /// the generated methods compute their results based on field values rather
319
+ /// than object identity. (Implementations should not assume that hashcodes
320
+ /// will be consistent across runtimes or versions of the protocol compiler.)
321
+ optional bool java_generate_equals_and_hash = 20 [default=false];
322
+
323
+ /// If set true, then the Java2 code generator will generate code that
324
+ /// throws an exception whenever an attempt is made to assign a non-UTF-8
325
+ /// byte sequence to a string field.
326
+ /// Message reflection will do the same.
327
+ /// However, an extension field still accepts non-UTF-8 byte sequences.
328
+ /// This option has no effect on when used with the lite runtime.
329
+ optional bool java_string_check_utf8 = 27 [default=false];
330
+
331
+
332
+ /// Generated classes can be optimized for speed or code size.
333
+ enum OptimizeMode {
334
+ SPEED = 1; /// Generate complete code for parsing, serialization,
335
+ /// etc.
336
+ CODE_SIZE = 2; /// Use ReflectionOps to implement these methods.
337
+ LITE_RUNTIME = 3; /// Generate code using MessageLite and the lite runtime.
338
+ }
339
+ optional OptimizeMode optimize_for = 9 [default=SPEED];
340
+
341
+ /// Sets the Go package where structs generated from this .proto will be
342
+ /// placed. If omitted, the Go package will be derived from the following:
343
+ /// - The basename of the package import path, if provided.
344
+ /// - Otherwise, the package statement in the .proto file, if present.
345
+ /// - Otherwise, the basename of the .proto file, without extension.
346
+ optional string go_package = 11;
347
+
348
+
349
+
350
+ /// Should generic services be generated in each language? "Generic" services
351
+ /// are not specific to any particular RPC system. They are generated by the
352
+ /// main code generators in each language (without additional plugins).
353
+ /// Generic services were the only kind of service generation supported by
354
+ /// early versions of google.protobuf.
355
+ //
356
+ /// Generic services are now considered deprecated in favor of using plugins
357
+ /// that generate code specific to your particular RPC system. Therefore,
358
+ /// these default to false. Old code which depends on generic services should
359
+ /// explicitly set them to true.
360
+ optional bool cc_generic_services = 16 [default=false];
361
+ optional bool java_generic_services = 17 [default=false];
362
+ optional bool py_generic_services = 18 [default=false];
363
+
364
+ /// Is this file deprecated?
365
+ /// Depending on the target platform, this can emit Deprecated annotations
366
+ /// for everything in the file, or it will be completely ignored; in the very
367
+ /// least, this is a formalization for deprecating files.
368
+ optional bool deprecated = 23 [default=false];
369
+
370
+ /// Enables the use of arenas for the proto messages in this file. This applies
371
+ /// only to generated classes for C++.
372
+ optional bool cc_enable_arenas = 31 [default=false];
373
+
374
+
375
+ /// Sets the objective c class prefix which is prepended to all objective c
376
+ /// generated classes from this .proto. There is no default.
377
+ optional string objc_class_prefix = 36;
378
+
379
+ /// Namespace for generated classes; defaults to the package.
380
+ optional string csharp_namespace = 37;
381
+
382
+ /// The parser stores options it doesn't recognize here. See above.
383
+ repeated UninterpretedOption uninterpreted_option = 999;
384
+
385
+ /// Clients can define custom options in extensions of this message. See above.
386
+ extensions 1000 to max;
387
+
388
+ reserved 38;
389
+ }
390
+
391
+ message MessageOptions {
392
+ /// Set true to use the old proto1 MessageSet wire format for extensions.
393
+ /// This is provided for backwards-compatibility with the MessageSet wire
394
+ /// format. You should not use this for any other reason: It's less
395
+ /// efficient, has fewer features, and is more complicated.
396
+ //
397
+ /// The message must be defined exactly as follows:
398
+ /// message Foo {
399
+ /// option message_set_wire_format = true;
400
+ /// extensions 4 to max;
401
+ /// }
402
+ /// Note that the message cannot have any defined fields; MessageSets only
403
+ /// have extensions.
404
+ //
405
+ /// All extensions of your type must be singular messages; e.g. they cannot
406
+ /// be int32s, enums, or repeated messages.
407
+ //
408
+ /// Because this is an option, the above two restrictions are not enforced by
409
+ /// the protocol compiler.
410
+ optional bool message_set_wire_format = 1 [default=false];
411
+
412
+ /// Disables the generation of the standard "descriptor()" accessor, which can
413
+ /// conflict with a field of the same name. This is meant to make migration
414
+ /// from proto1 easier; new code should avoid fields named "descriptor".
415
+ optional bool no_standard_descriptor_accessor = 2 [default=false];
416
+
417
+ /// Is this message deprecated?
418
+ /// Depending on the target platform, this can emit Deprecated annotations
419
+ /// for the message, or it will be completely ignored; in the very least,
420
+ /// this is a formalization for deprecating messages.
421
+ optional bool deprecated = 3 [default=false];
422
+
423
+ /// Whether the message is an automatically generated map entry type for the
424
+ /// maps field.
425
+ //
426
+ /// For maps fields:
427
+ /// map<KeyType, ValueType> map_field = 1;
428
+ /// The parsed descriptor looks like:
429
+ /// message MapFieldEntry {
430
+ /// option map_entry = true;
431
+ /// optional KeyType key = 1;
432
+ /// optional ValueType value = 2;
433
+ /// }
434
+ /// repeated MapFieldEntry map_field = 1;
435
+ //
436
+ /// Implementations may choose not to generate the map_entry=true message, but
437
+ /// use a native map in the target language to hold the keys and values.
438
+ /// The reflection APIs in such implementions still need to work as
439
+ /// if the field is a repeated message field.
440
+ //
441
+ /// NOTE: Do not set the option in .proto files. Always use the maps syntax
442
+ /// instead. The option should only be implicitly set by the proto compiler
443
+ /// parser.
444
+ optional bool map_entry = 7;
445
+
446
+ /// The parser stores options it doesn't recognize here. See above.
447
+ repeated UninterpretedOption uninterpreted_option = 999;
448
+
449
+ /// Clients can define custom options in extensions of this message. See above.
450
+ extensions 1000 to max;
451
+ }
452
+
453
+ message FieldOptions {
454
+ /// The ctype option instructs the C++ code generator to use a different
455
+ /// representation of the field than it normally would. See the specific
456
+ /// options below. This option is not yet implemented in the open source
457
+ /// release -- sorry, we'll try to include it in a future version!
458
+ optional CType ctype = 1 [default = STRING];
459
+ enum CType {
460
+ /// Default mode.
461
+ STRING = 0;
462
+
463
+ CORD = 1;
464
+
465
+ STRING_PIECE = 2;
466
+ }
467
+ /// The packed option can be enabled for repeated primitive fields to enable
468
+ /// a more efficient representation on the wire. Rather than repeatedly
469
+ /// writing the tag and type for each element, the entire array is encoded as
470
+ /// a single length-delimited blob. In proto3, only explicit setting it to
471
+ /// false will avoid using packed encoding.
472
+ optional bool packed = 2;
473
+
474
+
475
+ /// The jstype option determines the JavaScript type used for values of the
476
+ /// field. The option is permitted only for 64 bit integral and fixed types
477
+ /// (int64, uint64, sint64, fixed64, sfixed64). By default these types are
478
+ /// represented as JavaScript strings. This avoids loss of precision that can
479
+ /// happen when a large value is converted to a floating point JavaScript
480
+ /// numbers. Specifying JS_NUMBER for the jstype causes the generated
481
+ /// JavaScript code to use the JavaScript "number" type instead of strings.
482
+ /// This option is an enum to permit additional types to be added,
483
+ /// e.g. goog.math.Integer.
484
+ optional JSType jstype = 6 [default = JS_NORMAL];
485
+ enum JSType {
486
+ /// Use the default type.
487
+ JS_NORMAL = 0;
488
+
489
+ /// Use JavaScript strings.
490
+ JS_STRING = 1;
491
+
492
+ /// Use JavaScript numbers.
493
+ JS_NUMBER = 2;
494
+ }
495
+
496
+ /// Should this field be parsed lazily? Lazy applies only to message-type
497
+ /// fields. It means that when the outer message is initially parsed, the
498
+ /// inner message's contents will not be parsed but instead stored in encoded
499
+ /// form. The inner message will actually be parsed when it is first accessed.
500
+ //
501
+ /// This is only a hint. Implementations are free to choose whether to use
502
+ /// eager or lazy parsing regardless of the value of this option. However,
503
+ /// setting this option true suggests that the protocol author believes that
504
+ /// using lazy parsing on this field is worth the additional bookkeeping
505
+ /// overhead typically needed to implement it.
506
+ //
507
+ /// This option does not affect the public interface of any generated code;
508
+ /// all method signatures remain the same. Furthermore, thread-safety of the
509
+ /// interface is not affected by this option; const methods remain safe to
510
+ /// call from multiple threads concurrently, while non-const methods continue
511
+ /// to require exclusive access.
512
+ //
513
+ //
514
+ /// Note that implementations may choose not to check required fields within
515
+ /// a lazy sub-message. That is, calling IsInitialized() on the outher message
516
+ /// may return true even if the inner message has missing required fields.
517
+ /// This is necessary because otherwise the inner message would have to be
518
+ /// parsed in order to perform the check, defeating the purpose of lazy
519
+ /// parsing. An implementation which chooses not to check required fields
520
+ /// must be consistent about it. That is, for any particular sub-message, the
521
+ /// implementation must either *always* check its required fields, or *never*
522
+ /// check its required fields, regardless of whether or not the message has
523
+ /// been parsed.
524
+ optional bool lazy = 5 [default=false];
525
+
526
+ /// Is this field deprecated?
527
+ /// Depending on the target platform, this can emit Deprecated annotations
528
+ /// for accessors, or it will be completely ignored; in the very least, this
529
+ /// is a formalization for deprecating fields.
530
+ optional bool deprecated = 3 [default=false];
531
+
532
+ /// For Google-internal migration only. Do not use.
533
+ optional bool weak = 10 [default=false];
534
+
535
+
536
+ /// The parser stores options it doesn't recognize here. See above.
537
+ repeated UninterpretedOption uninterpreted_option = 999;
538
+
539
+ /// Clients can define custom options in extensions of this message. See above.
540
+ extensions 1000 to max;
541
+ }
542
+
543
+ message EnumOptions {
544
+
545
+ /// Set this option to true to allow mapping different tag names to the same
546
+ /// value.
547
+ optional bool allow_alias = 2;
548
+
549
+ /// Is this enum deprecated?
550
+ /// Depending on the target platform, this can emit Deprecated annotations
551
+ /// for the enum, or it will be completely ignored; in the very least, this
552
+ /// is a formalization for deprecating enums.
553
+ optional bool deprecated = 3 [default=false];
554
+
555
+ /// The parser stores options it doesn't recognize here. See above.
556
+ repeated UninterpretedOption uninterpreted_option = 999;
557
+
558
+ /// Clients can define custom options in extensions of this message. See above.
559
+ extensions 1000 to max;
560
+ }
561
+
562
+ message EnumValueOptions {
563
+ /// Is this enum value deprecated?
564
+ /// Depending on the target platform, this can emit Deprecated annotations
565
+ /// for the enum value, or it will be completely ignored; in the very least,
566
+ /// this is a formalization for deprecating enum values.
567
+ optional bool deprecated = 1 [default=false];
568
+
569
+ /// The parser stores options it doesn't recognize here. See above.
570
+ repeated UninterpretedOption uninterpreted_option = 999;
571
+
572
+ /// Clients can define custom options in extensions of this message. See above.
573
+ extensions 1000 to max;
574
+ }
575
+
576
+ message ServiceOptions {
577
+
578
+ /// Note: Field numbers 1 through 32 are reserved for Google's internal RPC
579
+ /// framework. We apologize for hoarding these numbers to ourselves, but
580
+ /// we were already using them long before we decided to release Protocol
581
+ /// Buffers.
582
+
583
+ /// Is this service deprecated?
584
+ /// Depending on the target platform, this can emit Deprecated annotations
585
+ /// for the service, or it will be completely ignored; in the very least,
586
+ /// this is a formalization for deprecating services.
587
+ optional bool deprecated = 33 [default=false];
588
+
589
+ /// The parser stores options it doesn't recognize here. See above.
590
+ repeated UninterpretedOption uninterpreted_option = 999;
591
+
592
+ /// Clients can define custom options in extensions of this message. See above.
593
+ extensions 1000 to max;
594
+ }
595
+
596
+ message MethodOptions {
597
+
598
+ /// Note: Field numbers 1 through 32 are reserved for Google's internal RPC
599
+ /// framework. We apologize for hoarding these numbers to ourselves, but
600
+ /// we were already using them long before we decided to release Protocol
601
+ /// Buffers.
602
+
603
+ /// Is this method deprecated?
604
+ /// Depending on the target platform, this can emit Deprecated annotations
605
+ /// for the method, or it will be completely ignored; in the very least,
606
+ /// this is a formalization for deprecating methods.
607
+ optional bool deprecated = 33 [default=false];
608
+
609
+ /// The parser stores options it doesn't recognize here. See above.
610
+ repeated UninterpretedOption uninterpreted_option = 999;
611
+
612
+ /// Clients can define custom options in extensions of this message. See above.
613
+ extensions 1000 to max;
614
+ }
615
+
616
+
617
+ /// A message representing a option the parser does not recognize. This only
618
+ /// appears in options protos created by the compiler::Parser class.
619
+ /// DescriptorPool resolves these when building Descriptor objects. Therefore,
620
+ /// options protos in descriptor objects (e.g. returned by Descriptor::options(),
621
+ /// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions
622
+ /// in them.
623
+ message UninterpretedOption {
624
+ /// The name of the uninterpreted option. Each string represents a segment in
625
+ /// a dot-separated name. is_extension is true iff a segment represents an
626
+ /// extension (denoted with parentheses in options specs in .proto files).
627
+ /// E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents
628
+ /// "foo.(bar.baz).qux".
629
+ message NamePart {
630
+ required string name_part = 1;
631
+ required bool is_extension = 2;
632
+ }
633
+ repeated NamePart name = 2;
634
+
635
+ /// The value of the uninterpreted option, in whatever type the tokenizer
636
+ /// identified it as during parsing. Exactly one of these should be set.
637
+ optional string identifier_value = 3;
638
+ optional uint64 positive_int_value = 4;
639
+ optional int64 negative_int_value = 5;
640
+ optional double double_value = 6;
641
+ optional bytes string_value = 7;
642
+ optional string aggregate_value = 8;
643
+ }
644
+
645
+ /// ===================================================================
646
+ /// Optional source code info
647
+
648
+ /// Encapsulates information about the original source file from which a
649
+ /// FileDescriptorProto was generated.
650
+ message SourceCodeInfo {
651
+ /// A Location identifies a piece of source code in a .proto file which
652
+ /// corresponds to a particular definition. This information is intended
653
+ /// to be useful to IDEs, code indexers, documentation generators, and similar
654
+ /// tools.
655
+ //
656
+ /// For example, say we have a file like:
657
+ /// message Foo {
658
+ /// optional string foo = 1;
659
+ /// }
660
+ /// Let's look at just the field definition:
661
+ /// optional string foo = 1;
662
+ /// ^ ^^ ^^ ^ ^^^
663
+ /// a bc de f ghi
664
+ /// We have the following locations:
665
+ /// span path represents
666
+ /// [a,i) [ 4, 0, 2, 0 ] The whole field definition.
667
+ /// [a,b) [ 4, 0, 2, 0, 4 ] The label (optional).
668
+ /// [c,d) [ 4, 0, 2, 0, 5 ] The type (string).
669
+ /// [e,f) [ 4, 0, 2, 0, 1 ] The name (foo).
670
+ /// [g,h) [ 4, 0, 2, 0, 3 ] The number (1).
671
+ //
672
+ /// Notes:
673
+ /// - A location may refer to a repeated field itself (i.e. not to any
674
+ /// particular index within it). This is used whenever a set of elements are
675
+ /// logically enclosed in a single code segment. For example, an entire
676
+ /// extend block (possibly containing multiple extension definitions) will
677
+ /// have an outer location whose path refers to the "extensions" repeated
678
+ /// field without an index.
679
+ /// - Multiple locations may have the same path. This happens when a single
680
+ /// logical declaration is spread out across multiple places. The most
681
+ /// obvious example is the "extend" block again -- there may be multiple
682
+ /// extend blocks in the same scope, each of which will have the same path.
683
+ /// - A location's span is not always a subset of its parent's span. For
684
+ /// example, the "extendee" of an extension declaration appears at the
685
+ /// beginning of the "extend" block and is shared by all extensions within
686
+ /// the block.
687
+ /// - Just because a location's span is a subset of some other location's span
688
+ /// does not mean that it is a descendent. For example, a "group" defines
689
+ /// both a type and a field in a single declaration. Thus, the locations
690
+ /// corresponding to the type and field and their components will overlap.
691
+ /// - Code which tries to interpret locations should probably be designed to
692
+ /// ignore those that it doesn't understand, as more types of locations could
693
+ /// be recorded in the future.
694
+ repeated Location location = 1;
695
+ message Location {
696
+ /// Identifies which part of the FileDescriptorProto was defined at this
697
+ /// location.
698
+ //
699
+ /// Each element is a field number or an index. They form a path from
700
+ /// the root FileDescriptorProto to the place where the definition. For
701
+ /// example, this path:
702
+ /// [ 4, 3, 2, 7, 1 ]
703
+ /// refers to:
704
+ /// file.message_type(3) /// 4, 3
705
+ /// .field(7) /// 2, 7
706
+ /// .name() /// 1
707
+ /// This is because FileDescriptorProto.message_type has field number 4:
708
+ /// repeated DescriptorProto message_type = 4;
709
+ /// and DescriptorProto.field has field number 2:
710
+ /// repeated FieldDescriptorProto field = 2;
711
+ /// and FieldDescriptorProto.name has field number 1:
712
+ /// optional string name = 1;
713
+ //
714
+ /// Thus, the above path gives the location of a field name. If we removed
715
+ /// the last element:
716
+ /// [ 4, 3, 2, 7 ]
717
+ /// this path refers to the whole field declaration (from the beginning
718
+ /// of the label to the terminating semicolon).
719
+ repeated int32 path = 1 [packed=true];
720
+
721
+ /// Always has exactly three or four elements: start line, start column,
722
+ /// end line (optional, otherwise assumed same as start line), end column.
723
+ /// These are packed into a single field for efficiency. Note that line
724
+ /// and column numbers are zero-based -- typically you will want to add
725
+ /// 1 to each before displaying to a user.
726
+ repeated int32 span = 2 [packed=true];
727
+
728
+ /// If this SourceCodeInfo represents a complete declaration, these are any
729
+ /// comments appearing before and after the declaration which appear to be
730
+ /// attached to the declaration.
731
+ //
732
+ /// A series of line comments appearing on consecutive lines, with no other
733
+ /// tokens appearing on those lines, will be treated as a single comment.
734
+ //
735
+ /// leading_detached_comments will keep paragraphs of comments that appear
736
+ /// before (but not connected to) the current element. Each paragraph,
737
+ /// separated by empty lines, will be one comment element in the repeated
738
+ /// field.
739
+ //
740
+ /// Only the comment content is provided; comment markers (e.g. //) are
741
+ /// stripped out. For block comments, leading whitespace and an asterisk
742
+ /// will be stripped from the beginning of each line other than the first.
743
+ /// Newlines are included in the output.
744
+ //
745
+ /// Examples:
746
+ //
747
+ /// optional int32 foo = 1; /// Comment attached to foo.
748
+ /// /// Comment attached to bar.
749
+ /// optional int32 bar = 2;
750
+ //
751
+ /// optional string baz = 3;
752
+ /// /// Comment attached to baz.
753
+ /// /// Another line attached to baz.
754
+ //
755
+ /// /// Comment attached to qux.
756
+ /// //
757
+ /// /// Another line attached to qux.
758
+ /// optional double qux = 4;
759
+ //
760
+ /// /// Detached comment for corge. This is not leading or trailing comments
761
+ /// /// to qux or corge because there are blank lines separating it from
762
+ /// /// both.
763
+ //
764
+ /// /// Detached comment for corge paragraph 2.
765
+ //
766
+ /// optional string corge = 5;
767
+ /// /* Block comment attached
768
+ /// * to corge. Leading asterisks
769
+ /// * will be removed. */
770
+ /// /* Block comment attached to
771
+ /// * grault. */
772
+ /// optional int32 grault = 6;
773
+ //
774
+ /// /// ignored detached comments.
775
+ optional string leading_comments = 3;
776
+ optional string trailing_comments = 4;
777
+ repeated string leading_detached_comments = 6;
778
+ }
779
+ }
780
+
781
+ /// Describes the relationship between generated code and its original source
782
+ /// file. A GeneratedCodeInfo message is associated with only one generated
783
+ /// source file, but may contain references to different source .proto files.
784
+ message GeneratedCodeInfo {
785
+ /// An Annotation connects some span of text in generated code to an element
786
+ /// of its generating .proto file.
787
+ repeated Annotation annotation = 1;
788
+ message Annotation {
789
+ /// Identifies the element in the original source .proto file. This field
790
+ /// is formatted the same as SourceCodeInfo.Location.path.
791
+ repeated int32 path = 1 [packed=true];
792
+
793
+ /// Identifies the filesystem path to the original source .proto.
794
+ optional string source_file = 2;
795
+
796
+ /// Identifies the starting offset in bytes in the generated code
797
+ /// that relates to the identified object.
798
+ optional int32 begin = 3;
799
+
800
+ /// Identifies the ending offset in bytes in the generated code that
801
+ /// relates to the identified offset. The end offset should be one past
802
+ /// the last relevant byte (so the length of the text = end - begin).
803
+ optional int32 end = 4;
804
+ }
805
+ }