protostar 0.1.0.beta1

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 (223) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +60 -0
  3. data/LICENSE.txt +21 -0
  4. data/README.md +647 -0
  5. data/THIRD_PARTY_NOTICES.md +61 -0
  6. data/exe/protoc-gen-protostar +7 -0
  7. data/exe/protostar +7 -0
  8. data/lib/protostar/builder/generator.rb +71 -0
  9. data/lib/protostar/builder/sink.rb +35 -0
  10. data/lib/protostar/builder.rb +965 -0
  11. data/lib/protostar/cli.rb +267 -0
  12. data/lib/protostar/codec/decode_generator.rb +199 -0
  13. data/lib/protostar/codec/decoder.rb +296 -0
  14. data/lib/protostar/codec/encode_generator.rb +224 -0
  15. data/lib/protostar/codec/encoder.rb +121 -0
  16. data/lib/protostar/codec/sizer.rb +91 -0
  17. data/lib/protostar/codec.rb +15 -0
  18. data/lib/protostar/compiler/ast.rb +193 -0
  19. data/lib/protostar/compiler/emitters/descriptor_set.rb +57 -0
  20. data/lib/protostar/compiler/emitters/google_ruby.rb +103 -0
  21. data/lib/protostar/compiler/emitters/grpc.rb +175 -0
  22. data/lib/protostar/compiler/emitters/protostar_rbs.rb +252 -0
  23. data/lib/protostar/compiler/emitters/rbs.rb +394 -0
  24. data/lib/protostar/compiler/emitters/ruby.rb +503 -0
  25. data/lib/protostar/compiler/emitters.rb +268 -0
  26. data/lib/protostar/compiler/include/LICENSE +32 -0
  27. data/lib/protostar/compiler/include/google/protobuf/any.proto +106 -0
  28. data/lib/protostar/compiler/include/google/protobuf/api.proto +229 -0
  29. data/lib/protostar/compiler/include/google/protobuf/compiler/plugin.proto +180 -0
  30. data/lib/protostar/compiler/include/google/protobuf/cpp_features.proto +87 -0
  31. data/lib/protostar/compiler/include/google/protobuf/descriptor.proto +1532 -0
  32. data/lib/protostar/compiler/include/google/protobuf/duration.proto +115 -0
  33. data/lib/protostar/compiler/include/google/protobuf/empty.proto +51 -0
  34. data/lib/protostar/compiler/include/google/protobuf/field_mask.proto +243 -0
  35. data/lib/protostar/compiler/include/google/protobuf/java_features.proto +132 -0
  36. data/lib/protostar/compiler/include/google/protobuf/source_context.proto +48 -0
  37. data/lib/protostar/compiler/include/google/protobuf/struct.proto +111 -0
  38. data/lib/protostar/compiler/include/google/protobuf/timestamp.proto +145 -0
  39. data/lib/protostar/compiler/include/google/protobuf/type.proto +217 -0
  40. data/lib/protostar/compiler/include/google/protobuf/wrappers.proto +157 -0
  41. data/lib/protostar/compiler/lexer.rb +659 -0
  42. data/lib/protostar/compiler/linker.rb +894 -0
  43. data/lib/protostar/compiler/option_interpreter.rb +363 -0
  44. data/lib/protostar/compiler/parser.rb +1696 -0
  45. data/lib/protostar/compiler/retention.rb +104 -0
  46. data/lib/protostar/compiler/run.rb +184 -0
  47. data/lib/protostar/compiler/source_info.rb +161 -0
  48. data/lib/protostar/compiler/symbol_table.rb +223 -0
  49. data/lib/protostar/compiler/text_format.rb +340 -0
  50. data/lib/protostar/compiler/validator.rb +944 -0
  51. data/lib/protostar/compiler.rb +304 -0
  52. data/lib/protostar/diagnostics/codes.rb +1307 -0
  53. data/lib/protostar/diagnostics/formats.rb +64 -0
  54. data/lib/protostar/diagnostics/renderer.rb +240 -0
  55. data/lib/protostar/diagnostics/source.rb +153 -0
  56. data/lib/protostar/diagnostics.rb +117 -0
  57. data/lib/protostar/dsl.rb +367 -0
  58. data/lib/protostar/enum.rb +70 -0
  59. data/lib/protostar/errors.rb +23 -0
  60. data/lib/protostar/google/protobuf/any_pb.rb +90 -0
  61. data/lib/protostar/google/protobuf/api_pb.rb +199 -0
  62. data/lib/protostar/google/protobuf/compiler/plugin_pb.rb +168 -0
  63. data/lib/protostar/google/protobuf/descriptor_pb.rb +1239 -0
  64. data/lib/protostar/google/protobuf/duration_pb.rb +99 -0
  65. data/lib/protostar/google/protobuf/empty_pb.rb +36 -0
  66. data/lib/protostar/google/protobuf/field_mask_pb.rb +228 -0
  67. data/lib/protostar/google/protobuf/source_context_pb.rb +33 -0
  68. data/lib/protostar/google/protobuf/struct_pb.rb +91 -0
  69. data/lib/protostar/google/protobuf/timestamp_pb.rb +129 -0
  70. data/lib/protostar/google/protobuf/type_pb.rb +202 -0
  71. data/lib/protostar/google/protobuf/wrappers_pb.rb +125 -0
  72. data/lib/protostar/google_protobuf_shim.rb +24 -0
  73. data/lib/protostar/json/encoder.rb +340 -0
  74. data/lib/protostar/json/errors.rb +34 -0
  75. data/lib/protostar/json/parser.rb +437 -0
  76. data/lib/protostar/json/path.rb +39 -0
  77. data/lib/protostar/json.rb +95 -0
  78. data/lib/protostar/lint/command.rb +197 -0
  79. data/lib/protostar/lint/config.rb +98 -0
  80. data/lib/protostar/lint/context.rb +126 -0
  81. data/lib/protostar/lint/directives.rb +56 -0
  82. data/lib/protostar/lint/fixer.rb +165 -0
  83. data/lib/protostar/lint/naming.rb +54 -0
  84. data/lib/protostar/lint/rule.rb +120 -0
  85. data/lib/protostar/lint/rules/comment_enum.rb +31 -0
  86. data/lib/protostar/lint/rules/comment_enum_value.rb +32 -0
  87. data/lib/protostar/lint/rules/comment_field.rb +33 -0
  88. data/lib/protostar/lint/rules/comment_message.rb +31 -0
  89. data/lib/protostar/lint/rules/comment_rpc.rb +31 -0
  90. data/lib/protostar/lint/rules/comment_service.rb +31 -0
  91. data/lib/protostar/lint/rules/edition_recommended.rb +31 -0
  92. data/lib/protostar/lint/rules/enum_first_value_zero.rb +34 -0
  93. data/lib/protostar/lint/rules/enum_pascal_case.rb +25 -0
  94. data/lib/protostar/lint/rules/enum_value_prefix.rb +38 -0
  95. data/lib/protostar/lint/rules/enum_value_upper_snake_case.rb +28 -0
  96. data/lib/protostar/lint/rules/enum_zero_value_suffix.rb +41 -0
  97. data/lib/protostar/lint/rules/field_lower_snake_case.rb +34 -0
  98. data/lib/protostar/lint/rules/field_not_required.rb +39 -0
  99. data/lib/protostar/lint/rules/field_number_reuse_risk.rb +45 -0
  100. data/lib/protostar/lint/rules/field_numbers_hot_range.rb +44 -0
  101. data/lib/protostar/lint/rules/file_lower_snake_case.rb +27 -0
  102. data/lib/protostar/lint/rules/import_no_public.rb +29 -0
  103. data/lib/protostar/lint/rules/import_no_weak.rb +28 -0
  104. data/lib/protostar/lint/rules/import_used.rb +33 -0
  105. data/lib/protostar/lint/rules/message_pascal_case.rb +27 -0
  106. data/lib/protostar/lint/rules/no_deprecated_features.rb +50 -0
  107. data/lib/protostar/lint/rules/no_groups.rb +34 -0
  108. data/lib/protostar/lint/rules/oneof_lower_snake_case.rb +27 -0
  109. data/lib/protostar/lint/rules/package_defined.rb +28 -0
  110. data/lib/protostar/lint/rules/package_directory_match.rb +33 -0
  111. data/lib/protostar/lint/rules/package_lower_snake_case.rb +28 -0
  112. data/lib/protostar/lint/rules/package_same_directory.rb +39 -0
  113. data/lib/protostar/lint/rules/package_version_suffix.rb +31 -0
  114. data/lib/protostar/lint/rules/reserved_names_with_numbers.rb +44 -0
  115. data/lib/protostar/lint/rules/rpc_pascal_case.rb +25 -0
  116. data/lib/protostar/lint/rules/rpc_request_response_unique.rb +40 -0
  117. data/lib/protostar/lint/rules/rpc_request_standard_name.rb +32 -0
  118. data/lib/protostar/lint/rules/rpc_response_standard_name.rb +31 -0
  119. data/lib/protostar/lint/rules/service_pascal_case.rb +25 -0
  120. data/lib/protostar/lint/rules/service_suffix.rb +28 -0
  121. data/lib/protostar/lint/rules/syntax_specified.rb +35 -0
  122. data/lib/protostar/lint/runner.rb +135 -0
  123. data/lib/protostar/lint.rb +122 -0
  124. data/lib/protostar/message/accessors.rb +86 -0
  125. data/lib/protostar/message/coercion.rb +171 -0
  126. data/lib/protostar/message/field_info.rb +145 -0
  127. data/lib/protostar/message/reflection.rb +149 -0
  128. data/lib/protostar/message.rb +572 -0
  129. data/lib/protostar/plugin.rb +94 -0
  130. data/lib/protostar/schema/default_value.rb +113 -0
  131. data/lib/protostar/schema/descriptor.rb +41 -0
  132. data/lib/protostar/schema/draft/copy.rb +88 -0
  133. data/lib/protostar/schema/draft/resolution.rb +177 -0
  134. data/lib/protostar/schema/draft.rb +779 -0
  135. data/lib/protostar/schema/enum.rb +106 -0
  136. data/lib/protostar/schema/extension_range.rb +37 -0
  137. data/lib/protostar/schema/features.rb +153 -0
  138. data/lib/protostar/schema/field.rb +201 -0
  139. data/lib/protostar/schema/file.rb +217 -0
  140. data/lib/protostar/schema/freezer.rb +61 -0
  141. data/lib/protostar/schema/message.rb +104 -0
  142. data/lib/protostar/schema/oneof.rb +38 -0
  143. data/lib/protostar/schema/options.rb +367 -0
  144. data/lib/protostar/schema/pool.rb +179 -0
  145. data/lib/protostar/schema/proto.rb +576 -0
  146. data/lib/protostar/schema/resolver.rb +118 -0
  147. data/lib/protostar/schema/service.rb +89 -0
  148. data/lib/protostar/schema/source_info.rb +53 -0
  149. data/lib/protostar/schema.rb +65 -0
  150. data/lib/protostar/short_names/any.rb +7 -0
  151. data/lib/protostar/short_names/duration.rb +7 -0
  152. data/lib/protostar/short_names/empty.rb +7 -0
  153. data/lib/protostar/short_names/field_mask.rb +7 -0
  154. data/lib/protostar/short_names/struct.rb +9 -0
  155. data/lib/protostar/short_names/timestamp.rb +7 -0
  156. data/lib/protostar/short_names/wrappers.rb +15 -0
  157. data/lib/protostar/text/extensions.rb +114 -0
  158. data/lib/protostar/text/parser.rb +439 -0
  159. data/lib/protostar/text/printer.rb +304 -0
  160. data/lib/protostar/text/tokenizer.rb +116 -0
  161. data/lib/protostar/text.rb +67 -0
  162. data/lib/protostar/types.rb +152 -0
  163. data/lib/protostar/unknown_field.rb +58 -0
  164. data/lib/protostar/version.rb +5 -0
  165. data/lib/protostar/view/generator.rb +298 -0
  166. data/lib/protostar/view/map.rb +194 -0
  167. data/lib/protostar/view/repeated.rb +143 -0
  168. data/lib/protostar/view/scan.rb +183 -0
  169. data/lib/protostar/view.rb +283 -0
  170. data/lib/protostar/well_known/any.rb +52 -0
  171. data/lib/protostar/well_known/duration.rb +53 -0
  172. data/lib/protostar/well_known/list_value.rb +63 -0
  173. data/lib/protostar/well_known/struct.rb +55 -0
  174. data/lib/protostar/well_known/timestamp.rb +64 -0
  175. data/lib/protostar/well_known/value.rb +60 -0
  176. data/lib/protostar/well_known.rb +38 -0
  177. data/lib/protostar/wire/io_source.rb +40 -0
  178. data/lib/protostar/wire/reader.rb +254 -0
  179. data/lib/protostar/wire/writer.rb +201 -0
  180. data/lib/protostar/wire.rb +96 -0
  181. data/lib/protostar.rb +95 -0
  182. data/shims/google-protobuf/lib/google/protobuf/any_pb.rb +17 -0
  183. data/shims/google-protobuf/lib/google/protobuf/api_pb.rb +22 -0
  184. data/shims/google-protobuf/lib/google/protobuf/compiler/plugin_pb.rb +25 -0
  185. data/shims/google-protobuf/lib/google/protobuf/descriptor_pb.rb +72 -0
  186. data/shims/google-protobuf/lib/google/protobuf/descriptor_pool.rb +164 -0
  187. data/shims/google-protobuf/lib/google/protobuf/descriptors.rb +553 -0
  188. data/shims/google-protobuf/lib/google/protobuf/duration_pb.rb +17 -0
  189. data/shims/google-protobuf/lib/google/protobuf/empty_pb.rb +17 -0
  190. data/shims/google-protobuf/lib/google/protobuf/field_mask_pb.rb +17 -0
  191. data/shims/google-protobuf/lib/google/protobuf/internal/convert.rb +180 -0
  192. data/shims/google-protobuf/lib/google/protobuf/internal/extensions.rb +154 -0
  193. data/shims/google-protobuf/lib/google/protobuf/internal/json.rb +104 -0
  194. data/shims/google-protobuf/lib/google/protobuf/internal/well_known.rb +140 -0
  195. data/shims/google-protobuf/lib/google/protobuf/map.rb +216 -0
  196. data/shims/google-protobuf/lib/google/protobuf/message.rb +544 -0
  197. data/shims/google-protobuf/lib/google/protobuf/message_exts.rb +41 -0
  198. data/shims/google-protobuf/lib/google/protobuf/plugin_pb.rb +4 -0
  199. data/shims/google-protobuf/lib/google/protobuf/repeated_field.rb +366 -0
  200. data/shims/google-protobuf/lib/google/protobuf/source_context_pb.rb +17 -0
  201. data/shims/google-protobuf/lib/google/protobuf/struct_pb.rb +20 -0
  202. data/shims/google-protobuf/lib/google/protobuf/timestamp_pb.rb +17 -0
  203. data/shims/google-protobuf/lib/google/protobuf/type_pb.rb +27 -0
  204. data/shims/google-protobuf/lib/google/protobuf/well_known_types.rb +37 -0
  205. data/shims/google-protobuf/lib/google/protobuf/wrappers_pb.rb +25 -0
  206. data/shims/google-protobuf/lib/google/protobuf.rb +107 -0
  207. data/shims/google-protobuf/lib/google/protobuf_ffi.rb +5 -0
  208. data/shims/google-protobuf/lib/google/protobuf_native.rb +5 -0
  209. data/sig/protostar/google/protobuf/any_pb.rbs +77 -0
  210. data/sig/protostar/google/protobuf/api_pb.rbs +242 -0
  211. data/sig/protostar/google/protobuf/compiler/plugin_pb.rbs +264 -0
  212. data/sig/protostar/google/protobuf/descriptor_pb.rbs +2220 -0
  213. data/sig/protostar/google/protobuf/duration_pb.rbs +82 -0
  214. data/sig/protostar/google/protobuf/empty_pb.rbs +18 -0
  215. data/sig/protostar/google/protobuf/field_mask_pb.rbs +170 -0
  216. data/sig/protostar/google/protobuf/source_context_pb.rbs +24 -0
  217. data/sig/protostar/google/protobuf/struct_pb.rbs +135 -0
  218. data/sig/protostar/google/protobuf/timestamp_pb.rbs +102 -0
  219. data/sig/protostar/google/protobuf/type_pb.rbs +304 -0
  220. data/sig/protostar/google/protobuf/wrappers_pb.rbs +169 -0
  221. data/sig/protostar/lint.rbs +216 -0
  222. data/sig/protostar.rbs +326 -0
  223. metadata +366 -0
@@ -0,0 +1,2220 @@
1
+ # Generated by protostar from google/protobuf/descriptor.proto. Do not edit.
2
+
3
+ module Protostar
4
+ module Google
5
+ module Protobuf
6
+ # The protocol compiler can output a FileDescriptorSet containing the .proto
7
+ # files it parses.
8
+ class FileDescriptorSet < ::Protostar::Message
9
+ type init_map = {
10
+ ?file: (::Array[::Protostar::Google::Protobuf::FileDescriptorProto | ::Protostar::Google::Protobuf::FileDescriptorProto::init_map])?
11
+ }
12
+ def initialize: (
13
+ ?init_map? fields,
14
+ ?file: (::Array[::Protostar::Google::Protobuf::FileDescriptorProto | ::Protostar::Google::Protobuf::FileDescriptorProto::init_map])?
15
+ ) -> void
16
+
17
+ attr_reader file(): ::Array[::Protostar::Google::Protobuf::FileDescriptorProto]
18
+ attr_writer file(): (::Array[::Protostar::Google::Protobuf::FileDescriptorProto | ::Protostar::Google::Protobuf::FileDescriptorProto::init_map])?
19
+ end
20
+
21
+ # Describes a complete .proto file.
22
+ class FileDescriptorProto < ::Protostar::Message
23
+ type init_map = {
24
+ ?name: ::String?,
25
+ ?package: ::String?,
26
+ ?dependency: ::Array[::String]?,
27
+ ?public_dependency: ::Array[::Integer]?,
28
+ ?weak_dependency: ::Array[::Integer]?,
29
+ ?option_dependency: ::Array[::String]?,
30
+ ?message_type: (::Array[::Protostar::Google::Protobuf::DescriptorProto | ::Protostar::Google::Protobuf::DescriptorProto::init_map])?,
31
+ ?enum_type: (::Array[::Protostar::Google::Protobuf::EnumDescriptorProto | ::Protostar::Google::Protobuf::EnumDescriptorProto::init_map])?,
32
+ ?service: (::Array[::Protostar::Google::Protobuf::ServiceDescriptorProto | ::Protostar::Google::Protobuf::ServiceDescriptorProto::init_map])?,
33
+ ?extension: (::Array[::Protostar::Google::Protobuf::FieldDescriptorProto | ::Protostar::Google::Protobuf::FieldDescriptorProto::init_map])?,
34
+ ?options: (::Protostar::Google::Protobuf::FileOptions | ::Protostar::Google::Protobuf::FileOptions::init_map)?,
35
+ ?source_code_info: (::Protostar::Google::Protobuf::SourceCodeInfo | ::Protostar::Google::Protobuf::SourceCodeInfo::init_map)?,
36
+ ?syntax: ::String?,
37
+ ?edition: (::Protostar::Google::Protobuf::Edition::names | ::Integer)?
38
+ }
39
+ def initialize: (
40
+ ?init_map? fields,
41
+ ?name: ::String?,
42
+ ?package: ::String?,
43
+ ?dependency: ::Array[::String]?,
44
+ ?public_dependency: ::Array[::Integer]?,
45
+ ?weak_dependency: ::Array[::Integer]?,
46
+ ?option_dependency: ::Array[::String]?,
47
+ ?message_type: (::Array[::Protostar::Google::Protobuf::DescriptorProto | ::Protostar::Google::Protobuf::DescriptorProto::init_map])?,
48
+ ?enum_type: (::Array[::Protostar::Google::Protobuf::EnumDescriptorProto | ::Protostar::Google::Protobuf::EnumDescriptorProto::init_map])?,
49
+ ?service: (::Array[::Protostar::Google::Protobuf::ServiceDescriptorProto | ::Protostar::Google::Protobuf::ServiceDescriptorProto::init_map])?,
50
+ ?extension: (::Array[::Protostar::Google::Protobuf::FieldDescriptorProto | ::Protostar::Google::Protobuf::FieldDescriptorProto::init_map])?,
51
+ ?options: (::Protostar::Google::Protobuf::FileOptions | ::Protostar::Google::Protobuf::FileOptions::init_map)?,
52
+ ?source_code_info: (::Protostar::Google::Protobuf::SourceCodeInfo | ::Protostar::Google::Protobuf::SourceCodeInfo::init_map)?,
53
+ ?syntax: ::String?,
54
+ ?edition: (::Protostar::Google::Protobuf::Edition::names | ::Integer)?
55
+ ) -> void
56
+
57
+ attr_reader name(): ::String
58
+ attr_writer name(): ::String?
59
+ def has_name?: () -> bool
60
+ def clear_name: () -> void
61
+
62
+ attr_reader package(): ::String
63
+ attr_writer package(): ::String?
64
+ def has_package?: () -> bool
65
+ def clear_package: () -> void
66
+
67
+ # Names of files imported by this file.
68
+ attr_reader dependency(): ::Array[::String]
69
+ attr_writer dependency(): ::Array[::String]?
70
+
71
+ # Indexes of the public imported files in the dependency list above.
72
+ attr_reader public_dependency(): ::Array[::Integer]
73
+ attr_writer public_dependency(): ::Array[::Integer]?
74
+
75
+ # Indexes of the weak imported files in the dependency list.
76
+ # For Google-internal migration only. Do not use.
77
+ attr_reader weak_dependency(): ::Array[::Integer]
78
+ attr_writer weak_dependency(): ::Array[::Integer]?
79
+
80
+ # Names of files imported by this file purely for the purpose of providing
81
+ # option extensions. These are excluded from the dependency list above.
82
+ attr_reader option_dependency(): ::Array[::String]
83
+ attr_writer option_dependency(): ::Array[::String]?
84
+
85
+ # All top-level definitions in this file.
86
+ attr_reader message_type(): ::Array[::Protostar::Google::Protobuf::DescriptorProto]
87
+ attr_writer message_type(): (::Array[::Protostar::Google::Protobuf::DescriptorProto | ::Protostar::Google::Protobuf::DescriptorProto::init_map])?
88
+
89
+ attr_reader enum_type(): ::Array[::Protostar::Google::Protobuf::EnumDescriptorProto]
90
+ attr_writer enum_type(): (::Array[::Protostar::Google::Protobuf::EnumDescriptorProto | ::Protostar::Google::Protobuf::EnumDescriptorProto::init_map])?
91
+
92
+ attr_reader service(): ::Array[::Protostar::Google::Protobuf::ServiceDescriptorProto]
93
+ attr_writer service(): (::Array[::Protostar::Google::Protobuf::ServiceDescriptorProto | ::Protostar::Google::Protobuf::ServiceDescriptorProto::init_map])?
94
+
95
+ attr_reader extension(): ::Array[::Protostar::Google::Protobuf::FieldDescriptorProto]
96
+ attr_writer extension(): (::Array[::Protostar::Google::Protobuf::FieldDescriptorProto | ::Protostar::Google::Protobuf::FieldDescriptorProto::init_map])?
97
+
98
+ attr_reader options(): ::Protostar::Google::Protobuf::FileOptions?
99
+ attr_writer options(): (::Protostar::Google::Protobuf::FileOptions | ::Protostar::Google::Protobuf::FileOptions::init_map)?
100
+ def has_options?: () -> bool
101
+ def clear_options: () -> void
102
+
103
+ # This field contains optional information about the original source code.
104
+ # You may safely remove this entire field without harming runtime
105
+ # functionality of the descriptors -- the information is needed only by
106
+ # development tools.
107
+ attr_reader source_code_info(): ::Protostar::Google::Protobuf::SourceCodeInfo?
108
+ attr_writer source_code_info(): (::Protostar::Google::Protobuf::SourceCodeInfo | ::Protostar::Google::Protobuf::SourceCodeInfo::init_map)?
109
+ def has_source_code_info?: () -> bool
110
+ def clear_source_code_info: () -> void
111
+
112
+ # The syntax of the proto file.
113
+ # The supported values are "proto2", "proto3", and "editions".
114
+ # If `edition` is present, this value must be "editions".
115
+ # WARNING: This field should only be used by protobuf plugins or special
116
+ # cases like the proto compiler. Other uses are discouraged and
117
+ # developers should rely on the protoreflect APIs for their client language.
118
+ attr_reader syntax(): ::String
119
+ attr_writer syntax(): ::String?
120
+ def has_syntax?: () -> bool
121
+ def clear_syntax: () -> void
122
+
123
+ # The edition of the proto file.
124
+ # WARNING: This field should only be used by protobuf plugins or special
125
+ # cases like the proto compiler. Other uses are discouraged and
126
+ # developers should rely on the protoreflect APIs for their client language.
127
+ attr_reader edition(): ::Protostar::Google::Protobuf::Edition::names | ::Integer
128
+ attr_writer edition(): (::Protostar::Google::Protobuf::Edition::names | ::Integer)?
129
+ def has_edition?: () -> bool
130
+ def clear_edition: () -> void
131
+ end
132
+
133
+ # Describes a message type.
134
+ class DescriptorProto < ::Protostar::Message
135
+ class ExtensionRange < ::Protostar::Message
136
+ type init_map = {
137
+ ?start: ::Integer?,
138
+ ?end: ::Integer?,
139
+ ?options: (::Protostar::Google::Protobuf::ExtensionRangeOptions | ::Protostar::Google::Protobuf::ExtensionRangeOptions::init_map)?
140
+ }
141
+ def initialize: (
142
+ ?init_map? fields,
143
+ ?start: ::Integer?,
144
+ ?end: ::Integer?,
145
+ ?options: (::Protostar::Google::Protobuf::ExtensionRangeOptions | ::Protostar::Google::Protobuf::ExtensionRangeOptions::init_map)?
146
+ ) -> void
147
+
148
+ attr_reader start(): ::Integer
149
+ attr_writer start(): ::Integer?
150
+ def has_start?: () -> bool
151
+ def clear_start: () -> void
152
+
153
+ attr_reader end(): ::Integer
154
+ attr_writer end(): ::Integer?
155
+ def has_end?: () -> bool
156
+ def clear_end: () -> void
157
+
158
+ attr_reader options(): ::Protostar::Google::Protobuf::ExtensionRangeOptions?
159
+ attr_writer options(): (::Protostar::Google::Protobuf::ExtensionRangeOptions | ::Protostar::Google::Protobuf::ExtensionRangeOptions::init_map)?
160
+ def has_options?: () -> bool
161
+ def clear_options: () -> void
162
+ end
163
+
164
+ # Range of reserved tag numbers. Reserved tag numbers may not be used by
165
+ # fields or extension ranges in the same message. Reserved ranges may
166
+ # not overlap.
167
+ class ReservedRange < ::Protostar::Message
168
+ type init_map = {
169
+ ?start: ::Integer?,
170
+ ?end: ::Integer?
171
+ }
172
+ def initialize: (
173
+ ?init_map? fields,
174
+ ?start: ::Integer?,
175
+ ?end: ::Integer?
176
+ ) -> void
177
+
178
+ attr_reader start(): ::Integer
179
+ attr_writer start(): ::Integer?
180
+ def has_start?: () -> bool
181
+ def clear_start: () -> void
182
+
183
+ attr_reader end(): ::Integer
184
+ attr_writer end(): ::Integer?
185
+ def has_end?: () -> bool
186
+ def clear_end: () -> void
187
+ end
188
+
189
+ type init_map = {
190
+ ?name: ::String?,
191
+ ?field: (::Array[::Protostar::Google::Protobuf::FieldDescriptorProto | ::Protostar::Google::Protobuf::FieldDescriptorProto::init_map])?,
192
+ ?extension: (::Array[::Protostar::Google::Protobuf::FieldDescriptorProto | ::Protostar::Google::Protobuf::FieldDescriptorProto::init_map])?,
193
+ ?nested_type: (::Array[::Protostar::Google::Protobuf::DescriptorProto | ::Protostar::Google::Protobuf::DescriptorProto::init_map])?,
194
+ ?enum_type: (::Array[::Protostar::Google::Protobuf::EnumDescriptorProto | ::Protostar::Google::Protobuf::EnumDescriptorProto::init_map])?,
195
+ ?extension_range: (::Array[::Protostar::Google::Protobuf::DescriptorProto::ExtensionRange | ::Protostar::Google::Protobuf::DescriptorProto::ExtensionRange::init_map])?,
196
+ ?oneof_decl: (::Array[::Protostar::Google::Protobuf::OneofDescriptorProto | ::Protostar::Google::Protobuf::OneofDescriptorProto::init_map])?,
197
+ ?options: (::Protostar::Google::Protobuf::MessageOptions | ::Protostar::Google::Protobuf::MessageOptions::init_map)?,
198
+ ?reserved_range: (::Array[::Protostar::Google::Protobuf::DescriptorProto::ReservedRange | ::Protostar::Google::Protobuf::DescriptorProto::ReservedRange::init_map])?,
199
+ ?reserved_name: ::Array[::String]?,
200
+ ?visibility: (::Protostar::Google::Protobuf::SymbolVisibility::names | ::Integer)?
201
+ }
202
+ def initialize: (
203
+ ?init_map? fields,
204
+ ?name: ::String?,
205
+ ?field: (::Array[::Protostar::Google::Protobuf::FieldDescriptorProto | ::Protostar::Google::Protobuf::FieldDescriptorProto::init_map])?,
206
+ ?extension: (::Array[::Protostar::Google::Protobuf::FieldDescriptorProto | ::Protostar::Google::Protobuf::FieldDescriptorProto::init_map])?,
207
+ ?nested_type: (::Array[::Protostar::Google::Protobuf::DescriptorProto | ::Protostar::Google::Protobuf::DescriptorProto::init_map])?,
208
+ ?enum_type: (::Array[::Protostar::Google::Protobuf::EnumDescriptorProto | ::Protostar::Google::Protobuf::EnumDescriptorProto::init_map])?,
209
+ ?extension_range: (::Array[::Protostar::Google::Protobuf::DescriptorProto::ExtensionRange | ::Protostar::Google::Protobuf::DescriptorProto::ExtensionRange::init_map])?,
210
+ ?oneof_decl: (::Array[::Protostar::Google::Protobuf::OneofDescriptorProto | ::Protostar::Google::Protobuf::OneofDescriptorProto::init_map])?,
211
+ ?options: (::Protostar::Google::Protobuf::MessageOptions | ::Protostar::Google::Protobuf::MessageOptions::init_map)?,
212
+ ?reserved_range: (::Array[::Protostar::Google::Protobuf::DescriptorProto::ReservedRange | ::Protostar::Google::Protobuf::DescriptorProto::ReservedRange::init_map])?,
213
+ ?reserved_name: ::Array[::String]?,
214
+ ?visibility: (::Protostar::Google::Protobuf::SymbolVisibility::names | ::Integer)?
215
+ ) -> void
216
+
217
+ attr_reader name(): ::String
218
+ attr_writer name(): ::String?
219
+ def has_name?: () -> bool
220
+ def clear_name: () -> void
221
+
222
+ attr_reader field(): ::Array[::Protostar::Google::Protobuf::FieldDescriptorProto]
223
+ attr_writer field(): (::Array[::Protostar::Google::Protobuf::FieldDescriptorProto | ::Protostar::Google::Protobuf::FieldDescriptorProto::init_map])?
224
+
225
+ attr_reader extension(): ::Array[::Protostar::Google::Protobuf::FieldDescriptorProto]
226
+ attr_writer extension(): (::Array[::Protostar::Google::Protobuf::FieldDescriptorProto | ::Protostar::Google::Protobuf::FieldDescriptorProto::init_map])?
227
+
228
+ attr_reader nested_type(): ::Array[::Protostar::Google::Protobuf::DescriptorProto]
229
+ attr_writer nested_type(): (::Array[::Protostar::Google::Protobuf::DescriptorProto | ::Protostar::Google::Protobuf::DescriptorProto::init_map])?
230
+
231
+ attr_reader enum_type(): ::Array[::Protostar::Google::Protobuf::EnumDescriptorProto]
232
+ attr_writer enum_type(): (::Array[::Protostar::Google::Protobuf::EnumDescriptorProto | ::Protostar::Google::Protobuf::EnumDescriptorProto::init_map])?
233
+
234
+ attr_reader extension_range(): ::Array[::Protostar::Google::Protobuf::DescriptorProto::ExtensionRange]
235
+ attr_writer extension_range(): (::Array[::Protostar::Google::Protobuf::DescriptorProto::ExtensionRange | ::Protostar::Google::Protobuf::DescriptorProto::ExtensionRange::init_map])?
236
+
237
+ attr_reader oneof_decl(): ::Array[::Protostar::Google::Protobuf::OneofDescriptorProto]
238
+ attr_writer oneof_decl(): (::Array[::Protostar::Google::Protobuf::OneofDescriptorProto | ::Protostar::Google::Protobuf::OneofDescriptorProto::init_map])?
239
+
240
+ attr_reader options(): ::Protostar::Google::Protobuf::MessageOptions?
241
+ attr_writer options(): (::Protostar::Google::Protobuf::MessageOptions | ::Protostar::Google::Protobuf::MessageOptions::init_map)?
242
+ def has_options?: () -> bool
243
+ def clear_options: () -> void
244
+
245
+ attr_reader reserved_range(): ::Array[::Protostar::Google::Protobuf::DescriptorProto::ReservedRange]
246
+ attr_writer reserved_range(): (::Array[::Protostar::Google::Protobuf::DescriptorProto::ReservedRange | ::Protostar::Google::Protobuf::DescriptorProto::ReservedRange::init_map])?
247
+
248
+ # Reserved field names, which may not be used by fields in the same message.
249
+ # A given name may only be reserved once.
250
+ attr_reader reserved_name(): ::Array[::String]
251
+ attr_writer reserved_name(): ::Array[::String]?
252
+
253
+ # Support for `export` and `local` keywords on enums.
254
+ attr_reader visibility(): ::Protostar::Google::Protobuf::SymbolVisibility::names | ::Integer
255
+ attr_writer visibility(): (::Protostar::Google::Protobuf::SymbolVisibility::names | ::Integer)?
256
+ def has_visibility?: () -> bool
257
+ def clear_visibility: () -> void
258
+ end
259
+
260
+ class ExtensionRangeOptions < ::Protostar::Message
261
+ class Declaration < ::Protostar::Message
262
+ type init_map = {
263
+ ?number: ::Integer?,
264
+ ?full_name: ::String?,
265
+ ?type: ::String?,
266
+ ?reserved: bool?,
267
+ ?repeated: bool?
268
+ }
269
+ def initialize: (
270
+ ?init_map? fields,
271
+ ?number: ::Integer?,
272
+ ?full_name: ::String?,
273
+ ?type: ::String?,
274
+ ?reserved: bool?,
275
+ ?repeated: bool?
276
+ ) -> void
277
+
278
+ # The extension number declared within the extension range.
279
+ attr_reader number(): ::Integer
280
+ attr_writer number(): ::Integer?
281
+ def has_number?: () -> bool
282
+ def clear_number: () -> void
283
+
284
+ # The fully-qualified name of the extension field. There must be a leading
285
+ # dot in front of the full name.
286
+ attr_reader full_name(): ::String
287
+ attr_writer full_name(): ::String?
288
+ def has_full_name?: () -> bool
289
+ def clear_full_name: () -> void
290
+
291
+ # The fully-qualified type name of the extension field. Unlike
292
+ # Metadata.type, Declaration.type must have a leading dot for messages
293
+ # and enums.
294
+ attr_reader type(): ::String
295
+ attr_writer type(): ::String?
296
+ def has_type?: () -> bool
297
+ def clear_type: () -> void
298
+
299
+ # If true, indicates that the number is reserved in the extension range,
300
+ # and any extension field with the number will fail to compile. Set this
301
+ # when a declared extension field is deleted.
302
+ attr_reader reserved(): bool
303
+ attr_writer reserved(): bool?
304
+ def has_reserved?: () -> bool
305
+ def clear_reserved: () -> void
306
+
307
+ # If true, indicates that the extension must be defined as repeated.
308
+ # Otherwise the extension must be defined as optional.
309
+ attr_reader repeated(): bool
310
+ attr_writer repeated(): bool?
311
+ def has_repeated?: () -> bool
312
+ def clear_repeated: () -> void
313
+ end
314
+
315
+ # The verification state of the extension range.
316
+ module VerificationState
317
+ extend ::Protostar::Enum
318
+
319
+ DECLARATION: 0
320
+ UNVERIFIED: 1
321
+
322
+ type names = :DECLARATION | :UNVERIFIED
323
+ end
324
+
325
+ type init_map = {
326
+ ?uninterpreted_option: (::Array[::Protostar::Google::Protobuf::UninterpretedOption | ::Protostar::Google::Protobuf::UninterpretedOption::init_map])?,
327
+ ?declaration: (::Array[::Protostar::Google::Protobuf::ExtensionRangeOptions::Declaration | ::Protostar::Google::Protobuf::ExtensionRangeOptions::Declaration::init_map])?,
328
+ ?features: (::Protostar::Google::Protobuf::FeatureSet | ::Protostar::Google::Protobuf::FeatureSet::init_map)?,
329
+ ?verification: (::Protostar::Google::Protobuf::ExtensionRangeOptions::VerificationState::names | ::Integer)?
330
+ }
331
+ def initialize: (
332
+ ?init_map? fields,
333
+ ?uninterpreted_option: (::Array[::Protostar::Google::Protobuf::UninterpretedOption | ::Protostar::Google::Protobuf::UninterpretedOption::init_map])?,
334
+ ?declaration: (::Array[::Protostar::Google::Protobuf::ExtensionRangeOptions::Declaration | ::Protostar::Google::Protobuf::ExtensionRangeOptions::Declaration::init_map])?,
335
+ ?features: (::Protostar::Google::Protobuf::FeatureSet | ::Protostar::Google::Protobuf::FeatureSet::init_map)?,
336
+ ?verification: (::Protostar::Google::Protobuf::ExtensionRangeOptions::VerificationState::names | ::Integer)?
337
+ ) -> void
338
+
339
+ # The parser stores options it doesn't recognize here. See above.
340
+ attr_reader uninterpreted_option(): ::Array[::Protostar::Google::Protobuf::UninterpretedOption]
341
+ attr_writer uninterpreted_option(): (::Array[::Protostar::Google::Protobuf::UninterpretedOption | ::Protostar::Google::Protobuf::UninterpretedOption::init_map])?
342
+
343
+ # For external users: DO NOT USE. We are in the process of open sourcing
344
+ # extension declaration and executing internal cleanups before it can be
345
+ # used externally.
346
+ attr_reader declaration(): ::Array[::Protostar::Google::Protobuf::ExtensionRangeOptions::Declaration]
347
+ attr_writer declaration(): (::Array[::Protostar::Google::Protobuf::ExtensionRangeOptions::Declaration | ::Protostar::Google::Protobuf::ExtensionRangeOptions::Declaration::init_map])?
348
+
349
+ # Any features defined in the specific edition.
350
+ attr_reader features(): ::Protostar::Google::Protobuf::FeatureSet?
351
+ attr_writer features(): (::Protostar::Google::Protobuf::FeatureSet | ::Protostar::Google::Protobuf::FeatureSet::init_map)?
352
+ def has_features?: () -> bool
353
+ def clear_features: () -> void
354
+
355
+ # The verification state of the range.
356
+ # TODO: flip the default to DECLARATION once all empty ranges
357
+ # are marked as UNVERIFIED.
358
+ attr_reader verification(): ::Protostar::Google::Protobuf::ExtensionRangeOptions::VerificationState::names | ::Integer
359
+ attr_writer verification(): (::Protostar::Google::Protobuf::ExtensionRangeOptions::VerificationState::names | ::Integer)?
360
+ def has_verification?: () -> bool
361
+ def clear_verification: () -> void
362
+ end
363
+
364
+ # Describes a field within a message.
365
+ class FieldDescriptorProto < ::Protostar::Message
366
+ module Type
367
+ extend ::Protostar::Enum
368
+
369
+ TYPE_DOUBLE: 1
370
+ TYPE_FLOAT: 2
371
+ TYPE_INT64: 3
372
+ TYPE_UINT64: 4
373
+ TYPE_INT32: 5
374
+ TYPE_FIXED64: 6
375
+ TYPE_FIXED32: 7
376
+ TYPE_BOOL: 8
377
+ TYPE_STRING: 9
378
+ TYPE_GROUP: 10
379
+ TYPE_MESSAGE: 11
380
+ TYPE_BYTES: 12
381
+ TYPE_UINT32: 13
382
+ TYPE_ENUM: 14
383
+ TYPE_SFIXED32: 15
384
+ TYPE_SFIXED64: 16
385
+ TYPE_SINT32: 17
386
+ TYPE_SINT64: 18
387
+
388
+ type names = :TYPE_DOUBLE | :TYPE_FLOAT | :TYPE_INT64 | :TYPE_UINT64 | :TYPE_INT32 | :TYPE_FIXED64 | :TYPE_FIXED32 | :TYPE_BOOL | :TYPE_STRING | :TYPE_GROUP | :TYPE_MESSAGE | :TYPE_BYTES | :TYPE_UINT32 | :TYPE_ENUM | :TYPE_SFIXED32 | :TYPE_SFIXED64 | :TYPE_SINT32 | :TYPE_SINT64
389
+ end
390
+
391
+ module Label
392
+ extend ::Protostar::Enum
393
+
394
+ LABEL_OPTIONAL: 1
395
+ LABEL_REPEATED: 3
396
+ LABEL_REQUIRED: 2
397
+
398
+ type names = :LABEL_OPTIONAL | :LABEL_REPEATED | :LABEL_REQUIRED
399
+ end
400
+
401
+ type init_map = {
402
+ ?name: ::String?,
403
+ ?number: ::Integer?,
404
+ ?label: (::Protostar::Google::Protobuf::FieldDescriptorProto::Label::names | ::Integer)?,
405
+ ?type: (::Protostar::Google::Protobuf::FieldDescriptorProto::Type::names | ::Integer)?,
406
+ ?type_name: ::String?,
407
+ ?extendee: ::String?,
408
+ ?default_value: ::String?,
409
+ ?oneof_index: ::Integer?,
410
+ ?json_name: ::String?,
411
+ ?options: (::Protostar::Google::Protobuf::FieldOptions | ::Protostar::Google::Protobuf::FieldOptions::init_map)?,
412
+ ?proto3_optional: bool?
413
+ }
414
+ def initialize: (
415
+ ?init_map? fields,
416
+ ?name: ::String?,
417
+ ?number: ::Integer?,
418
+ ?label: (::Protostar::Google::Protobuf::FieldDescriptorProto::Label::names | ::Integer)?,
419
+ ?type: (::Protostar::Google::Protobuf::FieldDescriptorProto::Type::names | ::Integer)?,
420
+ ?type_name: ::String?,
421
+ ?extendee: ::String?,
422
+ ?default_value: ::String?,
423
+ ?oneof_index: ::Integer?,
424
+ ?json_name: ::String?,
425
+ ?options: (::Protostar::Google::Protobuf::FieldOptions | ::Protostar::Google::Protobuf::FieldOptions::init_map)?,
426
+ ?proto3_optional: bool?
427
+ ) -> void
428
+
429
+ attr_reader name(): ::String
430
+ attr_writer name(): ::String?
431
+ def has_name?: () -> bool
432
+ def clear_name: () -> void
433
+
434
+ attr_reader number(): ::Integer
435
+ attr_writer number(): ::Integer?
436
+ def has_number?: () -> bool
437
+ def clear_number: () -> void
438
+
439
+ attr_reader label(): ::Protostar::Google::Protobuf::FieldDescriptorProto::Label::names | ::Integer
440
+ attr_writer label(): (::Protostar::Google::Protobuf::FieldDescriptorProto::Label::names | ::Integer)?
441
+ def has_label?: () -> bool
442
+ def clear_label: () -> void
443
+
444
+ # If type_name is set, this need not be set. If both this and type_name
445
+ # are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
446
+ attr_reader type(): ::Protostar::Google::Protobuf::FieldDescriptorProto::Type::names | ::Integer
447
+ attr_writer type(): (::Protostar::Google::Protobuf::FieldDescriptorProto::Type::names | ::Integer)?
448
+ def has_type?: () -> bool
449
+ def clear_type: () -> void
450
+
451
+ # For message and enum types, this is the name of the type. If the name
452
+ # starts with a '.', it is fully-qualified. Otherwise, C++-like scoping
453
+ # rules are used to find the type (i.e. first the nested types within this
454
+ # message are searched, then within the parent, on up to the root
455
+ # namespace).
456
+ attr_reader type_name(): ::String
457
+ attr_writer type_name(): ::String?
458
+ def has_type_name?: () -> bool
459
+ def clear_type_name: () -> void
460
+
461
+ # For extensions, this is the name of the type being extended. It is
462
+ # resolved in the same manner as type_name.
463
+ attr_reader extendee(): ::String
464
+ attr_writer extendee(): ::String?
465
+ def has_extendee?: () -> bool
466
+ def clear_extendee: () -> void
467
+
468
+ # For numeric types, contains the original text representation of the value.
469
+ # For booleans, "true" or "false".
470
+ # For strings, contains the default text contents (not escaped in any way).
471
+ # For bytes, contains the C escaped value. All bytes >= 128 are escaped.
472
+ attr_reader default_value(): ::String
473
+ attr_writer default_value(): ::String?
474
+ def has_default_value?: () -> bool
475
+ def clear_default_value: () -> void
476
+
477
+ # If set, gives the index of a oneof in the containing type's oneof_decl
478
+ # list. This field is a member of that oneof.
479
+ attr_reader oneof_index(): ::Integer
480
+ attr_writer oneof_index(): ::Integer?
481
+ def has_oneof_index?: () -> bool
482
+ def clear_oneof_index: () -> void
483
+
484
+ # JSON name of this field. The value is set by protocol compiler. If the
485
+ # user has set a "json_name" option on this field, that option's value
486
+ # will be used. Otherwise, it's deduced from the field's name by converting
487
+ # it to camelCase.
488
+ attr_reader json_name(): ::String
489
+ attr_writer json_name(): ::String?
490
+ def has_json_name?: () -> bool
491
+ def clear_json_name: () -> void
492
+
493
+ attr_reader options(): ::Protostar::Google::Protobuf::FieldOptions?
494
+ attr_writer options(): (::Protostar::Google::Protobuf::FieldOptions | ::Protostar::Google::Protobuf::FieldOptions::init_map)?
495
+ def has_options?: () -> bool
496
+ def clear_options: () -> void
497
+
498
+ # If true, this is a proto3 "optional". When a proto3 field is optional, it
499
+ # tracks presence regardless of field type.
500
+ # When proto3_optional is true, this field must belong to a oneof to signal
501
+ # to old proto3 clients that presence is tracked for this field. This oneof
502
+ # is known as a "synthetic" oneof, and this field must be its sole member
503
+ # (each proto3 optional field gets its own synthetic oneof). Synthetic oneofs
504
+ # exist in the descriptor only, and do not generate any API. Synthetic oneofs
505
+ # must be ordered after all "real" oneofs.
506
+ # For message fields, proto3_optional doesn't create any semantic change,
507
+ # since non-repeated message fields always track presence. However it still
508
+ # indicates the semantic detail of whether the user wrote "optional" or not.
509
+ # This can be useful for round-tripping the .proto file. For consistency we
510
+ # give message fields a synthetic oneof also, even though it is not required
511
+ # to track presence. This is especially important because the parser can't
512
+ # tell if a field is a message or an enum, so it must always create a
513
+ # synthetic oneof.
514
+ # Proto2 optional fields do not set this flag, because they already indicate
515
+ # optional with `LABEL_OPTIONAL`.
516
+ attr_reader proto3_optional(): bool
517
+ attr_writer proto3_optional(): bool?
518
+ def has_proto3_optional?: () -> bool
519
+ def clear_proto3_optional: () -> void
520
+ end
521
+
522
+ # Describes a oneof.
523
+ class OneofDescriptorProto < ::Protostar::Message
524
+ type init_map = {
525
+ ?name: ::String?,
526
+ ?options: (::Protostar::Google::Protobuf::OneofOptions | ::Protostar::Google::Protobuf::OneofOptions::init_map)?
527
+ }
528
+ def initialize: (
529
+ ?init_map? fields,
530
+ ?name: ::String?,
531
+ ?options: (::Protostar::Google::Protobuf::OneofOptions | ::Protostar::Google::Protobuf::OneofOptions::init_map)?
532
+ ) -> void
533
+
534
+ attr_reader name(): ::String
535
+ attr_writer name(): ::String?
536
+ def has_name?: () -> bool
537
+ def clear_name: () -> void
538
+
539
+ attr_reader options(): ::Protostar::Google::Protobuf::OneofOptions?
540
+ attr_writer options(): (::Protostar::Google::Protobuf::OneofOptions | ::Protostar::Google::Protobuf::OneofOptions::init_map)?
541
+ def has_options?: () -> bool
542
+ def clear_options: () -> void
543
+ end
544
+
545
+ # Describes an enum type.
546
+ class EnumDescriptorProto < ::Protostar::Message
547
+ # Range of reserved numeric values. Reserved values may not be used by
548
+ # entries in the same enum. Reserved ranges may not overlap.
549
+ # Note that this is distinct from DescriptorProto.ReservedRange in that it
550
+ # is inclusive such that it can appropriately represent the entire int32
551
+ # domain.
552
+ class EnumReservedRange < ::Protostar::Message
553
+ type init_map = {
554
+ ?start: ::Integer?,
555
+ ?end: ::Integer?
556
+ }
557
+ def initialize: (
558
+ ?init_map? fields,
559
+ ?start: ::Integer?,
560
+ ?end: ::Integer?
561
+ ) -> void
562
+
563
+ attr_reader start(): ::Integer
564
+ attr_writer start(): ::Integer?
565
+ def has_start?: () -> bool
566
+ def clear_start: () -> void
567
+
568
+ attr_reader end(): ::Integer
569
+ attr_writer end(): ::Integer?
570
+ def has_end?: () -> bool
571
+ def clear_end: () -> void
572
+ end
573
+
574
+ type init_map = {
575
+ ?name: ::String?,
576
+ ?value: (::Array[::Protostar::Google::Protobuf::EnumValueDescriptorProto | ::Protostar::Google::Protobuf::EnumValueDescriptorProto::init_map])?,
577
+ ?options: (::Protostar::Google::Protobuf::EnumOptions | ::Protostar::Google::Protobuf::EnumOptions::init_map)?,
578
+ ?reserved_range: (::Array[::Protostar::Google::Protobuf::EnumDescriptorProto::EnumReservedRange | ::Protostar::Google::Protobuf::EnumDescriptorProto::EnumReservedRange::init_map])?,
579
+ ?reserved_name: ::Array[::String]?,
580
+ ?visibility: (::Protostar::Google::Protobuf::SymbolVisibility::names | ::Integer)?
581
+ }
582
+ def initialize: (
583
+ ?init_map? fields,
584
+ ?name: ::String?,
585
+ ?value: (::Array[::Protostar::Google::Protobuf::EnumValueDescriptorProto | ::Protostar::Google::Protobuf::EnumValueDescriptorProto::init_map])?,
586
+ ?options: (::Protostar::Google::Protobuf::EnumOptions | ::Protostar::Google::Protobuf::EnumOptions::init_map)?,
587
+ ?reserved_range: (::Array[::Protostar::Google::Protobuf::EnumDescriptorProto::EnumReservedRange | ::Protostar::Google::Protobuf::EnumDescriptorProto::EnumReservedRange::init_map])?,
588
+ ?reserved_name: ::Array[::String]?,
589
+ ?visibility: (::Protostar::Google::Protobuf::SymbolVisibility::names | ::Integer)?
590
+ ) -> void
591
+
592
+ attr_reader name(): ::String
593
+ attr_writer name(): ::String?
594
+ def has_name?: () -> bool
595
+ def clear_name: () -> void
596
+
597
+ attr_reader value(): ::Array[::Protostar::Google::Protobuf::EnumValueDescriptorProto]
598
+ attr_writer value(): (::Array[::Protostar::Google::Protobuf::EnumValueDescriptorProto | ::Protostar::Google::Protobuf::EnumValueDescriptorProto::init_map])?
599
+
600
+ attr_reader options(): ::Protostar::Google::Protobuf::EnumOptions?
601
+ attr_writer options(): (::Protostar::Google::Protobuf::EnumOptions | ::Protostar::Google::Protobuf::EnumOptions::init_map)?
602
+ def has_options?: () -> bool
603
+ def clear_options: () -> void
604
+
605
+ # Range of reserved numeric values. Reserved numeric values may not be used
606
+ # by enum values in the same enum declaration. Reserved ranges may not
607
+ # overlap.
608
+ attr_reader reserved_range(): ::Array[::Protostar::Google::Protobuf::EnumDescriptorProto::EnumReservedRange]
609
+ attr_writer reserved_range(): (::Array[::Protostar::Google::Protobuf::EnumDescriptorProto::EnumReservedRange | ::Protostar::Google::Protobuf::EnumDescriptorProto::EnumReservedRange::init_map])?
610
+
611
+ # Reserved enum value names, which may not be reused. A given name may only
612
+ # be reserved once.
613
+ attr_reader reserved_name(): ::Array[::String]
614
+ attr_writer reserved_name(): ::Array[::String]?
615
+
616
+ # Support for `export` and `local` keywords on enums.
617
+ attr_reader visibility(): ::Protostar::Google::Protobuf::SymbolVisibility::names | ::Integer
618
+ attr_writer visibility(): (::Protostar::Google::Protobuf::SymbolVisibility::names | ::Integer)?
619
+ def has_visibility?: () -> bool
620
+ def clear_visibility: () -> void
621
+ end
622
+
623
+ # Describes a value within an enum.
624
+ class EnumValueDescriptorProto < ::Protostar::Message
625
+ type init_map = {
626
+ ?name: ::String?,
627
+ ?number: ::Integer?,
628
+ ?options: (::Protostar::Google::Protobuf::EnumValueOptions | ::Protostar::Google::Protobuf::EnumValueOptions::init_map)?
629
+ }
630
+ def initialize: (
631
+ ?init_map? fields,
632
+ ?name: ::String?,
633
+ ?number: ::Integer?,
634
+ ?options: (::Protostar::Google::Protobuf::EnumValueOptions | ::Protostar::Google::Protobuf::EnumValueOptions::init_map)?
635
+ ) -> void
636
+
637
+ attr_reader name(): ::String
638
+ attr_writer name(): ::String?
639
+ def has_name?: () -> bool
640
+ def clear_name: () -> void
641
+
642
+ attr_reader number(): ::Integer
643
+ attr_writer number(): ::Integer?
644
+ def has_number?: () -> bool
645
+ def clear_number: () -> void
646
+
647
+ attr_reader options(): ::Protostar::Google::Protobuf::EnumValueOptions?
648
+ attr_writer options(): (::Protostar::Google::Protobuf::EnumValueOptions | ::Protostar::Google::Protobuf::EnumValueOptions::init_map)?
649
+ def has_options?: () -> bool
650
+ def clear_options: () -> void
651
+ end
652
+
653
+ # Describes a service.
654
+ class ServiceDescriptorProto < ::Protostar::Message
655
+ type init_map = {
656
+ ?name: ::String?,
657
+ ?method: (::Array[::Protostar::Google::Protobuf::MethodDescriptorProto | ::Protostar::Google::Protobuf::MethodDescriptorProto::init_map])?,
658
+ ?options: (::Protostar::Google::Protobuf::ServiceOptions | ::Protostar::Google::Protobuf::ServiceOptions::init_map)?
659
+ }
660
+ def initialize: (
661
+ ?init_map? fields,
662
+ ?name: ::String?,
663
+ ?method: (::Array[::Protostar::Google::Protobuf::MethodDescriptorProto | ::Protostar::Google::Protobuf::MethodDescriptorProto::init_map])?,
664
+ ?options: (::Protostar::Google::Protobuf::ServiceOptions | ::Protostar::Google::Protobuf::ServiceOptions::init_map)?
665
+ ) -> void
666
+
667
+ attr_reader name(): ::String
668
+ attr_writer name(): ::String?
669
+ def has_name?: () -> bool
670
+ def clear_name: () -> void
671
+
672
+ attr_writer method(): (::Array[::Protostar::Google::Protobuf::MethodDescriptorProto | ::Protostar::Google::Protobuf::MethodDescriptorProto::init_map])?
673
+
674
+ attr_reader options(): ::Protostar::Google::Protobuf::ServiceOptions?
675
+ attr_writer options(): (::Protostar::Google::Protobuf::ServiceOptions | ::Protostar::Google::Protobuf::ServiceOptions::init_map)?
676
+ def has_options?: () -> bool
677
+ def clear_options: () -> void
678
+ end
679
+
680
+ # Describes a method of a service.
681
+ class MethodDescriptorProto < ::Protostar::Message
682
+ type init_map = {
683
+ ?name: ::String?,
684
+ ?input_type: ::String?,
685
+ ?output_type: ::String?,
686
+ ?options: (::Protostar::Google::Protobuf::MethodOptions | ::Protostar::Google::Protobuf::MethodOptions::init_map)?,
687
+ ?client_streaming: bool?,
688
+ ?server_streaming: bool?
689
+ }
690
+ def initialize: (
691
+ ?init_map? fields,
692
+ ?name: ::String?,
693
+ ?input_type: ::String?,
694
+ ?output_type: ::String?,
695
+ ?options: (::Protostar::Google::Protobuf::MethodOptions | ::Protostar::Google::Protobuf::MethodOptions::init_map)?,
696
+ ?client_streaming: bool?,
697
+ ?server_streaming: bool?
698
+ ) -> void
699
+
700
+ attr_reader name(): ::String
701
+ attr_writer name(): ::String?
702
+ def has_name?: () -> bool
703
+ def clear_name: () -> void
704
+
705
+ # Input and output type names. These are resolved in the same way as
706
+ # FieldDescriptorProto.type_name, but must refer to a message type.
707
+ attr_reader input_type(): ::String
708
+ attr_writer input_type(): ::String?
709
+ def has_input_type?: () -> bool
710
+ def clear_input_type: () -> void
711
+
712
+ attr_reader output_type(): ::String
713
+ attr_writer output_type(): ::String?
714
+ def has_output_type?: () -> bool
715
+ def clear_output_type: () -> void
716
+
717
+ attr_reader options(): ::Protostar::Google::Protobuf::MethodOptions?
718
+ attr_writer options(): (::Protostar::Google::Protobuf::MethodOptions | ::Protostar::Google::Protobuf::MethodOptions::init_map)?
719
+ def has_options?: () -> bool
720
+ def clear_options: () -> void
721
+
722
+ # Identifies if client streams multiple client messages
723
+ attr_reader client_streaming(): bool
724
+ attr_writer client_streaming(): bool?
725
+ def has_client_streaming?: () -> bool
726
+ def clear_client_streaming: () -> void
727
+
728
+ # Identifies if server streams multiple server messages
729
+ attr_reader server_streaming(): bool
730
+ attr_writer server_streaming(): bool?
731
+ def has_server_streaming?: () -> bool
732
+ def clear_server_streaming: () -> void
733
+ end
734
+
735
+ class FileOptions < ::Protostar::Message
736
+ # Generated classes can be optimized for speed or code size.
737
+ module OptimizeMode
738
+ extend ::Protostar::Enum
739
+
740
+ SPEED: 1
741
+ CODE_SIZE: 2
742
+ LITE_RUNTIME: 3
743
+
744
+ type names = :SPEED | :CODE_SIZE | :LITE_RUNTIME
745
+ end
746
+
747
+ type init_map = {
748
+ ?java_package: ::String?,
749
+ ?java_outer_classname: ::String?,
750
+ ?java_multiple_files: bool?,
751
+ ?java_generate_equals_and_hash: bool?,
752
+ ?java_string_check_utf8: bool?,
753
+ ?optimize_for: (::Protostar::Google::Protobuf::FileOptions::OptimizeMode::names | ::Integer)?,
754
+ ?go_package: ::String?,
755
+ ?cc_generic_services: bool?,
756
+ ?java_generic_services: bool?,
757
+ ?py_generic_services: bool?,
758
+ ?deprecated: bool?,
759
+ ?cc_enable_arenas: bool?,
760
+ ?objc_class_prefix: ::String?,
761
+ ?csharp_namespace: ::String?,
762
+ ?swift_prefix: ::String?,
763
+ ?php_class_prefix: ::String?,
764
+ ?php_namespace: ::String?,
765
+ ?php_metadata_namespace: ::String?,
766
+ ?ruby_package: ::String?,
767
+ ?features: (::Protostar::Google::Protobuf::FeatureSet | ::Protostar::Google::Protobuf::FeatureSet::init_map)?,
768
+ ?uninterpreted_option: (::Array[::Protostar::Google::Protobuf::UninterpretedOption | ::Protostar::Google::Protobuf::UninterpretedOption::init_map])?
769
+ }
770
+ def initialize: (
771
+ ?init_map? fields,
772
+ ?java_package: ::String?,
773
+ ?java_outer_classname: ::String?,
774
+ ?java_multiple_files: bool?,
775
+ ?java_generate_equals_and_hash: bool?,
776
+ ?java_string_check_utf8: bool?,
777
+ ?optimize_for: (::Protostar::Google::Protobuf::FileOptions::OptimizeMode::names | ::Integer)?,
778
+ ?go_package: ::String?,
779
+ ?cc_generic_services: bool?,
780
+ ?java_generic_services: bool?,
781
+ ?py_generic_services: bool?,
782
+ ?deprecated: bool?,
783
+ ?cc_enable_arenas: bool?,
784
+ ?objc_class_prefix: ::String?,
785
+ ?csharp_namespace: ::String?,
786
+ ?swift_prefix: ::String?,
787
+ ?php_class_prefix: ::String?,
788
+ ?php_namespace: ::String?,
789
+ ?php_metadata_namespace: ::String?,
790
+ ?ruby_package: ::String?,
791
+ ?features: (::Protostar::Google::Protobuf::FeatureSet | ::Protostar::Google::Protobuf::FeatureSet::init_map)?,
792
+ ?uninterpreted_option: (::Array[::Protostar::Google::Protobuf::UninterpretedOption | ::Protostar::Google::Protobuf::UninterpretedOption::init_map])?
793
+ ) -> void
794
+
795
+ # Sets the Java package where classes generated from this .proto will be
796
+ # placed. By default, the proto package is used, but this is often
797
+ # inappropriate because proto packages do not normally start with backwards
798
+ # domain names.
799
+ attr_reader java_package(): ::String
800
+ attr_writer java_package(): ::String?
801
+ def has_java_package?: () -> bool
802
+ def clear_java_package: () -> void
803
+
804
+ # Controls the name of the wrapper Java class generated for the .proto file.
805
+ # That class will always contain the .proto file's getDescriptor() method as
806
+ # well as any top-level extensions defined in the .proto file.
807
+ # If java_multiple_files is disabled, then all the other classes from the
808
+ # .proto file will be nested inside the single wrapper outer class.
809
+ attr_reader java_outer_classname(): ::String
810
+ attr_writer java_outer_classname(): ::String?
811
+ def has_java_outer_classname?: () -> bool
812
+ def clear_java_outer_classname: () -> void
813
+
814
+ # If enabled, then the Java code generator will generate a separate .java
815
+ # file for each top-level message, enum, and service defined in the .proto
816
+ # file. Thus, these types will *not* be nested inside the wrapper class
817
+ # named by java_outer_classname. However, the wrapper class will still be
818
+ # generated to contain the file's getDescriptor() method as well as any
819
+ # top-level extensions defined in the file.
820
+ attr_reader java_multiple_files(): bool
821
+ attr_writer java_multiple_files(): bool?
822
+ def has_java_multiple_files?: () -> bool
823
+ def clear_java_multiple_files: () -> void
824
+
825
+ # This option does nothing.
826
+ attr_reader java_generate_equals_and_hash(): bool
827
+ attr_writer java_generate_equals_and_hash(): bool?
828
+ def has_java_generate_equals_and_hash?: () -> bool
829
+ def clear_java_generate_equals_and_hash: () -> void
830
+
831
+ # A proto2 file can set this to true to opt in to UTF-8 checking for Java,
832
+ # which will throw an exception if invalid UTF-8 is parsed from the wire or
833
+ # assigned to a string field.
834
+ # TODO: clarify exactly what kinds of field types this option
835
+ # applies to, and update these docs accordingly.
836
+ # Proto3 files already perform these checks. Setting the option explicitly to
837
+ # false has no effect: it cannot be used to opt proto3 files out of UTF-8
838
+ # checks.
839
+ attr_reader java_string_check_utf8(): bool
840
+ attr_writer java_string_check_utf8(): bool?
841
+ def has_java_string_check_utf8?: () -> bool
842
+ def clear_java_string_check_utf8: () -> void
843
+
844
+ attr_reader optimize_for(): ::Protostar::Google::Protobuf::FileOptions::OptimizeMode::names | ::Integer
845
+ attr_writer optimize_for(): (::Protostar::Google::Protobuf::FileOptions::OptimizeMode::names | ::Integer)?
846
+ def has_optimize_for?: () -> bool
847
+ def clear_optimize_for: () -> void
848
+
849
+ # Sets the Go package where structs generated from this .proto will be
850
+ # placed. If omitted, the Go package will be derived from the following:
851
+ # - The basename of the package import path, if provided.
852
+ # - Otherwise, the package statement in the .proto file, if present.
853
+ # - Otherwise, the basename of the .proto file, without extension.
854
+ attr_reader go_package(): ::String
855
+ attr_writer go_package(): ::String?
856
+ def has_go_package?: () -> bool
857
+ def clear_go_package: () -> void
858
+
859
+ # Should generic services be generated in each language? "Generic" services
860
+ # are not specific to any particular RPC system. They are generated by the
861
+ # main code generators in each language (without additional plugins).
862
+ # Generic services were the only kind of service generation supported by
863
+ # early versions of google.protobuf.
864
+ # Generic services are now considered deprecated in favor of using plugins
865
+ # that generate code specific to your particular RPC system. Therefore,
866
+ # these default to false. Old code which depends on generic services should
867
+ # explicitly set them to true.
868
+ attr_reader cc_generic_services(): bool
869
+ attr_writer cc_generic_services(): bool?
870
+ def has_cc_generic_services?: () -> bool
871
+ def clear_cc_generic_services: () -> void
872
+
873
+ attr_reader java_generic_services(): bool
874
+ attr_writer java_generic_services(): bool?
875
+ def has_java_generic_services?: () -> bool
876
+ def clear_java_generic_services: () -> void
877
+
878
+ attr_reader py_generic_services(): bool
879
+ attr_writer py_generic_services(): bool?
880
+ def has_py_generic_services?: () -> bool
881
+ def clear_py_generic_services: () -> void
882
+
883
+ # Is this file deprecated?
884
+ # Depending on the target platform, this can emit Deprecated annotations
885
+ # for everything in the file, or it will be completely ignored; in the very
886
+ # least, this is a formalization for deprecating files.
887
+ attr_reader deprecated(): bool
888
+ attr_writer deprecated(): bool?
889
+ def has_deprecated?: () -> bool
890
+ def clear_deprecated: () -> void
891
+
892
+ # Enables the use of arenas for the proto messages in this file. This applies
893
+ # only to generated classes for C++.
894
+ attr_reader cc_enable_arenas(): bool
895
+ attr_writer cc_enable_arenas(): bool?
896
+ def has_cc_enable_arenas?: () -> bool
897
+ def clear_cc_enable_arenas: () -> void
898
+
899
+ # Sets the objective c class prefix which is prepended to all objective c
900
+ # generated classes from this .proto. There is no default.
901
+ attr_reader objc_class_prefix(): ::String
902
+ attr_writer objc_class_prefix(): ::String?
903
+ def has_objc_class_prefix?: () -> bool
904
+ def clear_objc_class_prefix: () -> void
905
+
906
+ # Namespace for generated classes; defaults to the package.
907
+ attr_reader csharp_namespace(): ::String
908
+ attr_writer csharp_namespace(): ::String?
909
+ def has_csharp_namespace?: () -> bool
910
+ def clear_csharp_namespace: () -> void
911
+
912
+ # By default Swift generators will take the proto package and CamelCase it
913
+ # replacing '.' with underscore and use that to prefix the types/symbols
914
+ # defined. When this options is provided, they will use this value instead
915
+ # to prefix the types/symbols defined.
916
+ attr_reader swift_prefix(): ::String
917
+ attr_writer swift_prefix(): ::String?
918
+ def has_swift_prefix?: () -> bool
919
+ def clear_swift_prefix: () -> void
920
+
921
+ # Sets the php class prefix which is prepended to all php generated classes
922
+ # from this .proto. Default is empty.
923
+ attr_reader php_class_prefix(): ::String
924
+ attr_writer php_class_prefix(): ::String?
925
+ def has_php_class_prefix?: () -> bool
926
+ def clear_php_class_prefix: () -> void
927
+
928
+ # Use this option to change the namespace of php generated classes. Default
929
+ # is empty. When this option is empty, the package name will be used for
930
+ # determining the namespace.
931
+ attr_reader php_namespace(): ::String
932
+ attr_writer php_namespace(): ::String?
933
+ def has_php_namespace?: () -> bool
934
+ def clear_php_namespace: () -> void
935
+
936
+ # Use this option to change the namespace of php generated metadata classes.
937
+ # Default is empty. When this option is empty, the proto file name will be
938
+ # used for determining the namespace.
939
+ attr_reader php_metadata_namespace(): ::String
940
+ attr_writer php_metadata_namespace(): ::String?
941
+ def has_php_metadata_namespace?: () -> bool
942
+ def clear_php_metadata_namespace: () -> void
943
+
944
+ # Use this option to change the package of ruby generated classes. Default
945
+ # is empty. When this option is not set, the package name will be used for
946
+ # determining the ruby package.
947
+ attr_reader ruby_package(): ::String
948
+ attr_writer ruby_package(): ::String?
949
+ def has_ruby_package?: () -> bool
950
+ def clear_ruby_package: () -> void
951
+
952
+ # Any features defined in the specific edition.
953
+ # WARNING: This field should only be used by protobuf plugins or special
954
+ # cases like the proto compiler. Other uses are discouraged and
955
+ # developers should rely on the protoreflect APIs for their client language.
956
+ attr_reader features(): ::Protostar::Google::Protobuf::FeatureSet?
957
+ attr_writer features(): (::Protostar::Google::Protobuf::FeatureSet | ::Protostar::Google::Protobuf::FeatureSet::init_map)?
958
+ def has_features?: () -> bool
959
+ def clear_features: () -> void
960
+
961
+ # The parser stores options it doesn't recognize here.
962
+ # See the documentation for the "Options" section above.
963
+ attr_reader uninterpreted_option(): ::Array[::Protostar::Google::Protobuf::UninterpretedOption]
964
+ attr_writer uninterpreted_option(): (::Array[::Protostar::Google::Protobuf::UninterpretedOption | ::Protostar::Google::Protobuf::UninterpretedOption::init_map])?
965
+ end
966
+
967
+ class MessageOptions < ::Protostar::Message
968
+ type init_map = {
969
+ ?message_set_wire_format: bool?,
970
+ ?no_standard_descriptor_accessor: bool?,
971
+ ?deprecated: bool?,
972
+ ?map_entry: bool?,
973
+ ?deprecated_legacy_json_field_conflicts: bool?,
974
+ ?features: (::Protostar::Google::Protobuf::FeatureSet | ::Protostar::Google::Protobuf::FeatureSet::init_map)?,
975
+ ?uninterpreted_option: (::Array[::Protostar::Google::Protobuf::UninterpretedOption | ::Protostar::Google::Protobuf::UninterpretedOption::init_map])?
976
+ }
977
+ def initialize: (
978
+ ?init_map? fields,
979
+ ?message_set_wire_format: bool?,
980
+ ?no_standard_descriptor_accessor: bool?,
981
+ ?deprecated: bool?,
982
+ ?map_entry: bool?,
983
+ ?deprecated_legacy_json_field_conflicts: bool?,
984
+ ?features: (::Protostar::Google::Protobuf::FeatureSet | ::Protostar::Google::Protobuf::FeatureSet::init_map)?,
985
+ ?uninterpreted_option: (::Array[::Protostar::Google::Protobuf::UninterpretedOption | ::Protostar::Google::Protobuf::UninterpretedOption::init_map])?
986
+ ) -> void
987
+
988
+ # Set true to use the old proto1 MessageSet wire format for extensions.
989
+ # This is provided for backwards-compatibility with the MessageSet wire
990
+ # format. You should not use this for any other reason: It's less
991
+ # efficient, has fewer features, and is more complicated.
992
+ # The message must be defined exactly as follows:
993
+ # message Foo {
994
+ # option message_set_wire_format = true;
995
+ # extensions 4 to max;
996
+ # }
997
+ # Note that the message cannot have any defined fields; MessageSets only
998
+ # have extensions.
999
+ # All extensions of your type must be singular messages; e.g. they cannot
1000
+ # be int32s, enums, or repeated messages.
1001
+ # Because this is an option, the above two restrictions are not enforced by
1002
+ # the protocol compiler.
1003
+ attr_reader message_set_wire_format(): bool
1004
+ attr_writer message_set_wire_format(): bool?
1005
+ def has_message_set_wire_format?: () -> bool
1006
+ def clear_message_set_wire_format: () -> void
1007
+
1008
+ # Disables the generation of the standard "descriptor()" accessor, which can
1009
+ # conflict with a field of the same name. This is meant to make migration
1010
+ # from proto1 easier; new code should avoid fields named "descriptor".
1011
+ attr_reader no_standard_descriptor_accessor(): bool
1012
+ attr_writer no_standard_descriptor_accessor(): bool?
1013
+ def has_no_standard_descriptor_accessor?: () -> bool
1014
+ def clear_no_standard_descriptor_accessor: () -> void
1015
+
1016
+ # Is this message deprecated?
1017
+ # Depending on the target platform, this can emit Deprecated annotations
1018
+ # for the message, or it will be completely ignored; in the very least,
1019
+ # this is a formalization for deprecating messages.
1020
+ attr_reader deprecated(): bool
1021
+ attr_writer deprecated(): bool?
1022
+ def has_deprecated?: () -> bool
1023
+ def clear_deprecated: () -> void
1024
+
1025
+ # Whether the message is an automatically generated map entry type for the
1026
+ # maps field.
1027
+ # For maps fields:
1028
+ # map<KeyType, ValueType> map_field = 1;
1029
+ # The parsed descriptor looks like:
1030
+ # message MapFieldEntry {
1031
+ # option map_entry = true;
1032
+ # optional KeyType key = 1;
1033
+ # optional ValueType value = 2;
1034
+ # }
1035
+ # repeated MapFieldEntry map_field = 1;
1036
+ # Implementations may choose not to generate the map_entry=true message, but
1037
+ # use a native map in the target language to hold the keys and values.
1038
+ # The reflection APIs in such implementations still need to work as
1039
+ # if the field is a repeated message field.
1040
+ # NOTE: Do not set the option in .proto files. Always use the maps syntax
1041
+ # instead. The option should only be implicitly set by the proto compiler
1042
+ # parser.
1043
+ attr_reader map_entry(): bool
1044
+ attr_writer map_entry(): bool?
1045
+ def has_map_entry?: () -> bool
1046
+ def clear_map_entry: () -> void
1047
+
1048
+ # Enable the legacy handling of JSON field name conflicts. This lowercases
1049
+ # and strips underscored from the fields before comparison in proto3 only.
1050
+ # The new behavior takes `json_name` into account and applies to proto2 as
1051
+ # well.
1052
+ # This should only be used as a temporary measure against broken builds due
1053
+ # to the change in behavior for JSON field name conflicts.
1054
+ # TODO This is legacy behavior we plan to remove once downstream
1055
+ # teams have had time to migrate.
1056
+ attr_reader deprecated_legacy_json_field_conflicts(): bool
1057
+ attr_writer deprecated_legacy_json_field_conflicts(): bool?
1058
+ def has_deprecated_legacy_json_field_conflicts?: () -> bool
1059
+ def clear_deprecated_legacy_json_field_conflicts: () -> void
1060
+
1061
+ # Any features defined in the specific edition.
1062
+ # WARNING: This field should only be used by protobuf plugins or special
1063
+ # cases like the proto compiler. Other uses are discouraged and
1064
+ # developers should rely on the protoreflect APIs for their client language.
1065
+ attr_reader features(): ::Protostar::Google::Protobuf::FeatureSet?
1066
+ attr_writer features(): (::Protostar::Google::Protobuf::FeatureSet | ::Protostar::Google::Protobuf::FeatureSet::init_map)?
1067
+ def has_features?: () -> bool
1068
+ def clear_features: () -> void
1069
+
1070
+ # The parser stores options it doesn't recognize here. See above.
1071
+ attr_reader uninterpreted_option(): ::Array[::Protostar::Google::Protobuf::UninterpretedOption]
1072
+ attr_writer uninterpreted_option(): (::Array[::Protostar::Google::Protobuf::UninterpretedOption | ::Protostar::Google::Protobuf::UninterpretedOption::init_map])?
1073
+ end
1074
+
1075
+ class FieldOptions < ::Protostar::Message
1076
+ class EditionDefault < ::Protostar::Message
1077
+ type init_map = {
1078
+ ?edition: (::Protostar::Google::Protobuf::Edition::names | ::Integer)?,
1079
+ ?value: ::String?
1080
+ }
1081
+ def initialize: (
1082
+ ?init_map? fields,
1083
+ ?edition: (::Protostar::Google::Protobuf::Edition::names | ::Integer)?,
1084
+ ?value: ::String?
1085
+ ) -> void
1086
+
1087
+ attr_reader edition(): ::Protostar::Google::Protobuf::Edition::names | ::Integer
1088
+ attr_writer edition(): (::Protostar::Google::Protobuf::Edition::names | ::Integer)?
1089
+ def has_edition?: () -> bool
1090
+ def clear_edition: () -> void
1091
+
1092
+ attr_reader value(): ::String
1093
+ attr_writer value(): ::String?
1094
+ def has_value?: () -> bool
1095
+ def clear_value: () -> void
1096
+ end
1097
+
1098
+ # Information about the support window of a feature.
1099
+ class FeatureSupport < ::Protostar::Message
1100
+ type init_map = {
1101
+ ?edition_introduced: (::Protostar::Google::Protobuf::Edition::names | ::Integer)?,
1102
+ ?edition_deprecated: (::Protostar::Google::Protobuf::Edition::names | ::Integer)?,
1103
+ ?deprecation_warning: ::String?,
1104
+ ?edition_removed: (::Protostar::Google::Protobuf::Edition::names | ::Integer)?,
1105
+ ?removal_error: ::String?
1106
+ }
1107
+ def initialize: (
1108
+ ?init_map? fields,
1109
+ ?edition_introduced: (::Protostar::Google::Protobuf::Edition::names | ::Integer)?,
1110
+ ?edition_deprecated: (::Protostar::Google::Protobuf::Edition::names | ::Integer)?,
1111
+ ?deprecation_warning: ::String?,
1112
+ ?edition_removed: (::Protostar::Google::Protobuf::Edition::names | ::Integer)?,
1113
+ ?removal_error: ::String?
1114
+ ) -> void
1115
+
1116
+ # The edition that this feature was first available in. In editions
1117
+ # earlier than this one, the default assigned to EDITION_LEGACY will be
1118
+ # used, and proto files will not be able to override it.
1119
+ attr_reader edition_introduced(): ::Protostar::Google::Protobuf::Edition::names | ::Integer
1120
+ attr_writer edition_introduced(): (::Protostar::Google::Protobuf::Edition::names | ::Integer)?
1121
+ def has_edition_introduced?: () -> bool
1122
+ def clear_edition_introduced: () -> void
1123
+
1124
+ # The edition this feature becomes deprecated in. Using this after this
1125
+ # edition may trigger warnings.
1126
+ attr_reader edition_deprecated(): ::Protostar::Google::Protobuf::Edition::names | ::Integer
1127
+ attr_writer edition_deprecated(): (::Protostar::Google::Protobuf::Edition::names | ::Integer)?
1128
+ def has_edition_deprecated?: () -> bool
1129
+ def clear_edition_deprecated: () -> void
1130
+
1131
+ # The deprecation warning text if this feature is used after the edition it
1132
+ # was marked deprecated in.
1133
+ attr_reader deprecation_warning(): ::String
1134
+ attr_writer deprecation_warning(): ::String?
1135
+ def has_deprecation_warning?: () -> bool
1136
+ def clear_deprecation_warning: () -> void
1137
+
1138
+ # The edition this feature is no longer available in. In editions after
1139
+ # this one, the last default assigned will be used, and proto files will
1140
+ # not be able to override it.
1141
+ attr_reader edition_removed(): ::Protostar::Google::Protobuf::Edition::names | ::Integer
1142
+ attr_writer edition_removed(): (::Protostar::Google::Protobuf::Edition::names | ::Integer)?
1143
+ def has_edition_removed?: () -> bool
1144
+ def clear_edition_removed: () -> void
1145
+
1146
+ # The removal error text if this feature is used after the edition it was
1147
+ # removed in.
1148
+ attr_reader removal_error(): ::String
1149
+ attr_writer removal_error(): ::String?
1150
+ def has_removal_error?: () -> bool
1151
+ def clear_removal_error: () -> void
1152
+ end
1153
+
1154
+ module CType
1155
+ extend ::Protostar::Enum
1156
+
1157
+ STRING: 0
1158
+ CORD: 1
1159
+ STRING_PIECE: 2
1160
+
1161
+ type names = :STRING | :CORD | :STRING_PIECE
1162
+ end
1163
+
1164
+ module JSType
1165
+ extend ::Protostar::Enum
1166
+
1167
+ JS_NORMAL: 0
1168
+ JS_STRING: 1
1169
+ JS_NUMBER: 2
1170
+
1171
+ type names = :JS_NORMAL | :JS_STRING | :JS_NUMBER
1172
+ end
1173
+
1174
+ # If set to RETENTION_SOURCE, the option will be omitted from the binary.
1175
+ module OptionRetention
1176
+ extend ::Protostar::Enum
1177
+
1178
+ RETENTION_UNKNOWN: 0
1179
+ RETENTION_RUNTIME: 1
1180
+ RETENTION_SOURCE: 2
1181
+
1182
+ type names = :RETENTION_UNKNOWN | :RETENTION_RUNTIME | :RETENTION_SOURCE
1183
+ end
1184
+
1185
+ # This indicates the types of entities that the field may apply to when used
1186
+ # as an option. If it is unset, then the field may be freely used as an
1187
+ # option on any kind of entity.
1188
+ module OptionTargetType
1189
+ extend ::Protostar::Enum
1190
+
1191
+ TARGET_TYPE_UNKNOWN: 0
1192
+ TARGET_TYPE_FILE: 1
1193
+ TARGET_TYPE_EXTENSION_RANGE: 2
1194
+ TARGET_TYPE_MESSAGE: 3
1195
+ TARGET_TYPE_FIELD: 4
1196
+ TARGET_TYPE_ONEOF: 5
1197
+ TARGET_TYPE_ENUM: 6
1198
+ TARGET_TYPE_ENUM_ENTRY: 7
1199
+ TARGET_TYPE_SERVICE: 8
1200
+ TARGET_TYPE_METHOD: 9
1201
+
1202
+ type names = :TARGET_TYPE_UNKNOWN | :TARGET_TYPE_FILE | :TARGET_TYPE_EXTENSION_RANGE | :TARGET_TYPE_MESSAGE | :TARGET_TYPE_FIELD | :TARGET_TYPE_ONEOF | :TARGET_TYPE_ENUM | :TARGET_TYPE_ENUM_ENTRY | :TARGET_TYPE_SERVICE | :TARGET_TYPE_METHOD
1203
+ end
1204
+
1205
+ type init_map = {
1206
+ ?ctype: (::Protostar::Google::Protobuf::FieldOptions::CType::names | ::Integer)?,
1207
+ ?packed: bool?,
1208
+ ?jstype: (::Protostar::Google::Protobuf::FieldOptions::JSType::names | ::Integer)?,
1209
+ ?lazy: bool?,
1210
+ ?unverified_lazy: bool?,
1211
+ ?deprecated: bool?,
1212
+ ?weak: bool?,
1213
+ ?debug_redact: bool?,
1214
+ ?retention: (::Protostar::Google::Protobuf::FieldOptions::OptionRetention::names | ::Integer)?,
1215
+ ?targets: (::Array[::Protostar::Google::Protobuf::FieldOptions::OptionTargetType::names | ::Integer])?,
1216
+ ?edition_defaults: (::Array[::Protostar::Google::Protobuf::FieldOptions::EditionDefault | ::Protostar::Google::Protobuf::FieldOptions::EditionDefault::init_map])?,
1217
+ ?features: (::Protostar::Google::Protobuf::FeatureSet | ::Protostar::Google::Protobuf::FeatureSet::init_map)?,
1218
+ ?feature_support: (::Protostar::Google::Protobuf::FieldOptions::FeatureSupport | ::Protostar::Google::Protobuf::FieldOptions::FeatureSupport::init_map)?,
1219
+ ?uninterpreted_option: (::Array[::Protostar::Google::Protobuf::UninterpretedOption | ::Protostar::Google::Protobuf::UninterpretedOption::init_map])?
1220
+ }
1221
+ def initialize: (
1222
+ ?init_map? fields,
1223
+ ?ctype: (::Protostar::Google::Protobuf::FieldOptions::CType::names | ::Integer)?,
1224
+ ?packed: bool?,
1225
+ ?jstype: (::Protostar::Google::Protobuf::FieldOptions::JSType::names | ::Integer)?,
1226
+ ?lazy: bool?,
1227
+ ?unverified_lazy: bool?,
1228
+ ?deprecated: bool?,
1229
+ ?weak: bool?,
1230
+ ?debug_redact: bool?,
1231
+ ?retention: (::Protostar::Google::Protobuf::FieldOptions::OptionRetention::names | ::Integer)?,
1232
+ ?targets: (::Array[::Protostar::Google::Protobuf::FieldOptions::OptionTargetType::names | ::Integer])?,
1233
+ ?edition_defaults: (::Array[::Protostar::Google::Protobuf::FieldOptions::EditionDefault | ::Protostar::Google::Protobuf::FieldOptions::EditionDefault::init_map])?,
1234
+ ?features: (::Protostar::Google::Protobuf::FeatureSet | ::Protostar::Google::Protobuf::FeatureSet::init_map)?,
1235
+ ?feature_support: (::Protostar::Google::Protobuf::FieldOptions::FeatureSupport | ::Protostar::Google::Protobuf::FieldOptions::FeatureSupport::init_map)?,
1236
+ ?uninterpreted_option: (::Array[::Protostar::Google::Protobuf::UninterpretedOption | ::Protostar::Google::Protobuf::UninterpretedOption::init_map])?
1237
+ ) -> void
1238
+
1239
+ # NOTE: ctype is deprecated. Use `features.(pb.cpp).string_type` instead.
1240
+ # The ctype option instructs the C++ code generator to use a different
1241
+ # representation of the field than it normally would. See the specific
1242
+ # options below. This option is only implemented to support use of
1243
+ # [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of
1244
+ # type "bytes" in the open source release.
1245
+ # TODO: make ctype actually deprecated.
1246
+ attr_reader ctype(): ::Protostar::Google::Protobuf::FieldOptions::CType::names | ::Integer
1247
+ attr_writer ctype(): (::Protostar::Google::Protobuf::FieldOptions::CType::names | ::Integer)?
1248
+ def has_ctype?: () -> bool
1249
+ def clear_ctype: () -> void
1250
+
1251
+ # The packed option can be enabled for repeated primitive fields to enable
1252
+ # a more efficient representation on the wire. Rather than repeatedly
1253
+ # writing the tag and type for each element, the entire array is encoded as
1254
+ # a single length-delimited blob. In proto3, only explicit setting it to
1255
+ # false will avoid using packed encoding. This option is prohibited in
1256
+ # Editions, but the `repeated_field_encoding` feature can be used to control
1257
+ # the behavior.
1258
+ attr_reader packed(): bool
1259
+ attr_writer packed(): bool?
1260
+ def has_packed?: () -> bool
1261
+ def clear_packed: () -> void
1262
+
1263
+ # The jstype option determines the JavaScript type used for values of the
1264
+ # field. The option is permitted only for 64 bit integral and fixed types
1265
+ # (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING
1266
+ # is represented as JavaScript string, which avoids loss of precision that
1267
+ # can happen when a large value is converted to a floating point JavaScript.
1268
+ # Specifying JS_NUMBER for the jstype causes the generated JavaScript code to
1269
+ # use the JavaScript "number" type. The behavior of the default option
1270
+ # JS_NORMAL is implementation dependent.
1271
+ # This option is an enum to permit additional types to be added, e.g.
1272
+ # goog.math.Integer.
1273
+ attr_reader jstype(): ::Protostar::Google::Protobuf::FieldOptions::JSType::names | ::Integer
1274
+ attr_writer jstype(): (::Protostar::Google::Protobuf::FieldOptions::JSType::names | ::Integer)?
1275
+ def has_jstype?: () -> bool
1276
+ def clear_jstype: () -> void
1277
+
1278
+ # Should this field be parsed lazily? Lazy applies only to message-type
1279
+ # fields. It means that when the outer message is initially parsed, the
1280
+ # inner message's contents will not be parsed but instead stored in encoded
1281
+ # form. The inner message will actually be parsed when it is first accessed.
1282
+ # This is only a hint. Implementations are free to choose whether to use
1283
+ # eager or lazy parsing regardless of the value of this option. However,
1284
+ # setting this option true suggests that the protocol author believes that
1285
+ # using lazy parsing on this field is worth the additional bookkeeping
1286
+ # overhead typically needed to implement it.
1287
+ # This option does not affect the public interface of any generated code;
1288
+ # all method signatures remain the same. Furthermore, thread-safety of the
1289
+ # interface is not affected by this option; const methods remain safe to
1290
+ # call from multiple threads concurrently, while non-const methods continue
1291
+ # to require exclusive access.
1292
+ # Note that lazy message fields are still eagerly verified to check
1293
+ # ill-formed wireformat or missing required fields. Calling IsInitialized()
1294
+ # on the outer message would fail if the inner message has missing required
1295
+ # fields. Failed verification would result in parsing failure (except when
1296
+ # uninitialized messages are acceptable).
1297
+ attr_reader lazy(): bool
1298
+ attr_writer lazy(): bool?
1299
+ def has_lazy?: () -> bool
1300
+ def clear_lazy: () -> void
1301
+
1302
+ # unverified_lazy does no correctness checks on the byte stream. This should
1303
+ # only be used where lazy with verification is prohibitive for performance
1304
+ # reasons.
1305
+ attr_reader unverified_lazy(): bool
1306
+ attr_writer unverified_lazy(): bool?
1307
+ def has_unverified_lazy?: () -> bool
1308
+ def clear_unverified_lazy: () -> void
1309
+
1310
+ # Is this field deprecated?
1311
+ # Depending on the target platform, this can emit Deprecated annotations
1312
+ # for accessors, or it will be completely ignored; in the very least, this
1313
+ # is a formalization for deprecating fields.
1314
+ attr_reader deprecated(): bool
1315
+ attr_writer deprecated(): bool?
1316
+ def has_deprecated?: () -> bool
1317
+ def clear_deprecated: () -> void
1318
+
1319
+ # DEPRECATED. DO NOT USE!
1320
+ # For Google-internal migration only. Do not use.
1321
+ attr_reader weak(): bool
1322
+ attr_writer weak(): bool?
1323
+ def has_weak?: () -> bool
1324
+ def clear_weak: () -> void
1325
+
1326
+ # Indicate that the field value should not be printed out when using debug
1327
+ # formats, e.g. when the field contains sensitive credentials.
1328
+ attr_reader debug_redact(): bool
1329
+ attr_writer debug_redact(): bool?
1330
+ def has_debug_redact?: () -> bool
1331
+ def clear_debug_redact: () -> void
1332
+
1333
+ attr_reader retention(): ::Protostar::Google::Protobuf::FieldOptions::OptionRetention::names | ::Integer
1334
+ attr_writer retention(): (::Protostar::Google::Protobuf::FieldOptions::OptionRetention::names | ::Integer)?
1335
+ def has_retention?: () -> bool
1336
+ def clear_retention: () -> void
1337
+
1338
+ attr_reader targets(): ::Array[::Protostar::Google::Protobuf::FieldOptions::OptionTargetType::names | ::Integer]
1339
+ attr_writer targets(): (::Array[::Protostar::Google::Protobuf::FieldOptions::OptionTargetType::names | ::Integer])?
1340
+
1341
+ attr_reader edition_defaults(): ::Array[::Protostar::Google::Protobuf::FieldOptions::EditionDefault]
1342
+ attr_writer edition_defaults(): (::Array[::Protostar::Google::Protobuf::FieldOptions::EditionDefault | ::Protostar::Google::Protobuf::FieldOptions::EditionDefault::init_map])?
1343
+
1344
+ # Any features defined in the specific edition.
1345
+ # WARNING: This field should only be used by protobuf plugins or special
1346
+ # cases like the proto compiler. Other uses are discouraged and
1347
+ # developers should rely on the protoreflect APIs for their client language.
1348
+ attr_reader features(): ::Protostar::Google::Protobuf::FeatureSet?
1349
+ attr_writer features(): (::Protostar::Google::Protobuf::FeatureSet | ::Protostar::Google::Protobuf::FeatureSet::init_map)?
1350
+ def has_features?: () -> bool
1351
+ def clear_features: () -> void
1352
+
1353
+ attr_reader feature_support(): ::Protostar::Google::Protobuf::FieldOptions::FeatureSupport?
1354
+ attr_writer feature_support(): (::Protostar::Google::Protobuf::FieldOptions::FeatureSupport | ::Protostar::Google::Protobuf::FieldOptions::FeatureSupport::init_map)?
1355
+ def has_feature_support?: () -> bool
1356
+ def clear_feature_support: () -> void
1357
+
1358
+ # The parser stores options it doesn't recognize here. See above.
1359
+ attr_reader uninterpreted_option(): ::Array[::Protostar::Google::Protobuf::UninterpretedOption]
1360
+ attr_writer uninterpreted_option(): (::Array[::Protostar::Google::Protobuf::UninterpretedOption | ::Protostar::Google::Protobuf::UninterpretedOption::init_map])?
1361
+ end
1362
+
1363
+ class OneofOptions < ::Protostar::Message
1364
+ type init_map = {
1365
+ ?features: (::Protostar::Google::Protobuf::FeatureSet | ::Protostar::Google::Protobuf::FeatureSet::init_map)?,
1366
+ ?uninterpreted_option: (::Array[::Protostar::Google::Protobuf::UninterpretedOption | ::Protostar::Google::Protobuf::UninterpretedOption::init_map])?
1367
+ }
1368
+ def initialize: (
1369
+ ?init_map? fields,
1370
+ ?features: (::Protostar::Google::Protobuf::FeatureSet | ::Protostar::Google::Protobuf::FeatureSet::init_map)?,
1371
+ ?uninterpreted_option: (::Array[::Protostar::Google::Protobuf::UninterpretedOption | ::Protostar::Google::Protobuf::UninterpretedOption::init_map])?
1372
+ ) -> void
1373
+
1374
+ # Any features defined in the specific edition.
1375
+ # WARNING: This field should only be used by protobuf plugins or special
1376
+ # cases like the proto compiler. Other uses are discouraged and
1377
+ # developers should rely on the protoreflect APIs for their client language.
1378
+ attr_reader features(): ::Protostar::Google::Protobuf::FeatureSet?
1379
+ attr_writer features(): (::Protostar::Google::Protobuf::FeatureSet | ::Protostar::Google::Protobuf::FeatureSet::init_map)?
1380
+ def has_features?: () -> bool
1381
+ def clear_features: () -> void
1382
+
1383
+ # The parser stores options it doesn't recognize here. See above.
1384
+ attr_reader uninterpreted_option(): ::Array[::Protostar::Google::Protobuf::UninterpretedOption]
1385
+ attr_writer uninterpreted_option(): (::Array[::Protostar::Google::Protobuf::UninterpretedOption | ::Protostar::Google::Protobuf::UninterpretedOption::init_map])?
1386
+ end
1387
+
1388
+ class EnumOptions < ::Protostar::Message
1389
+ type init_map = {
1390
+ ?allow_alias: bool?,
1391
+ ?deprecated: bool?,
1392
+ ?deprecated_legacy_json_field_conflicts: bool?,
1393
+ ?features: (::Protostar::Google::Protobuf::FeatureSet | ::Protostar::Google::Protobuf::FeatureSet::init_map)?,
1394
+ ?uninterpreted_option: (::Array[::Protostar::Google::Protobuf::UninterpretedOption | ::Protostar::Google::Protobuf::UninterpretedOption::init_map])?
1395
+ }
1396
+ def initialize: (
1397
+ ?init_map? fields,
1398
+ ?allow_alias: bool?,
1399
+ ?deprecated: bool?,
1400
+ ?deprecated_legacy_json_field_conflicts: bool?,
1401
+ ?features: (::Protostar::Google::Protobuf::FeatureSet | ::Protostar::Google::Protobuf::FeatureSet::init_map)?,
1402
+ ?uninterpreted_option: (::Array[::Protostar::Google::Protobuf::UninterpretedOption | ::Protostar::Google::Protobuf::UninterpretedOption::init_map])?
1403
+ ) -> void
1404
+
1405
+ # Set this option to true to allow mapping different tag names to the same
1406
+ # value.
1407
+ attr_reader allow_alias(): bool
1408
+ attr_writer allow_alias(): bool?
1409
+ def has_allow_alias?: () -> bool
1410
+ def clear_allow_alias: () -> void
1411
+
1412
+ # Is this enum deprecated?
1413
+ # Depending on the target platform, this can emit Deprecated annotations
1414
+ # for the enum, or it will be completely ignored; in the very least, this
1415
+ # is a formalization for deprecating enums.
1416
+ attr_reader deprecated(): bool
1417
+ attr_writer deprecated(): bool?
1418
+ def has_deprecated?: () -> bool
1419
+ def clear_deprecated: () -> void
1420
+
1421
+ # Enable the legacy handling of JSON field name conflicts. This lowercases
1422
+ # and strips underscored from the fields before comparison in proto3 only.
1423
+ # The new behavior takes `json_name` into account and applies to proto2 as
1424
+ # well.
1425
+ # TODO Remove this legacy behavior once downstream teams have
1426
+ # had time to migrate.
1427
+ attr_reader deprecated_legacy_json_field_conflicts(): bool
1428
+ attr_writer deprecated_legacy_json_field_conflicts(): bool?
1429
+ def has_deprecated_legacy_json_field_conflicts?: () -> bool
1430
+ def clear_deprecated_legacy_json_field_conflicts: () -> void
1431
+
1432
+ # Any features defined in the specific edition.
1433
+ # WARNING: This field should only be used by protobuf plugins or special
1434
+ # cases like the proto compiler. Other uses are discouraged and
1435
+ # developers should rely on the protoreflect APIs for their client language.
1436
+ attr_reader features(): ::Protostar::Google::Protobuf::FeatureSet?
1437
+ attr_writer features(): (::Protostar::Google::Protobuf::FeatureSet | ::Protostar::Google::Protobuf::FeatureSet::init_map)?
1438
+ def has_features?: () -> bool
1439
+ def clear_features: () -> void
1440
+
1441
+ # The parser stores options it doesn't recognize here. See above.
1442
+ attr_reader uninterpreted_option(): ::Array[::Protostar::Google::Protobuf::UninterpretedOption]
1443
+ attr_writer uninterpreted_option(): (::Array[::Protostar::Google::Protobuf::UninterpretedOption | ::Protostar::Google::Protobuf::UninterpretedOption::init_map])?
1444
+ end
1445
+
1446
+ class EnumValueOptions < ::Protostar::Message
1447
+ type init_map = {
1448
+ ?deprecated: bool?,
1449
+ ?features: (::Protostar::Google::Protobuf::FeatureSet | ::Protostar::Google::Protobuf::FeatureSet::init_map)?,
1450
+ ?debug_redact: bool?,
1451
+ ?feature_support: (::Protostar::Google::Protobuf::FieldOptions::FeatureSupport | ::Protostar::Google::Protobuf::FieldOptions::FeatureSupport::init_map)?,
1452
+ ?uninterpreted_option: (::Array[::Protostar::Google::Protobuf::UninterpretedOption | ::Protostar::Google::Protobuf::UninterpretedOption::init_map])?
1453
+ }
1454
+ def initialize: (
1455
+ ?init_map? fields,
1456
+ ?deprecated: bool?,
1457
+ ?features: (::Protostar::Google::Protobuf::FeatureSet | ::Protostar::Google::Protobuf::FeatureSet::init_map)?,
1458
+ ?debug_redact: bool?,
1459
+ ?feature_support: (::Protostar::Google::Protobuf::FieldOptions::FeatureSupport | ::Protostar::Google::Protobuf::FieldOptions::FeatureSupport::init_map)?,
1460
+ ?uninterpreted_option: (::Array[::Protostar::Google::Protobuf::UninterpretedOption | ::Protostar::Google::Protobuf::UninterpretedOption::init_map])?
1461
+ ) -> void
1462
+
1463
+ # Is this enum value deprecated?
1464
+ # Depending on the target platform, this can emit Deprecated annotations
1465
+ # for the enum value, or it will be completely ignored; in the very least,
1466
+ # this is a formalization for deprecating enum values.
1467
+ attr_reader deprecated(): bool
1468
+ attr_writer deprecated(): bool?
1469
+ def has_deprecated?: () -> bool
1470
+ def clear_deprecated: () -> void
1471
+
1472
+ # Any features defined in the specific edition.
1473
+ # WARNING: This field should only be used by protobuf plugins or special
1474
+ # cases like the proto compiler. Other uses are discouraged and
1475
+ # developers should rely on the protoreflect APIs for their client language.
1476
+ attr_reader features(): ::Protostar::Google::Protobuf::FeatureSet?
1477
+ attr_writer features(): (::Protostar::Google::Protobuf::FeatureSet | ::Protostar::Google::Protobuf::FeatureSet::init_map)?
1478
+ def has_features?: () -> bool
1479
+ def clear_features: () -> void
1480
+
1481
+ # Indicate that fields annotated with this enum value should not be printed
1482
+ # out when using debug formats, e.g. when the field contains sensitive
1483
+ # credentials.
1484
+ attr_reader debug_redact(): bool
1485
+ attr_writer debug_redact(): bool?
1486
+ def has_debug_redact?: () -> bool
1487
+ def clear_debug_redact: () -> void
1488
+
1489
+ # Information about the support window of a feature value.
1490
+ attr_reader feature_support(): ::Protostar::Google::Protobuf::FieldOptions::FeatureSupport?
1491
+ attr_writer feature_support(): (::Protostar::Google::Protobuf::FieldOptions::FeatureSupport | ::Protostar::Google::Protobuf::FieldOptions::FeatureSupport::init_map)?
1492
+ def has_feature_support?: () -> bool
1493
+ def clear_feature_support: () -> void
1494
+
1495
+ # The parser stores options it doesn't recognize here. See above.
1496
+ attr_reader uninterpreted_option(): ::Array[::Protostar::Google::Protobuf::UninterpretedOption]
1497
+ attr_writer uninterpreted_option(): (::Array[::Protostar::Google::Protobuf::UninterpretedOption | ::Protostar::Google::Protobuf::UninterpretedOption::init_map])?
1498
+ end
1499
+
1500
+ class ServiceOptions < ::Protostar::Message
1501
+ type init_map = {
1502
+ ?features: (::Protostar::Google::Protobuf::FeatureSet | ::Protostar::Google::Protobuf::FeatureSet::init_map)?,
1503
+ ?deprecated: bool?,
1504
+ ?uninterpreted_option: (::Array[::Protostar::Google::Protobuf::UninterpretedOption | ::Protostar::Google::Protobuf::UninterpretedOption::init_map])?
1505
+ }
1506
+ def initialize: (
1507
+ ?init_map? fields,
1508
+ ?features: (::Protostar::Google::Protobuf::FeatureSet | ::Protostar::Google::Protobuf::FeatureSet::init_map)?,
1509
+ ?deprecated: bool?,
1510
+ ?uninterpreted_option: (::Array[::Protostar::Google::Protobuf::UninterpretedOption | ::Protostar::Google::Protobuf::UninterpretedOption::init_map])?
1511
+ ) -> void
1512
+
1513
+ # Any features defined in the specific edition.
1514
+ # WARNING: This field should only be used by protobuf plugins or special
1515
+ # cases like the proto compiler. Other uses are discouraged and
1516
+ # developers should rely on the protoreflect APIs for their client language.
1517
+ attr_reader features(): ::Protostar::Google::Protobuf::FeatureSet?
1518
+ attr_writer features(): (::Protostar::Google::Protobuf::FeatureSet | ::Protostar::Google::Protobuf::FeatureSet::init_map)?
1519
+ def has_features?: () -> bool
1520
+ def clear_features: () -> void
1521
+
1522
+ # Is this service deprecated?
1523
+ # Depending on the target platform, this can emit Deprecated annotations
1524
+ # for the service, or it will be completely ignored; in the very least,
1525
+ # this is a formalization for deprecating services.
1526
+ attr_reader deprecated(): bool
1527
+ attr_writer deprecated(): bool?
1528
+ def has_deprecated?: () -> bool
1529
+ def clear_deprecated: () -> void
1530
+
1531
+ # The parser stores options it doesn't recognize here. See above.
1532
+ attr_reader uninterpreted_option(): ::Array[::Protostar::Google::Protobuf::UninterpretedOption]
1533
+ attr_writer uninterpreted_option(): (::Array[::Protostar::Google::Protobuf::UninterpretedOption | ::Protostar::Google::Protobuf::UninterpretedOption::init_map])?
1534
+ end
1535
+
1536
+ class MethodOptions < ::Protostar::Message
1537
+ # Is this method side-effect-free (or safe in HTTP parlance), or idempotent,
1538
+ # or neither? HTTP based RPC implementation may choose GET verb for safe
1539
+ # methods, and PUT verb for idempotent methods instead of the default POST.
1540
+ module IdempotencyLevel
1541
+ extend ::Protostar::Enum
1542
+
1543
+ IDEMPOTENCY_UNKNOWN: 0
1544
+ NO_SIDE_EFFECTS: 1
1545
+ IDEMPOTENT: 2
1546
+
1547
+ type names = :IDEMPOTENCY_UNKNOWN | :NO_SIDE_EFFECTS | :IDEMPOTENT
1548
+ end
1549
+
1550
+ type init_map = {
1551
+ ?deprecated: bool?,
1552
+ ?idempotency_level: (::Protostar::Google::Protobuf::MethodOptions::IdempotencyLevel::names | ::Integer)?,
1553
+ ?features: (::Protostar::Google::Protobuf::FeatureSet | ::Protostar::Google::Protobuf::FeatureSet::init_map)?,
1554
+ ?uninterpreted_option: (::Array[::Protostar::Google::Protobuf::UninterpretedOption | ::Protostar::Google::Protobuf::UninterpretedOption::init_map])?
1555
+ }
1556
+ def initialize: (
1557
+ ?init_map? fields,
1558
+ ?deprecated: bool?,
1559
+ ?idempotency_level: (::Protostar::Google::Protobuf::MethodOptions::IdempotencyLevel::names | ::Integer)?,
1560
+ ?features: (::Protostar::Google::Protobuf::FeatureSet | ::Protostar::Google::Protobuf::FeatureSet::init_map)?,
1561
+ ?uninterpreted_option: (::Array[::Protostar::Google::Protobuf::UninterpretedOption | ::Protostar::Google::Protobuf::UninterpretedOption::init_map])?
1562
+ ) -> void
1563
+
1564
+ # Is this method deprecated?
1565
+ # Depending on the target platform, this can emit Deprecated annotations
1566
+ # for the method, or it will be completely ignored; in the very least,
1567
+ # this is a formalization for deprecating methods.
1568
+ attr_reader deprecated(): bool
1569
+ attr_writer deprecated(): bool?
1570
+ def has_deprecated?: () -> bool
1571
+ def clear_deprecated: () -> void
1572
+
1573
+ attr_reader idempotency_level(): ::Protostar::Google::Protobuf::MethodOptions::IdempotencyLevel::names | ::Integer
1574
+ attr_writer idempotency_level(): (::Protostar::Google::Protobuf::MethodOptions::IdempotencyLevel::names | ::Integer)?
1575
+ def has_idempotency_level?: () -> bool
1576
+ def clear_idempotency_level: () -> void
1577
+
1578
+ # Any features defined in the specific edition.
1579
+ # WARNING: This field should only be used by protobuf plugins or special
1580
+ # cases like the proto compiler. Other uses are discouraged and
1581
+ # developers should rely on the protoreflect APIs for their client language.
1582
+ attr_reader features(): ::Protostar::Google::Protobuf::FeatureSet?
1583
+ attr_writer features(): (::Protostar::Google::Protobuf::FeatureSet | ::Protostar::Google::Protobuf::FeatureSet::init_map)?
1584
+ def has_features?: () -> bool
1585
+ def clear_features: () -> void
1586
+
1587
+ # The parser stores options it doesn't recognize here. See above.
1588
+ attr_reader uninterpreted_option(): ::Array[::Protostar::Google::Protobuf::UninterpretedOption]
1589
+ attr_writer uninterpreted_option(): (::Array[::Protostar::Google::Protobuf::UninterpretedOption | ::Protostar::Google::Protobuf::UninterpretedOption::init_map])?
1590
+ end
1591
+
1592
+ # A message representing a option the parser does not recognize. This only
1593
+ # appears in options protos created by the compiler::Parser class.
1594
+ # DescriptorPool resolves these when building Descriptor objects. Therefore,
1595
+ # options protos in descriptor objects (e.g. returned by Descriptor::options(),
1596
+ # or produced by Descriptor::CopyTo()) will never have UninterpretedOptions
1597
+ # in them.
1598
+ class UninterpretedOption < ::Protostar::Message
1599
+ # The name of the uninterpreted option. Each string represents a segment in
1600
+ # a dot-separated name. is_extension is true iff a segment represents an
1601
+ # extension (denoted with parentheses in options specs in .proto files).
1602
+ # E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents
1603
+ # "foo.(bar.baz).moo".
1604
+ class NamePart < ::Protostar::Message
1605
+ type init_map = {
1606
+ ?name_part: ::String?,
1607
+ ?is_extension: bool?
1608
+ }
1609
+ def initialize: (
1610
+ ?init_map? fields,
1611
+ ?name_part: ::String?,
1612
+ ?is_extension: bool?
1613
+ ) -> void
1614
+
1615
+ attr_reader name_part(): ::String
1616
+ attr_writer name_part(): ::String?
1617
+ def has_name_part?: () -> bool
1618
+ def clear_name_part: () -> void
1619
+
1620
+ attr_reader is_extension(): bool
1621
+ attr_writer is_extension(): bool?
1622
+ def has_is_extension?: () -> bool
1623
+ def clear_is_extension: () -> void
1624
+ end
1625
+
1626
+ type init_map = {
1627
+ ?name: (::Array[::Protostar::Google::Protobuf::UninterpretedOption::NamePart | ::Protostar::Google::Protobuf::UninterpretedOption::NamePart::init_map])?,
1628
+ ?identifier_value: ::String?,
1629
+ ?positive_int_value: ::Integer?,
1630
+ ?negative_int_value: ::Integer?,
1631
+ ?double_value: (::Float | ::Integer)?,
1632
+ ?string_value: ::String?,
1633
+ ?aggregate_value: ::String?
1634
+ }
1635
+ def initialize: (
1636
+ ?init_map? fields,
1637
+ ?name: (::Array[::Protostar::Google::Protobuf::UninterpretedOption::NamePart | ::Protostar::Google::Protobuf::UninterpretedOption::NamePart::init_map])?,
1638
+ ?identifier_value: ::String?,
1639
+ ?positive_int_value: ::Integer?,
1640
+ ?negative_int_value: ::Integer?,
1641
+ ?double_value: (::Float | ::Integer)?,
1642
+ ?string_value: ::String?,
1643
+ ?aggregate_value: ::String?
1644
+ ) -> void
1645
+
1646
+ attr_reader name(): ::Array[::Protostar::Google::Protobuf::UninterpretedOption::NamePart]
1647
+ attr_writer name(): (::Array[::Protostar::Google::Protobuf::UninterpretedOption::NamePart | ::Protostar::Google::Protobuf::UninterpretedOption::NamePart::init_map])?
1648
+
1649
+ # The value of the uninterpreted option, in whatever type the tokenizer
1650
+ # identified it as during parsing. Exactly one of these should be set.
1651
+ attr_reader identifier_value(): ::String
1652
+ attr_writer identifier_value(): ::String?
1653
+ def has_identifier_value?: () -> bool
1654
+ def clear_identifier_value: () -> void
1655
+
1656
+ attr_reader positive_int_value(): ::Integer
1657
+ attr_writer positive_int_value(): ::Integer?
1658
+ def has_positive_int_value?: () -> bool
1659
+ def clear_positive_int_value: () -> void
1660
+
1661
+ attr_reader negative_int_value(): ::Integer
1662
+ attr_writer negative_int_value(): ::Integer?
1663
+ def has_negative_int_value?: () -> bool
1664
+ def clear_negative_int_value: () -> void
1665
+
1666
+ attr_reader double_value(): ::Float
1667
+ attr_writer double_value(): (::Float | ::Integer)?
1668
+ def has_double_value?: () -> bool
1669
+ def clear_double_value: () -> void
1670
+
1671
+ attr_reader string_value(): ::String
1672
+ attr_writer string_value(): ::String?
1673
+ def has_string_value?: () -> bool
1674
+ def clear_string_value: () -> void
1675
+
1676
+ attr_reader aggregate_value(): ::String
1677
+ attr_writer aggregate_value(): ::String?
1678
+ def has_aggregate_value?: () -> bool
1679
+ def clear_aggregate_value: () -> void
1680
+ end
1681
+
1682
+ # TODO Enums in C++ gencode (and potentially other languages) are
1683
+ # not well scoped. This means that each of the feature enums below can clash
1684
+ # with each other. The short names we've chosen maximize call-site
1685
+ # readability, but leave us very open to this scenario. A future feature will
1686
+ # be designed and implemented to handle this, hopefully before we ever hit a
1687
+ # conflict here.
1688
+ class FeatureSet < ::Protostar::Message
1689
+ class VisibilityFeature < ::Protostar::Message
1690
+ module DefaultSymbolVisibility
1691
+ extend ::Protostar::Enum
1692
+
1693
+ DEFAULT_SYMBOL_VISIBILITY_UNKNOWN: 0
1694
+ EXPORT_ALL: 1
1695
+ EXPORT_TOP_LEVEL: 2
1696
+ LOCAL_ALL: 3
1697
+ STRICT: 4
1698
+
1699
+ type names = :DEFAULT_SYMBOL_VISIBILITY_UNKNOWN | :EXPORT_ALL | :EXPORT_TOP_LEVEL | :LOCAL_ALL | :STRICT
1700
+ end
1701
+
1702
+ type init_map = ::Hash[::Symbol | ::String, untyped]
1703
+ def initialize: (?init_map? fields, **untyped) -> void
1704
+ end
1705
+
1706
+ class ProtoLimitsFeature < ::Protostar::Message
1707
+ module EnforceProtoLimits
1708
+ extend ::Protostar::Enum
1709
+
1710
+ PROTO_LIMITS_UNKNOWN: 0
1711
+ LEGACY_NO_EXPLICIT_LIMITS: 1
1712
+ PROTO_LIMITS2026: 2
1713
+
1714
+ type names = :PROTO_LIMITS_UNKNOWN | :LEGACY_NO_EXPLICIT_LIMITS | :PROTO_LIMITS2026
1715
+ end
1716
+
1717
+ type init_map = ::Hash[::Symbol | ::String, untyped]
1718
+ def initialize: (?init_map? fields, **untyped) -> void
1719
+ end
1720
+
1721
+ module FieldPresence
1722
+ extend ::Protostar::Enum
1723
+
1724
+ FIELD_PRESENCE_UNKNOWN: 0
1725
+ EXPLICIT: 1
1726
+ IMPLICIT: 2
1727
+ LEGACY_REQUIRED: 3
1728
+
1729
+ type names = :FIELD_PRESENCE_UNKNOWN | :EXPLICIT | :IMPLICIT | :LEGACY_REQUIRED
1730
+ end
1731
+
1732
+ module EnumType
1733
+ extend ::Protostar::Enum
1734
+
1735
+ ENUM_TYPE_UNKNOWN: 0
1736
+ OPEN: 1
1737
+ CLOSED: 2
1738
+
1739
+ type names = :ENUM_TYPE_UNKNOWN | :OPEN | :CLOSED
1740
+ end
1741
+
1742
+ module RepeatedFieldEncoding
1743
+ extend ::Protostar::Enum
1744
+
1745
+ REPEATED_FIELD_ENCODING_UNKNOWN: 0
1746
+ PACKED: 1
1747
+ EXPANDED: 2
1748
+
1749
+ type names = :REPEATED_FIELD_ENCODING_UNKNOWN | :PACKED | :EXPANDED
1750
+ end
1751
+
1752
+ module Utf8Validation
1753
+ extend ::Protostar::Enum
1754
+
1755
+ UTF8_VALIDATION_UNKNOWN: 0
1756
+ VERIFY: 2
1757
+ NONE: 3
1758
+
1759
+ type names = :UTF8_VALIDATION_UNKNOWN | :VERIFY | :NONE
1760
+ end
1761
+
1762
+ module MessageEncoding
1763
+ extend ::Protostar::Enum
1764
+
1765
+ MESSAGE_ENCODING_UNKNOWN: 0
1766
+ LENGTH_PREFIXED: 1
1767
+ DELIMITED: 2
1768
+
1769
+ type names = :MESSAGE_ENCODING_UNKNOWN | :LENGTH_PREFIXED | :DELIMITED
1770
+ end
1771
+
1772
+ module JsonFormat
1773
+ extend ::Protostar::Enum
1774
+
1775
+ JSON_FORMAT_UNKNOWN: 0
1776
+ ALLOW: 1
1777
+ LEGACY_BEST_EFFORT: 2
1778
+
1779
+ type names = :JSON_FORMAT_UNKNOWN | :ALLOW | :LEGACY_BEST_EFFORT
1780
+ end
1781
+
1782
+ module EnforceNamingStyle
1783
+ extend ::Protostar::Enum
1784
+
1785
+ ENFORCE_NAMING_STYLE_UNKNOWN: 0
1786
+ STYLE2024: 1
1787
+ STYLE_LEGACY: 2
1788
+ STYLE2026: 3
1789
+
1790
+ type names = :ENFORCE_NAMING_STYLE_UNKNOWN | :STYLE2024 | :STYLE_LEGACY | :STYLE2026
1791
+ end
1792
+
1793
+ type init_map = {
1794
+ ?field_presence: (::Protostar::Google::Protobuf::FeatureSet::FieldPresence::names | ::Integer)?,
1795
+ ?enum_type: (::Protostar::Google::Protobuf::FeatureSet::EnumType::names | ::Integer)?,
1796
+ ?repeated_field_encoding: (::Protostar::Google::Protobuf::FeatureSet::RepeatedFieldEncoding::names | ::Integer)?,
1797
+ ?utf8_validation: (::Protostar::Google::Protobuf::FeatureSet::Utf8Validation::names | ::Integer)?,
1798
+ ?message_encoding: (::Protostar::Google::Protobuf::FeatureSet::MessageEncoding::names | ::Integer)?,
1799
+ ?json_format: (::Protostar::Google::Protobuf::FeatureSet::JsonFormat::names | ::Integer)?,
1800
+ ?enforce_naming_style: (::Protostar::Google::Protobuf::FeatureSet::EnforceNamingStyle::names | ::Integer)?,
1801
+ ?default_symbol_visibility: (::Protostar::Google::Protobuf::FeatureSet::VisibilityFeature::DefaultSymbolVisibility::names | ::Integer)?,
1802
+ ?enforce_proto_limits: (::Protostar::Google::Protobuf::FeatureSet::ProtoLimitsFeature::EnforceProtoLimits::names | ::Integer)?
1803
+ }
1804
+ def initialize: (
1805
+ ?init_map? fields,
1806
+ ?field_presence: (::Protostar::Google::Protobuf::FeatureSet::FieldPresence::names | ::Integer)?,
1807
+ ?enum_type: (::Protostar::Google::Protobuf::FeatureSet::EnumType::names | ::Integer)?,
1808
+ ?repeated_field_encoding: (::Protostar::Google::Protobuf::FeatureSet::RepeatedFieldEncoding::names | ::Integer)?,
1809
+ ?utf8_validation: (::Protostar::Google::Protobuf::FeatureSet::Utf8Validation::names | ::Integer)?,
1810
+ ?message_encoding: (::Protostar::Google::Protobuf::FeatureSet::MessageEncoding::names | ::Integer)?,
1811
+ ?json_format: (::Protostar::Google::Protobuf::FeatureSet::JsonFormat::names | ::Integer)?,
1812
+ ?enforce_naming_style: (::Protostar::Google::Protobuf::FeatureSet::EnforceNamingStyle::names | ::Integer)?,
1813
+ ?default_symbol_visibility: (::Protostar::Google::Protobuf::FeatureSet::VisibilityFeature::DefaultSymbolVisibility::names | ::Integer)?,
1814
+ ?enforce_proto_limits: (::Protostar::Google::Protobuf::FeatureSet::ProtoLimitsFeature::EnforceProtoLimits::names | ::Integer)?
1815
+ ) -> void
1816
+
1817
+ attr_reader field_presence(): ::Protostar::Google::Protobuf::FeatureSet::FieldPresence::names | ::Integer
1818
+ attr_writer field_presence(): (::Protostar::Google::Protobuf::FeatureSet::FieldPresence::names | ::Integer)?
1819
+ def has_field_presence?: () -> bool
1820
+ def clear_field_presence: () -> void
1821
+
1822
+ attr_reader enum_type(): ::Protostar::Google::Protobuf::FeatureSet::EnumType::names | ::Integer
1823
+ attr_writer enum_type(): (::Protostar::Google::Protobuf::FeatureSet::EnumType::names | ::Integer)?
1824
+ def has_enum_type?: () -> bool
1825
+ def clear_enum_type: () -> void
1826
+
1827
+ attr_reader repeated_field_encoding(): ::Protostar::Google::Protobuf::FeatureSet::RepeatedFieldEncoding::names | ::Integer
1828
+ attr_writer repeated_field_encoding(): (::Protostar::Google::Protobuf::FeatureSet::RepeatedFieldEncoding::names | ::Integer)?
1829
+ def has_repeated_field_encoding?: () -> bool
1830
+ def clear_repeated_field_encoding: () -> void
1831
+
1832
+ attr_reader utf8_validation(): ::Protostar::Google::Protobuf::FeatureSet::Utf8Validation::names | ::Integer
1833
+ attr_writer utf8_validation(): (::Protostar::Google::Protobuf::FeatureSet::Utf8Validation::names | ::Integer)?
1834
+ def has_utf8_validation?: () -> bool
1835
+ def clear_utf8_validation: () -> void
1836
+
1837
+ attr_reader message_encoding(): ::Protostar::Google::Protobuf::FeatureSet::MessageEncoding::names | ::Integer
1838
+ attr_writer message_encoding(): (::Protostar::Google::Protobuf::FeatureSet::MessageEncoding::names | ::Integer)?
1839
+ def has_message_encoding?: () -> bool
1840
+ def clear_message_encoding: () -> void
1841
+
1842
+ attr_reader json_format(): ::Protostar::Google::Protobuf::FeatureSet::JsonFormat::names | ::Integer
1843
+ attr_writer json_format(): (::Protostar::Google::Protobuf::FeatureSet::JsonFormat::names | ::Integer)?
1844
+ def has_json_format?: () -> bool
1845
+ def clear_json_format: () -> void
1846
+
1847
+ attr_reader enforce_naming_style(): ::Protostar::Google::Protobuf::FeatureSet::EnforceNamingStyle::names | ::Integer
1848
+ attr_writer enforce_naming_style(): (::Protostar::Google::Protobuf::FeatureSet::EnforceNamingStyle::names | ::Integer)?
1849
+ def has_enforce_naming_style?: () -> bool
1850
+ def clear_enforce_naming_style: () -> void
1851
+
1852
+ attr_reader default_symbol_visibility(): ::Protostar::Google::Protobuf::FeatureSet::VisibilityFeature::DefaultSymbolVisibility::names | ::Integer
1853
+ attr_writer default_symbol_visibility(): (::Protostar::Google::Protobuf::FeatureSet::VisibilityFeature::DefaultSymbolVisibility::names | ::Integer)?
1854
+ def has_default_symbol_visibility?: () -> bool
1855
+ def clear_default_symbol_visibility: () -> void
1856
+
1857
+ attr_reader enforce_proto_limits(): ::Protostar::Google::Protobuf::FeatureSet::ProtoLimitsFeature::EnforceProtoLimits::names | ::Integer
1858
+ attr_writer enforce_proto_limits(): (::Protostar::Google::Protobuf::FeatureSet::ProtoLimitsFeature::EnforceProtoLimits::names | ::Integer)?
1859
+ def has_enforce_proto_limits?: () -> bool
1860
+ def clear_enforce_proto_limits: () -> void
1861
+ end
1862
+
1863
+ # A compiled specification for the defaults of a set of features. These
1864
+ # messages are generated from FeatureSet extensions and can be used to seed
1865
+ # feature resolution. The resolution with this object becomes a simple search
1866
+ # for the closest matching edition, followed by proto merges.
1867
+ class FeatureSetDefaults < ::Protostar::Message
1868
+ # A map from every known edition with a unique set of defaults to its
1869
+ # defaults. Not all editions may be contained here. For a given edition,
1870
+ # the defaults at the closest matching edition ordered at or before it should
1871
+ # be used. This field must be in strict ascending order by edition.
1872
+ class FeatureSetEditionDefault < ::Protostar::Message
1873
+ type init_map = {
1874
+ ?edition: (::Protostar::Google::Protobuf::Edition::names | ::Integer)?,
1875
+ ?overridable_features: (::Protostar::Google::Protobuf::FeatureSet | ::Protostar::Google::Protobuf::FeatureSet::init_map)?,
1876
+ ?fixed_features: (::Protostar::Google::Protobuf::FeatureSet | ::Protostar::Google::Protobuf::FeatureSet::init_map)?
1877
+ }
1878
+ def initialize: (
1879
+ ?init_map? fields,
1880
+ ?edition: (::Protostar::Google::Protobuf::Edition::names | ::Integer)?,
1881
+ ?overridable_features: (::Protostar::Google::Protobuf::FeatureSet | ::Protostar::Google::Protobuf::FeatureSet::init_map)?,
1882
+ ?fixed_features: (::Protostar::Google::Protobuf::FeatureSet | ::Protostar::Google::Protobuf::FeatureSet::init_map)?
1883
+ ) -> void
1884
+
1885
+ attr_reader edition(): ::Protostar::Google::Protobuf::Edition::names | ::Integer
1886
+ attr_writer edition(): (::Protostar::Google::Protobuf::Edition::names | ::Integer)?
1887
+ def has_edition?: () -> bool
1888
+ def clear_edition: () -> void
1889
+
1890
+ # Defaults of features that can be overridden in this edition.
1891
+ attr_reader overridable_features(): ::Protostar::Google::Protobuf::FeatureSet?
1892
+ attr_writer overridable_features(): (::Protostar::Google::Protobuf::FeatureSet | ::Protostar::Google::Protobuf::FeatureSet::init_map)?
1893
+ def has_overridable_features?: () -> bool
1894
+ def clear_overridable_features: () -> void
1895
+
1896
+ # Defaults of features that can't be overridden in this edition.
1897
+ attr_reader fixed_features(): ::Protostar::Google::Protobuf::FeatureSet?
1898
+ attr_writer fixed_features(): (::Protostar::Google::Protobuf::FeatureSet | ::Protostar::Google::Protobuf::FeatureSet::init_map)?
1899
+ def has_fixed_features?: () -> bool
1900
+ def clear_fixed_features: () -> void
1901
+ end
1902
+
1903
+ type init_map = {
1904
+ ?defaults: (::Array[::Protostar::Google::Protobuf::FeatureSetDefaults::FeatureSetEditionDefault | ::Protostar::Google::Protobuf::FeatureSetDefaults::FeatureSetEditionDefault::init_map])?,
1905
+ ?minimum_edition: (::Protostar::Google::Protobuf::Edition::names | ::Integer)?,
1906
+ ?maximum_edition: (::Protostar::Google::Protobuf::Edition::names | ::Integer)?
1907
+ }
1908
+ def initialize: (
1909
+ ?init_map? fields,
1910
+ ?defaults: (::Array[::Protostar::Google::Protobuf::FeatureSetDefaults::FeatureSetEditionDefault | ::Protostar::Google::Protobuf::FeatureSetDefaults::FeatureSetEditionDefault::init_map])?,
1911
+ ?minimum_edition: (::Protostar::Google::Protobuf::Edition::names | ::Integer)?,
1912
+ ?maximum_edition: (::Protostar::Google::Protobuf::Edition::names | ::Integer)?
1913
+ ) -> void
1914
+
1915
+ attr_reader defaults(): ::Array[::Protostar::Google::Protobuf::FeatureSetDefaults::FeatureSetEditionDefault]
1916
+ attr_writer defaults(): (::Array[::Protostar::Google::Protobuf::FeatureSetDefaults::FeatureSetEditionDefault | ::Protostar::Google::Protobuf::FeatureSetDefaults::FeatureSetEditionDefault::init_map])?
1917
+
1918
+ # The minimum supported edition (inclusive) when this was constructed.
1919
+ # Editions before this will not have defaults.
1920
+ attr_reader minimum_edition(): ::Protostar::Google::Protobuf::Edition::names | ::Integer
1921
+ attr_writer minimum_edition(): (::Protostar::Google::Protobuf::Edition::names | ::Integer)?
1922
+ def has_minimum_edition?: () -> bool
1923
+ def clear_minimum_edition: () -> void
1924
+
1925
+ # The maximum known edition (inclusive) when this was constructed. Editions
1926
+ # after this will not have reliable defaults.
1927
+ attr_reader maximum_edition(): ::Protostar::Google::Protobuf::Edition::names | ::Integer
1928
+ attr_writer maximum_edition(): (::Protostar::Google::Protobuf::Edition::names | ::Integer)?
1929
+ def has_maximum_edition?: () -> bool
1930
+ def clear_maximum_edition: () -> void
1931
+ end
1932
+
1933
+ # Encapsulates information about the original source file from which a
1934
+ # FileDescriptorProto was generated.
1935
+ class SourceCodeInfo < ::Protostar::Message
1936
+ class Location < ::Protostar::Message
1937
+ type init_map = {
1938
+ ?path: ::Array[::Integer]?,
1939
+ ?span: ::Array[::Integer]?,
1940
+ ?leading_comments: ::String?,
1941
+ ?trailing_comments: ::String?,
1942
+ ?leading_detached_comments: ::Array[::String]?
1943
+ }
1944
+ def initialize: (
1945
+ ?init_map? fields,
1946
+ ?path: ::Array[::Integer]?,
1947
+ ?span: ::Array[::Integer]?,
1948
+ ?leading_comments: ::String?,
1949
+ ?trailing_comments: ::String?,
1950
+ ?leading_detached_comments: ::Array[::String]?
1951
+ ) -> void
1952
+
1953
+ # Identifies which part of the FileDescriptorProto was defined at this
1954
+ # location.
1955
+ # Each element is a field number or an index. They form a path from
1956
+ # the root FileDescriptorProto to the place where the definition appears.
1957
+ # For example, this path:
1958
+ # [ 4, 3, 2, 7, 1 ]
1959
+ # refers to:
1960
+ # file.message_type(3) // 4, 3
1961
+ # .field(7) // 2, 7
1962
+ # .name() // 1
1963
+ # This is because FileDescriptorProto.message_type has field number 4:
1964
+ # repeated DescriptorProto message_type = 4;
1965
+ # and DescriptorProto.field has field number 2:
1966
+ # repeated FieldDescriptorProto field = 2;
1967
+ # and FieldDescriptorProto.name has field number 1:
1968
+ # optional string name = 1;
1969
+ # Thus, the above path gives the location of a field name. If we removed
1970
+ # the last element:
1971
+ # [ 4, 3, 2, 7 ]
1972
+ # this path refers to the whole field declaration (from the beginning
1973
+ # of the label to the terminating semicolon).
1974
+ # For options, the path refers to the interpreted option in the descriptor.
1975
+ # E.g., for a custom option `(my_opt) = "foo"` on a message using extension
1976
+ # number 10101, the path is:
1977
+ # [ 4, 3, 7, 10101 ]
1978
+ # refers to:
1979
+ # file.message_type(3) // 4, 3
1980
+ # .options() // 7
1981
+ # .my_opt() // 10101
1982
+ # Sub-locations corresponding to the interpreted option's corresponding
1983
+ # `UninterpretedOption` are also appended to the interpreted option, which
1984
+ # deviates from the actual FileDescriptorProto path. E.g.:
1985
+ # [ 4, 3, 7, 10101, 2 ]
1986
+ # refers to the option name `(my_opt)`, and:
1987
+ # [ 4, 3, 7, 10101, 7 ]
1988
+ # refers to the "foo" string value of the option.
1989
+ attr_reader path(): ::Array[::Integer]
1990
+ attr_writer path(): ::Array[::Integer]?
1991
+
1992
+ # Always has exactly three or four elements: start line, start column,
1993
+ # end line (optional, otherwise assumed same as start line), end column.
1994
+ # These are packed into a single field for efficiency. Note that line
1995
+ # and column numbers are zero-based -- typically you will want to add
1996
+ # 1 to each before displaying to a user.
1997
+ attr_reader span(): ::Array[::Integer]
1998
+ attr_writer span(): ::Array[::Integer]?
1999
+
2000
+ # If this SourceCodeInfo represents a complete declaration, these are any
2001
+ # comments appearing before and after the declaration which appear to be
2002
+ # attached to the declaration.
2003
+ # A series of line comments appearing on consecutive lines, with no other
2004
+ # tokens appearing on those lines, will be treated as a single comment.
2005
+ # leading_detached_comments will keep paragraphs of comments that appear
2006
+ # before (but not connected to) the current element. Each paragraph,
2007
+ # separated by empty lines, will be one comment element in the repeated
2008
+ # field.
2009
+ # Only the comment content is provided; comment markers (e.g. //) are
2010
+ # stripped out. For block comments, leading whitespace and an asterisk
2011
+ # will be stripped from the beginning of each line other than the first.
2012
+ # Newlines are included in the output.
2013
+ # Examples:
2014
+ # optional int32 foo = 1; // Comment attached to foo.
2015
+ # // Comment attached to bar.
2016
+ # optional int32 bar = 2;
2017
+ # optional string baz = 3;
2018
+ # // Comment attached to baz.
2019
+ # // Another line attached to baz.
2020
+ # // Comment attached to moo.
2021
+ # //
2022
+ # // Another line attached to moo.
2023
+ # optional double moo = 4;
2024
+ # // Detached comment for corge. This is not leading or trailing comments
2025
+ # // to moo or corge because there are blank lines separating it from
2026
+ # // both.
2027
+ # // Detached comment for corge paragraph 2.
2028
+ # optional string corge = 5;
2029
+ # /* Block comment attached
2030
+ # * to corge. Leading asterisks
2031
+ # * will be removed. */
2032
+ # /* Block comment attached to
2033
+ # * grault. */
2034
+ # optional int32 grault = 6;
2035
+ # // ignored detached comments.
2036
+ attr_reader leading_comments(): ::String
2037
+ attr_writer leading_comments(): ::String?
2038
+ def has_leading_comments?: () -> bool
2039
+ def clear_leading_comments: () -> void
2040
+
2041
+ attr_reader trailing_comments(): ::String
2042
+ attr_writer trailing_comments(): ::String?
2043
+ def has_trailing_comments?: () -> bool
2044
+ def clear_trailing_comments: () -> void
2045
+
2046
+ attr_reader leading_detached_comments(): ::Array[::String]
2047
+ attr_writer leading_detached_comments(): ::Array[::String]?
2048
+ end
2049
+
2050
+ type init_map = {
2051
+ ?location: (::Array[::Protostar::Google::Protobuf::SourceCodeInfo::Location | ::Protostar::Google::Protobuf::SourceCodeInfo::Location::init_map])?
2052
+ }
2053
+ def initialize: (
2054
+ ?init_map? fields,
2055
+ ?location: (::Array[::Protostar::Google::Protobuf::SourceCodeInfo::Location | ::Protostar::Google::Protobuf::SourceCodeInfo::Location::init_map])?
2056
+ ) -> void
2057
+
2058
+ # A Location identifies a piece of source code in a .proto file which
2059
+ # corresponds to a particular definition. This information is intended
2060
+ # to be useful to IDEs, code indexers, documentation generators, and similar
2061
+ # tools.
2062
+ # For example, say we have a file like:
2063
+ # message Foo {
2064
+ # optional string foo = 1;
2065
+ # }
2066
+ # Let's look at just the field definition:
2067
+ # optional string foo = 1;
2068
+ # ^ ^^ ^^ ^ ^^^
2069
+ # a bc de f ghi
2070
+ # We have the following locations:
2071
+ # span path represents
2072
+ # [a,i) [ 4, 0, 2, 0 ] The whole field definition.
2073
+ # [a,b) [ 4, 0, 2, 0, 4 ] The label (optional).
2074
+ # [c,d) [ 4, 0, 2, 0, 5 ] The type (string).
2075
+ # [e,f) [ 4, 0, 2, 0, 1 ] The name (foo).
2076
+ # [g,h) [ 4, 0, 2, 0, 3 ] The number (1).
2077
+ # Notes:
2078
+ # - A location may refer to a repeated field itself (i.e. not to any
2079
+ # particular index within it). This is used whenever a set of elements are
2080
+ # logically enclosed in a single code segment. For example, an entire
2081
+ # extend block (possibly containing multiple extension definitions) will
2082
+ # have an outer location whose path refers to the "extensions" repeated
2083
+ # field without an index.
2084
+ # - Multiple locations may have the same path. This happens when a single
2085
+ # logical declaration is spread out across multiple places. The most
2086
+ # obvious example is the "extend" block again -- there may be multiple
2087
+ # extend blocks in the same scope, each of which will have the same path.
2088
+ # - A location's span is not always a subset of its parent's span. For
2089
+ # example, the "extendee" of an extension declaration appears at the
2090
+ # beginning of the "extend" block and is shared by all extensions within
2091
+ # the block.
2092
+ # - Just because a location's span is a subset of some other location's span
2093
+ # does not mean that it is a descendant. For example, a "group" defines
2094
+ # both a type and a field in a single declaration. Thus, the locations
2095
+ # corresponding to the type and field and their components will overlap.
2096
+ # - Code which tries to interpret locations should probably be designed to
2097
+ # ignore those that it doesn't understand, as more types of locations could
2098
+ # be recorded in the future.
2099
+ attr_reader location(): ::Array[::Protostar::Google::Protobuf::SourceCodeInfo::Location]
2100
+ attr_writer location(): (::Array[::Protostar::Google::Protobuf::SourceCodeInfo::Location | ::Protostar::Google::Protobuf::SourceCodeInfo::Location::init_map])?
2101
+ end
2102
+
2103
+ # Describes the relationship between generated code and its original source
2104
+ # file. A GeneratedCodeInfo message is associated with only one generated
2105
+ # source file, but may contain references to different source .proto files.
2106
+ class GeneratedCodeInfo < ::Protostar::Message
2107
+ class Annotation < ::Protostar::Message
2108
+ # Represents the identified object's effect on the element in the original
2109
+ # .proto file.
2110
+ module Semantic
2111
+ extend ::Protostar::Enum
2112
+
2113
+ NONE: 0
2114
+ SET: 1
2115
+ ALIAS: 2
2116
+
2117
+ type names = :NONE | :SET | :ALIAS
2118
+ end
2119
+
2120
+ type init_map = {
2121
+ ?path: ::Array[::Integer]?,
2122
+ ?source_file: ::String?,
2123
+ ?begin: ::Integer?,
2124
+ ?end: ::Integer?,
2125
+ ?semantic: (::Protostar::Google::Protobuf::GeneratedCodeInfo::Annotation::Semantic::names | ::Integer)?
2126
+ }
2127
+ def initialize: (
2128
+ ?init_map? fields,
2129
+ ?path: ::Array[::Integer]?,
2130
+ ?source_file: ::String?,
2131
+ ?begin: ::Integer?,
2132
+ ?end: ::Integer?,
2133
+ ?semantic: (::Protostar::Google::Protobuf::GeneratedCodeInfo::Annotation::Semantic::names | ::Integer)?
2134
+ ) -> void
2135
+
2136
+ # Identifies the element in the original source .proto file. This field
2137
+ # is formatted the same as SourceCodeInfo.Location.path.
2138
+ attr_reader path(): ::Array[::Integer]
2139
+ attr_writer path(): ::Array[::Integer]?
2140
+
2141
+ # Identifies the filesystem path to the original source .proto.
2142
+ attr_reader source_file(): ::String
2143
+ attr_writer source_file(): ::String?
2144
+ def has_source_file?: () -> bool
2145
+ def clear_source_file: () -> void
2146
+
2147
+ # Identifies the starting offset in bytes in the generated code
2148
+ # that relates to the identified object.
2149
+ attr_reader begin(): ::Integer
2150
+ attr_writer begin(): ::Integer?
2151
+ def has_begin?: () -> bool
2152
+ def clear_begin: () -> void
2153
+
2154
+ # Identifies the ending offset in bytes in the generated code that
2155
+ # relates to the identified object. The end offset should be one past
2156
+ # the last relevant byte (so the length of the text = end - begin).
2157
+ attr_reader end(): ::Integer
2158
+ attr_writer end(): ::Integer?
2159
+ def has_end?: () -> bool
2160
+ def clear_end: () -> void
2161
+
2162
+ attr_reader semantic(): ::Protostar::Google::Protobuf::GeneratedCodeInfo::Annotation::Semantic::names | ::Integer
2163
+ attr_writer semantic(): (::Protostar::Google::Protobuf::GeneratedCodeInfo::Annotation::Semantic::names | ::Integer)?
2164
+ def has_semantic?: () -> bool
2165
+ def clear_semantic: () -> void
2166
+ end
2167
+
2168
+ type init_map = {
2169
+ ?annotation: (::Array[::Protostar::Google::Protobuf::GeneratedCodeInfo::Annotation | ::Protostar::Google::Protobuf::GeneratedCodeInfo::Annotation::init_map])?
2170
+ }
2171
+ def initialize: (
2172
+ ?init_map? fields,
2173
+ ?annotation: (::Array[::Protostar::Google::Protobuf::GeneratedCodeInfo::Annotation | ::Protostar::Google::Protobuf::GeneratedCodeInfo::Annotation::init_map])?
2174
+ ) -> void
2175
+
2176
+ # An Annotation connects some span of text in generated code to an element
2177
+ # of its generating .proto file.
2178
+ attr_reader annotation(): ::Array[::Protostar::Google::Protobuf::GeneratedCodeInfo::Annotation]
2179
+ attr_writer annotation(): (::Array[::Protostar::Google::Protobuf::GeneratedCodeInfo::Annotation | ::Protostar::Google::Protobuf::GeneratedCodeInfo::Annotation::init_map])?
2180
+ end
2181
+
2182
+ # The full set of known editions.
2183
+ module Edition
2184
+ extend ::Protostar::Enum
2185
+
2186
+ EDITION_UNKNOWN: 0
2187
+ EDITION_LEGACY: 900
2188
+ EDITION_PROTO2: 998
2189
+ EDITION_PROTO3: 999
2190
+ EDITION_2023: 1000
2191
+ EDITION_2024: 1001
2192
+ EDITION_2026: 1002
2193
+ EDITION_UNSTABLE: 9999
2194
+ EDITION_1_TEST_ONLY: 1
2195
+ EDITION_2_TEST_ONLY: 2
2196
+ EDITION_99997_TEST_ONLY: 99997
2197
+ EDITION_99998_TEST_ONLY: 99998
2198
+ EDITION_99999_TEST_ONLY: 99999
2199
+ EDITION_MAX: 2147483647
2200
+
2201
+ type names = :EDITION_UNKNOWN | :EDITION_LEGACY | :EDITION_PROTO2 | :EDITION_PROTO3 | :EDITION_2023 | :EDITION_2024 | :EDITION_2026 | :EDITION_UNSTABLE | :EDITION_1_TEST_ONLY | :EDITION_2_TEST_ONLY | :EDITION_99997_TEST_ONLY | :EDITION_99998_TEST_ONLY | :EDITION_99999_TEST_ONLY | :EDITION_MAX
2202
+ end
2203
+
2204
+ # Describes the 'visibility' of a symbol with respect to the proto import
2205
+ # system. Symbols can only be imported when the visibility rules do not prevent
2206
+ # it (ex: local symbols cannot be imported). Visibility modifiers can only set
2207
+ # on `message` and `enum` as they are the only types available to be referenced
2208
+ # from other files.
2209
+ module SymbolVisibility
2210
+ extend ::Protostar::Enum
2211
+
2212
+ VISIBILITY_UNSET: 0
2213
+ VISIBILITY_LOCAL: 1
2214
+ VISIBILITY_EXPORT: 2
2215
+
2216
+ type names = :VISIBILITY_UNSET | :VISIBILITY_LOCAL | :VISIBILITY_EXPORT
2217
+ end
2218
+ end
2219
+ end
2220
+ end