@dcl-regenesislabs/protocol 0.0.1 → 1.0.0-46181073313.commit-3ccda5a

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 (621) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +335 -0
  3. package/out-js/about.gen.d.ts +1 -0
  4. package/out-js/about.gen.js +6 -0
  5. package/out-js/about.gen.js.map +1 -0
  6. package/out-js/comms.gen.d.ts +1 -0
  7. package/out-js/comms.gen.js +6 -0
  8. package/out-js/comms.gen.js.map +1 -0
  9. package/out-js/decentraland/common/border_rect.gen.d.ts +49 -0
  10. package/out-js/decentraland/common/border_rect.gen.js +201 -0
  11. package/out-js/decentraland/common/border_rect.gen.js.map +1 -0
  12. package/out-js/decentraland/common/colors.gen.d.ts +59 -0
  13. package/out-js/decentraland/common/colors.gen.js +260 -0
  14. package/out-js/decentraland/common/colors.gen.js.map +1 -0
  15. package/out-js/decentraland/common/content_mapping.gen.d.ts +31 -0
  16. package/out-js/decentraland/common/content_mapping.gen.js +80 -0
  17. package/out-js/decentraland/common/content_mapping.gen.js.map +1 -0
  18. package/out-js/decentraland/common/gradient.gen.d.ts +50 -0
  19. package/out-js/decentraland/common/gradient.gen.js +147 -0
  20. package/out-js/decentraland/common/gradient.gen.js.map +1 -0
  21. package/out-js/decentraland/common/sdk/user_data.gen.d.ts +63 -0
  22. package/out-js/decentraland/common/sdk/user_data.gen.js +331 -0
  23. package/out-js/decentraland/common/sdk/user_data.gen.js.map +1 -0
  24. package/out-js/decentraland/common/texture.gen.d.ts +123 -0
  25. package/out-js/decentraland/common/texture.gen.js +575 -0
  26. package/out-js/decentraland/common/texture.gen.js.map +1 -0
  27. package/out-js/decentraland/common/vectors.gen.d.ts +71 -0
  28. package/out-js/decentraland/common/vectors.gen.js +338 -0
  29. package/out-js/decentraland/common/vectors.gen.js.map +1 -0
  30. package/out-js/decentraland/kernel/apis/comms_api.gen.d.ts +206 -0
  31. package/out-js/decentraland/kernel/apis/comms_api.gen.js +792 -0
  32. package/out-js/decentraland/kernel/apis/comms_api.gen.js.map +1 -0
  33. package/out-js/decentraland/kernel/apis/communications_controller.gen.d.ts +105 -0
  34. package/out-js/decentraland/kernel/apis/communications_controller.gen.js +400 -0
  35. package/out-js/decentraland/kernel/apis/communications_controller.gen.js.map +1 -0
  36. package/out-js/decentraland/kernel/apis/dev_tools.gen.d.ts +58 -0
  37. package/out-js/decentraland/kernel/apis/dev_tools.gen.js +142 -0
  38. package/out-js/decentraland/kernel/apis/dev_tools.gen.js.map +1 -0
  39. package/out-js/decentraland/kernel/apis/engine_api.gen.d.ts +338 -0
  40. package/out-js/decentraland/kernel/apis/engine_api.gen.js +1453 -0
  41. package/out-js/decentraland/kernel/apis/engine_api.gen.js.map +1 -0
  42. package/out-js/decentraland/kernel/apis/environment_api.gen.d.ts +283 -0
  43. package/out-js/decentraland/kernel/apis/environment_api.gen.js +1123 -0
  44. package/out-js/decentraland/kernel/apis/environment_api.gen.js.map +1 -0
  45. package/out-js/decentraland/kernel/apis/ethereum_controller.gen.d.ts +225 -0
  46. package/out-js/decentraland/kernel/apis/ethereum_controller.gen.js +878 -0
  47. package/out-js/decentraland/kernel/apis/ethereum_controller.gen.js.map +1 -0
  48. package/out-js/decentraland/kernel/apis/parcel_identity.gen.d.ts +146 -0
  49. package/out-js/decentraland/kernel/apis/parcel_identity.gen.js +558 -0
  50. package/out-js/decentraland/kernel/apis/parcel_identity.gen.js.map +1 -0
  51. package/out-js/decentraland/kernel/apis/permissions.gen.d.ts +100 -0
  52. package/out-js/decentraland/kernel/apis/permissions.gen.js +360 -0
  53. package/out-js/decentraland/kernel/apis/permissions.gen.js.map +1 -0
  54. package/out-js/decentraland/kernel/apis/players.gen.d.ts +127 -0
  55. package/out-js/decentraland/kernel/apis/players.gen.js +372 -0
  56. package/out-js/decentraland/kernel/apis/players.gen.js.map +1 -0
  57. package/out-js/decentraland/kernel/apis/portable_experiences.gen.d.ts +178 -0
  58. package/out-js/decentraland/kernel/apis/portable_experiences.gen.js +607 -0
  59. package/out-js/decentraland/kernel/apis/portable_experiences.gen.js.map +1 -0
  60. package/out-js/decentraland/kernel/apis/restricted_actions.gen.d.ts +494 -0
  61. package/out-js/decentraland/kernel/apis/restricted_actions.gen.js +1748 -0
  62. package/out-js/decentraland/kernel/apis/restricted_actions.gen.js.map +1 -0
  63. package/out-js/decentraland/kernel/apis/runtime.gen.d.ts +224 -0
  64. package/out-js/decentraland/kernel/apis/runtime.gen.js +840 -0
  65. package/out-js/decentraland/kernel/apis/runtime.gen.js.map +1 -0
  66. package/out-js/decentraland/kernel/apis/scene.gen.d.ts +59 -0
  67. package/out-js/decentraland/kernel/apis/scene.gen.js +172 -0
  68. package/out-js/decentraland/kernel/apis/scene.gen.js.map +1 -0
  69. package/out-js/decentraland/kernel/apis/scene_credits.gen.d.ts +186 -0
  70. package/out-js/decentraland/kernel/apis/scene_credits.gen.js +388 -0
  71. package/out-js/decentraland/kernel/apis/scene_credits.gen.js.map +1 -0
  72. package/out-js/decentraland/kernel/apis/signed_fetch.gen.d.ts +139 -0
  73. package/out-js/decentraland/kernel/apis/signed_fetch.gen.js +615 -0
  74. package/out-js/decentraland/kernel/apis/signed_fetch.gen.js.map +1 -0
  75. package/out-js/decentraland/kernel/apis/social_controller.gen.d.ts +72 -0
  76. package/out-js/decentraland/kernel/apis/social_controller.gen.js +207 -0
  77. package/out-js/decentraland/kernel/apis/social_controller.gen.js.map +1 -0
  78. package/out-js/decentraland/kernel/apis/testing.gen.d.ts +249 -0
  79. package/out-js/decentraland/kernel/apis/testing.gen.js +1075 -0
  80. package/out-js/decentraland/kernel/apis/testing.gen.js.map +1 -0
  81. package/out-js/decentraland/kernel/apis/user_action_module.gen.d.ts +56 -0
  82. package/out-js/decentraland/kernel/apis/user_action_module.gen.js +128 -0
  83. package/out-js/decentraland/kernel/apis/user_action_module.gen.js.map +1 -0
  84. package/out-js/decentraland/kernel/apis/user_identity.gen.d.ts +86 -0
  85. package/out-js/decentraland/kernel/apis/user_identity.gen.js +236 -0
  86. package/out-js/decentraland/kernel/apis/user_identity.gen.js.map +1 -0
  87. package/out-js/decentraland/kernel/comms/rfc4/comms.gen.d.ts +435 -0
  88. package/out-js/decentraland/kernel/comms/rfc4/comms.gen.js +2415 -0
  89. package/out-js/decentraland/kernel/comms/rfc4/comms.gen.js.map +1 -0
  90. package/out-js/decentraland/kernel/comms/rfc5/ws_comms.gen.d.ts +188 -0
  91. package/out-js/decentraland/kernel/comms/rfc5/ws_comms.gen.js +924 -0
  92. package/out-js/decentraland/kernel/comms/rfc5/ws_comms.gen.js.map +1 -0
  93. package/out-js/decentraland/kernel/comms/v3/archipelago.gen.d.ts +343 -0
  94. package/out-js/decentraland/kernel/comms/v3/archipelago.gen.js +1993 -0
  95. package/out-js/decentraland/kernel/comms/v3/archipelago.gen.js.map +1 -0
  96. package/out-js/decentraland/pulse/pulse_clusters.gen.d.ts +153 -0
  97. package/out-js/decentraland/pulse/pulse_clusters.gen.js +676 -0
  98. package/out-js/decentraland/pulse/pulse_clusters.gen.js.map +1 -0
  99. package/out-js/decentraland/quests/definitions.gen.d.ts +541 -0
  100. package/out-js/decentraland/quests/definitions.gen.js +2732 -0
  101. package/out-js/decentraland/quests/definitions.gen.js.map +1 -0
  102. package/out-js/decentraland/realm/about.gen.d.ts +229 -0
  103. package/out-js/decentraland/realm/about.gen.js +1187 -0
  104. package/out-js/decentraland/realm/about.gen.js.map +1 -0
  105. package/out-js/decentraland/sdk/components/animator.gen.d.ts +62 -0
  106. package/out-js/decentraland/sdk/components/animator.gen.js +192 -0
  107. package/out-js/decentraland/sdk/components/animator.gen.js.map +1 -0
  108. package/out-js/decentraland/sdk/components/audio_source.gen.d.ts +61 -0
  109. package/out-js/decentraland/sdk/components/audio_source.gen.js +151 -0
  110. package/out-js/decentraland/sdk/components/audio_source.gen.js.map +1 -0
  111. package/out-js/decentraland/sdk/components/audio_stream.gen.d.ts +50 -0
  112. package/out-js/decentraland/sdk/components/audio_stream.gen.js +138 -0
  113. package/out-js/decentraland/sdk/components/audio_stream.gen.js.map +1 -0
  114. package/out-js/decentraland/sdk/components/avatar_attach.gen.d.ts +76 -0
  115. package/out-js/decentraland/sdk/components/avatar_attach.gen.js +262 -0
  116. package/out-js/decentraland/sdk/components/avatar_attach.gen.js.map +1 -0
  117. package/out-js/decentraland/sdk/components/avatar_base.gen.d.ts +38 -0
  118. package/out-js/decentraland/sdk/components/avatar_base.gen.js +148 -0
  119. package/out-js/decentraland/sdk/components/avatar_base.gen.js.map +1 -0
  120. package/out-js/decentraland/sdk/components/avatar_emote_command.gen.d.ts +64 -0
  121. package/out-js/decentraland/sdk/components/avatar_emote_command.gen.js +171 -0
  122. package/out-js/decentraland/sdk/components/avatar_emote_command.gen.js.map +1 -0
  123. package/out-js/decentraland/sdk/components/avatar_equipped_data.gen.d.ts +57 -0
  124. package/out-js/decentraland/sdk/components/avatar_equipped_data.gen.js +199 -0
  125. package/out-js/decentraland/sdk/components/avatar_equipped_data.gen.js.map +1 -0
  126. package/out-js/decentraland/sdk/components/avatar_locomotion_settings.gen.d.ts +51 -0
  127. package/out-js/decentraland/sdk/components/avatar_locomotion_settings.gen.js +177 -0
  128. package/out-js/decentraland/sdk/components/avatar_locomotion_settings.gen.js.map +1 -0
  129. package/out-js/decentraland/sdk/components/avatar_modifier_area.gen.d.ts +103 -0
  130. package/out-js/decentraland/sdk/components/avatar_modifier_area.gen.js +399 -0
  131. package/out-js/decentraland/sdk/components/avatar_modifier_area.gen.js.map +1 -0
  132. package/out-js/decentraland/sdk/components/avatar_movement.gen.d.ts +71 -0
  133. package/out-js/decentraland/sdk/components/avatar_movement.gen.js +304 -0
  134. package/out-js/decentraland/sdk/components/avatar_movement.gen.js.map +1 -0
  135. package/out-js/decentraland/sdk/components/avatar_movement_info.gen.d.ts +82 -0
  136. package/out-js/decentraland/sdk/components/avatar_movement_info.gen.js +357 -0
  137. package/out-js/decentraland/sdk/components/avatar_movement_info.gen.js.map +1 -0
  138. package/out-js/decentraland/sdk/components/avatar_nametag.gen.d.ts +58 -0
  139. package/out-js/decentraland/sdk/components/avatar_nametag.gen.js +117 -0
  140. package/out-js/decentraland/sdk/components/avatar_nametag.gen.js.map +1 -0
  141. package/out-js/decentraland/sdk/components/avatar_shape.gen.d.ts +91 -0
  142. package/out-js/decentraland/sdk/components/avatar_shape.gen.js +283 -0
  143. package/out-js/decentraland/sdk/components/avatar_shape.gen.js.map +1 -0
  144. package/out-js/decentraland/sdk/components/billboard.gen.d.ts +61 -0
  145. package/out-js/decentraland/sdk/components/billboard.gen.js +142 -0
  146. package/out-js/decentraland/sdk/components/billboard.gen.js.map +1 -0
  147. package/out-js/decentraland/sdk/components/camera_layer.gen.d.ts +46 -0
  148. package/out-js/decentraland/sdk/components/camera_layer.gen.js +162 -0
  149. package/out-js/decentraland/sdk/components/camera_layer.gen.js.map +1 -0
  150. package/out-js/decentraland/sdk/components/camera_layers.gen.d.ts +30 -0
  151. package/out-js/decentraland/sdk/components/camera_layers.gen.js +80 -0
  152. package/out-js/decentraland/sdk/components/camera_layers.gen.js.map +1 -0
  153. package/out-js/decentraland/sdk/components/camera_mode.gen.d.ts +36 -0
  154. package/out-js/decentraland/sdk/components/camera_mode.gen.js +70 -0
  155. package/out-js/decentraland/sdk/components/camera_mode.gen.js.map +1 -0
  156. package/out-js/decentraland/sdk/components/camera_mode_area.gen.d.ts +77 -0
  157. package/out-js/decentraland/sdk/components/camera_mode_area.gen.js +228 -0
  158. package/out-js/decentraland/sdk/components/camera_mode_area.gen.js.map +1 -0
  159. package/out-js/decentraland/sdk/components/common/avatar_mask.gen.d.ts +8 -0
  160. package/out-js/decentraland/sdk/components/common/avatar_mask.gen.js +34 -0
  161. package/out-js/decentraland/sdk/components/common/avatar_mask.gen.js.map +1 -0
  162. package/out-js/decentraland/sdk/components/common/camera_type.gen.d.ts +10 -0
  163. package/out-js/decentraland/sdk/components/common/camera_type.gen.js +46 -0
  164. package/out-js/decentraland/sdk/components/common/camera_type.gen.js.map +1 -0
  165. package/out-js/decentraland/sdk/components/common/explorer_ui.gen.d.ts +19 -0
  166. package/out-js/decentraland/sdk/components/common/explorer_ui.gen.js +80 -0
  167. package/out-js/decentraland/sdk/components/common/explorer_ui.gen.js.map +1 -0
  168. package/out-js/decentraland/sdk/components/common/id.gen.d.ts +1 -0
  169. package/out-js/decentraland/sdk/components/common/id.gen.js +6 -0
  170. package/out-js/decentraland/sdk/components/common/id.gen.js.map +1 -0
  171. package/out-js/decentraland/sdk/components/common/input_action.gen.d.ts +44 -0
  172. package/out-js/decentraland/sdk/components/common/input_action.gen.js +227 -0
  173. package/out-js/decentraland/sdk/components/common/input_action.gen.js.map +1 -0
  174. package/out-js/decentraland/sdk/components/common/loading_state.gen.d.ts +11 -0
  175. package/out-js/decentraland/sdk/components/common/loading_state.gen.js +57 -0
  176. package/out-js/decentraland/sdk/components/common/loading_state.gen.js.map +1 -0
  177. package/out-js/decentraland/sdk/components/common/raycast_hit.gen.d.ts +45 -0
  178. package/out-js/decentraland/sdk/components/common/raycast_hit.gen.js +163 -0
  179. package/out-js/decentraland/sdk/components/common/raycast_hit.gen.js.map +1 -0
  180. package/out-js/decentraland/sdk/components/common/texts.gen.d.ts +23 -0
  181. package/out-js/decentraland/sdk/components/common/texts.gen.js +120 -0
  182. package/out-js/decentraland/sdk/components/common/texts.gen.js.map +1 -0
  183. package/out-js/decentraland/sdk/components/engine_info.gen.d.ts +45 -0
  184. package/out-js/decentraland/sdk/components/engine_info.gen.js +119 -0
  185. package/out-js/decentraland/sdk/components/engine_info.gen.js.map +1 -0
  186. package/out-js/decentraland/sdk/components/environment_fog.gen.d.ts +44 -0
  187. package/out-js/decentraland/sdk/components/environment_fog.gen.js +86 -0
  188. package/out-js/decentraland/sdk/components/environment_fog.gen.js.map +1 -0
  189. package/out-js/decentraland/sdk/components/explorer_configuration.gen.d.ts +35 -0
  190. package/out-js/decentraland/sdk/components/explorer_configuration.gen.js +69 -0
  191. package/out-js/decentraland/sdk/components/explorer_configuration.gen.js.map +1 -0
  192. package/out-js/decentraland/sdk/components/explorer_item_purchase_result.gen.d.ts +78 -0
  193. package/out-js/decentraland/sdk/components/explorer_item_purchase_result.gen.js +309 -0
  194. package/out-js/decentraland/sdk/components/explorer_item_purchase_result.gen.js.map +1 -0
  195. package/out-js/decentraland/sdk/components/explorer_ui_events_result.gen.d.ts +73 -0
  196. package/out-js/decentraland/sdk/components/explorer_ui_events_result.gen.js +232 -0
  197. package/out-js/decentraland/sdk/components/explorer_ui_events_result.gen.js.map +1 -0
  198. package/out-js/decentraland/sdk/components/global_light.gen.d.ts +50 -0
  199. package/out-js/decentraland/sdk/components/global_light.gen.js +103 -0
  200. package/out-js/decentraland/sdk/components/global_light.gen.js.map +1 -0
  201. package/out-js/decentraland/sdk/components/gltf_container.gen.d.ts +41 -0
  202. package/out-js/decentraland/sdk/components/gltf_container.gen.js +101 -0
  203. package/out-js/decentraland/sdk/components/gltf_container.gen.js.map +1 -0
  204. package/out-js/decentraland/sdk/components/gltf_container_loading_state.gen.d.ts +54 -0
  205. package/out-js/decentraland/sdk/components/gltf_container_loading_state.gen.js +158 -0
  206. package/out-js/decentraland/sdk/components/gltf_container_loading_state.gen.js.map +1 -0
  207. package/out-js/decentraland/sdk/components/gltf_node.gen.d.ts +66 -0
  208. package/out-js/decentraland/sdk/components/gltf_node.gen.js +69 -0
  209. package/out-js/decentraland/sdk/components/gltf_node.gen.js.map +1 -0
  210. package/out-js/decentraland/sdk/components/gltf_node_modifiers.gen.d.ts +57 -0
  211. package/out-js/decentraland/sdk/components/gltf_node_modifiers.gen.js +164 -0
  212. package/out-js/decentraland/sdk/components/gltf_node_modifiers.gen.js.map +1 -0
  213. package/out-js/decentraland/sdk/components/gltf_node_state.gen.d.ts +43 -0
  214. package/out-js/decentraland/sdk/components/gltf_node_state.gen.js +122 -0
  215. package/out-js/decentraland/sdk/components/gltf_node_state.gen.js.map +1 -0
  216. package/out-js/decentraland/sdk/components/input_modifier.gen.d.ts +52 -0
  217. package/out-js/decentraland/sdk/components/input_modifier.gen.js +233 -0
  218. package/out-js/decentraland/sdk/components/input_modifier.gen.js.map +1 -0
  219. package/out-js/decentraland/sdk/components/material.gen.d.ts +128 -0
  220. package/out-js/decentraland/sdk/components/material.gen.js +620 -0
  221. package/out-js/decentraland/sdk/components/material.gen.js.map +1 -0
  222. package/out-js/decentraland/sdk/components/mesh_collider.gen.d.ts +148 -0
  223. package/out-js/decentraland/sdk/components/mesh_collider.gen.js +558 -0
  224. package/out-js/decentraland/sdk/components/mesh_collider.gen.js.map +1 -0
  225. package/out-js/decentraland/sdk/components/mesh_renderer.gen.d.ts +120 -0
  226. package/out-js/decentraland/sdk/components/mesh_renderer.gen.js +468 -0
  227. package/out-js/decentraland/sdk/components/mesh_renderer.gen.js.map +1 -0
  228. package/out-js/decentraland/sdk/components/nft_shape.gen.d.ts +74 -0
  229. package/out-js/decentraland/sdk/components/nft_shape.gen.js +259 -0
  230. package/out-js/decentraland/sdk/components/nft_shape.gen.js.map +1 -0
  231. package/out-js/decentraland/sdk/components/player_identity_data.gen.d.ts +37 -0
  232. package/out-js/decentraland/sdk/components/player_identity_data.gen.js +83 -0
  233. package/out-js/decentraland/sdk/components/player_identity_data.gen.js.map +1 -0
  234. package/out-js/decentraland/sdk/components/pointer_events.gen.d.ts +115 -0
  235. package/out-js/decentraland/sdk/components/pointer_events.gen.js +319 -0
  236. package/out-js/decentraland/sdk/components/pointer_events.gen.js.map +1 -0
  237. package/out-js/decentraland/sdk/components/pointer_events_result.gen.d.ts +42 -0
  238. package/out-js/decentraland/sdk/components/pointer_events_result.gen.js +133 -0
  239. package/out-js/decentraland/sdk/components/pointer_events_result.gen.js.map +1 -0
  240. package/out-js/decentraland/sdk/components/pointer_lock.gen.d.ts +35 -0
  241. package/out-js/decentraland/sdk/components/pointer_lock.gen.js +69 -0
  242. package/out-js/decentraland/sdk/components/pointer_lock.gen.js.map +1 -0
  243. package/out-js/decentraland/sdk/components/raycast.gen.d.ts +92 -0
  244. package/out-js/decentraland/sdk/components/raycast.gen.js +337 -0
  245. package/out-js/decentraland/sdk/components/raycast.gen.js.map +1 -0
  246. package/out-js/decentraland/sdk/components/raycast_result.gen.d.ts +48 -0
  247. package/out-js/decentraland/sdk/components/raycast_result.gen.js +133 -0
  248. package/out-js/decentraland/sdk/components/raycast_result.gen.js.map +1 -0
  249. package/out-js/decentraland/sdk/components/realm_info.gen.d.ts +43 -0
  250. package/out-js/decentraland/sdk/components/realm_info.gen.js +151 -0
  251. package/out-js/decentraland/sdk/components/realm_info.gen.js.map +1 -0
  252. package/out-js/decentraland/sdk/components/skybox.gen.d.ts +103 -0
  253. package/out-js/decentraland/sdk/components/skybox.gen.js +355 -0
  254. package/out-js/decentraland/sdk/components/skybox.gen.js.map +1 -0
  255. package/out-js/decentraland/sdk/components/sun.gen.d.ts +53 -0
  256. package/out-js/decentraland/sdk/components/sun.gen.js +114 -0
  257. package/out-js/decentraland/sdk/components/sun.gen.js.map +1 -0
  258. package/out-js/decentraland/sdk/components/text_shape.gen.d.ts +83 -0
  259. package/out-js/decentraland/sdk/components/text_shape.gen.js +358 -0
  260. package/out-js/decentraland/sdk/components/text_shape.gen.js.map +1 -0
  261. package/out-js/decentraland/sdk/components/texture_camera.gen.d.ts +86 -0
  262. package/out-js/decentraland/sdk/components/texture_camera.gen.js +297 -0
  263. package/out-js/decentraland/sdk/components/texture_camera.gen.js.map +1 -0
  264. package/out-js/decentraland/sdk/components/touch_screen_controls.gen.d.ts +77 -0
  265. package/out-js/decentraland/sdk/components/touch_screen_controls.gen.js +202 -0
  266. package/out-js/decentraland/sdk/components/touch_screen_controls.gen.js.map +1 -0
  267. package/out-js/decentraland/sdk/components/tween.gen.d.ts +220 -0
  268. package/out-js/decentraland/sdk/components/tween.gen.js +1214 -0
  269. package/out-js/decentraland/sdk/components/tween.gen.js.map +1 -0
  270. package/out-js/decentraland/sdk/components/tween_sequence.gen.d.ts +39 -0
  271. package/out-js/decentraland/sdk/components/tween_sequence.gen.js +123 -0
  272. package/out-js/decentraland/sdk/components/tween_sequence.gen.js.map +1 -0
  273. package/out-js/decentraland/sdk/components/tween_state.gen.d.ts +40 -0
  274. package/out-js/decentraland/sdk/components/tween_state.gen.js +122 -0
  275. package/out-js/decentraland/sdk/components/tween_state.gen.js.map +1 -0
  276. package/out-js/decentraland/sdk/components/ui_background.gen.d.ts +63 -0
  277. package/out-js/decentraland/sdk/components/ui_background.gen.js +198 -0
  278. package/out-js/decentraland/sdk/components/ui_background.gen.js.map +1 -0
  279. package/out-js/decentraland/sdk/components/ui_canvas.gen.d.ts +35 -0
  280. package/out-js/decentraland/sdk/components/ui_canvas.gen.js +98 -0
  281. package/out-js/decentraland/sdk/components/ui_canvas.gen.js.map +1 -0
  282. package/out-js/decentraland/sdk/components/ui_dropdown.gen.d.ts +47 -0
  283. package/out-js/decentraland/sdk/components/ui_dropdown.gen.js +201 -0
  284. package/out-js/decentraland/sdk/components/ui_dropdown.gen.js.map +1 -0
  285. package/out-js/decentraland/sdk/components/ui_dropdown_result.gen.d.ts +30 -0
  286. package/out-js/decentraland/sdk/components/ui_dropdown_result.gen.js +69 -0
  287. package/out-js/decentraland/sdk/components/ui_dropdown_result.gen.js.map +1 -0
  288. package/out-js/decentraland/sdk/components/ui_input.gen.d.ts +50 -0
  289. package/out-js/decentraland/sdk/components/ui_input.gen.js +211 -0
  290. package/out-js/decentraland/sdk/components/ui_input.gen.js.map +1 -0
  291. package/out-js/decentraland/sdk/components/ui_input_binding.gen.d.ts +52 -0
  292. package/out-js/decentraland/sdk/components/ui_input_binding.gen.js +81 -0
  293. package/out-js/decentraland/sdk/components/ui_input_binding.gen.js.map +1 -0
  294. package/out-js/decentraland/sdk/components/ui_input_result.gen.d.ts +32 -0
  295. package/out-js/decentraland/sdk/components/ui_input_result.gen.js +83 -0
  296. package/out-js/decentraland/sdk/components/ui_input_result.gen.js.map +1 -0
  297. package/out-js/decentraland/sdk/components/ui_scroll_result.gen.d.ts +31 -0
  298. package/out-js/decentraland/sdk/components/ui_scroll_result.gen.js +71 -0
  299. package/out-js/decentraland/sdk/components/ui_scroll_result.gen.js.map +1 -0
  300. package/out-js/decentraland/sdk/components/ui_text.gen.d.ts +59 -0
  301. package/out-js/decentraland/sdk/components/ui_text.gen.js +219 -0
  302. package/out-js/decentraland/sdk/components/ui_text.gen.js.map +1 -0
  303. package/out-js/decentraland/sdk/components/ui_transform.gen.d.ts +271 -0
  304. package/out-js/decentraland/sdk/components/ui_transform.gen.js +1720 -0
  305. package/out-js/decentraland/sdk/components/ui_transform.gen.js.map +1 -0
  306. package/out-js/decentraland/sdk/components/video_player.gen.d.ts +51 -0
  307. package/out-js/decentraland/sdk/components/video_player.gen.js +177 -0
  308. package/out-js/decentraland/sdk/components/video_player.gen.js.map +1 -0
  309. package/out-js/decentraland/sdk/components/visibility_component.gen.d.ts +39 -0
  310. package/out-js/decentraland/sdk/components/visibility_component.gen.js +83 -0
  311. package/out-js/decentraland/sdk/components/visibility_component.gen.js.map +1 -0
  312. package/out-js/decentraland/sdk/development/local_development.gen.d.ts +70 -0
  313. package/out-js/decentraland/sdk/development/local_development.gen.js +283 -0
  314. package/out-js/decentraland/sdk/development/local_development.gen.js.map +1 -0
  315. package/out-js/decentraland/sdk/ecs6/components_ecs6.gen.d.ts +1005 -0
  316. package/out-js/decentraland/sdk/ecs6/components_ecs6.gen.js +7845 -0
  317. package/out-js/decentraland/sdk/ecs6/components_ecs6.gen.js.map +1 -0
  318. package/out-js/decentraland/sdk/ecs6/engine_interface_ecs6.gen.d.ts +398 -0
  319. package/out-js/decentraland/sdk/ecs6/engine_interface_ecs6.gen.js +2512 -0
  320. package/out-js/decentraland/sdk/ecs6/engine_interface_ecs6.gen.js.map +1 -0
  321. package/out-js/decentraland/social_service/errors.gen.d.ts +96 -0
  322. package/out-js/decentraland/social_service/errors.gen.js +405 -0
  323. package/out-js/decentraland/social_service/errors.gen.js.map +1 -0
  324. package/out-js/decentraland/social_service/v1/social_service_v1.gen.d.ts +501 -0
  325. package/out-js/decentraland/social_service/v1/social_service_v1.gen.js +2518 -0
  326. package/out-js/decentraland/social_service/v1/social_service_v1.gen.js.map +1 -0
  327. package/out-js/decentraland/social_service/v2/social_service_v2.gen.d.ts +1892 -0
  328. package/out-js/decentraland/social_service/v2/social_service_v2.gen.js +9519 -0
  329. package/out-js/decentraland/social_service/v2/social_service_v2.gen.js.map +1 -0
  330. package/out-js/google/protobuf/descriptor.gen.d.ts +1155 -0
  331. package/out-js/google/protobuf/descriptor.gen.js +3850 -0
  332. package/out-js/google/protobuf/descriptor.gen.js.map +1 -0
  333. package/out-js/google/protobuf/empty.gen.d.ts +38 -0
  334. package/out-js/google/protobuf/empty.gen.js +54 -0
  335. package/out-js/google/protobuf/empty.gen.js.map +1 -0
  336. package/out-js/quests.gen.d.ts +1 -0
  337. package/out-js/quests.gen.js +6 -0
  338. package/out-js/quests.gen.js.map +1 -0
  339. package/out-js/sdk-apis.gen.d.ts +1 -0
  340. package/out-js/sdk-apis.gen.js +6 -0
  341. package/out-js/sdk-apis.gen.js.map +1 -0
  342. package/out-js/sdk-components.gen.d.ts +1 -0
  343. package/out-js/sdk-components.gen.js +6 -0
  344. package/out-js/sdk-components.gen.js.map +1 -0
  345. package/out-js/sdk-development.gen.d.ts +1 -0
  346. package/out-js/sdk-development.gen.js +6 -0
  347. package/out-js/sdk-development.gen.js.map +1 -0
  348. package/out-js/social.gen.d.ts +1 -0
  349. package/out-js/social.gen.js +6 -0
  350. package/out-js/social.gen.js.map +1 -0
  351. package/out-ts/about.gen.ts +3 -0
  352. package/out-ts/comms.gen.ts +3 -0
  353. package/out-ts/decentraland/common/border_rect.gen.ts +230 -0
  354. package/out-ts/decentraland/common/colors.gen.ts +293 -0
  355. package/out-ts/decentraland/common/content_mapping.gen.ts +93 -0
  356. package/out-ts/decentraland/common/gradient.gen.ts +170 -0
  357. package/out-ts/decentraland/common/sdk/user_data.gen.ts +370 -0
  358. package/out-ts/decentraland/common/texture.gen.ts +654 -0
  359. package/out-ts/decentraland/common/vectors.gen.ts +377 -0
  360. package/out-ts/decentraland/kernel/apis/comms_api.gen.ts +884 -0
  361. package/out-ts/decentraland/kernel/apis/communications_controller.gen.ts +434 -0
  362. package/out-ts/decentraland/kernel/apis/dev_tools.gen.ts +161 -0
  363. package/out-ts/decentraland/kernel/apis/engine_api.gen.ts +1587 -0
  364. package/out-ts/decentraland/kernel/apis/environment_api.gen.ts +1264 -0
  365. package/out-ts/decentraland/kernel/apis/ethereum_controller.gen.ts +982 -0
  366. package/out-ts/decentraland/kernel/apis/parcel_identity.gen.ts +608 -0
  367. package/out-ts/decentraland/kernel/apis/permissions.gen.ts +397 -0
  368. package/out-ts/decentraland/kernel/apis/players.gen.ts +415 -0
  369. package/out-ts/decentraland/kernel/apis/portable_experiences.gen.ts +668 -0
  370. package/out-ts/decentraland/kernel/apis/restricted_actions.gen.ts +1910 -0
  371. package/out-ts/decentraland/kernel/apis/runtime.gen.ts +963 -0
  372. package/out-ts/decentraland/kernel/apis/scene.gen.ts +192 -0
  373. package/out-ts/decentraland/kernel/apis/scene_credits.gen.ts +459 -0
  374. package/out-ts/decentraland/kernel/apis/signed_fetch.gen.ts +691 -0
  375. package/out-ts/decentraland/kernel/apis/social_controller.gen.ts +230 -0
  376. package/out-ts/decentraland/kernel/apis/testing.gen.ts +1270 -0
  377. package/out-ts/decentraland/kernel/apis/user_action_module.gen.ts +146 -0
  378. package/out-ts/decentraland/kernel/apis/user_identity.gen.ts +264 -0
  379. package/out-ts/decentraland/kernel/comms/rfc4/comms.gen.ts +2806 -0
  380. package/out-ts/decentraland/kernel/comms/rfc5/ws_comms.gen.ts +1051 -0
  381. package/out-ts/decentraland/kernel/comms/v3/archipelago.gen.ts +2198 -0
  382. package/out-ts/decentraland/pulse/pulse_clusters.gen.ts +797 -0
  383. package/out-ts/decentraland/quests/definitions.gen.ts +3020 -0
  384. package/out-ts/decentraland/realm/about.gen.ts +1415 -0
  385. package/out-ts/decentraland/sdk/components/animator.gen.ts +240 -0
  386. package/out-ts/decentraland/sdk/components/audio_source.gen.ts +209 -0
  387. package/out-ts/decentraland/sdk/components/audio_stream.gen.ts +182 -0
  388. package/out-ts/decentraland/sdk/components/avatar_attach.gen.ts +289 -0
  389. package/out-ts/decentraland/sdk/components/avatar_base.gen.ts +171 -0
  390. package/out-ts/decentraland/sdk/components/avatar_emote_command.gen.ts +202 -0
  391. package/out-ts/decentraland/sdk/components/avatar_equipped_data.gen.ts +237 -0
  392. package/out-ts/decentraland/sdk/components/avatar_locomotion_settings.gen.ts +237 -0
  393. package/out-ts/decentraland/sdk/components/avatar_modifier_area.gen.ts +486 -0
  394. package/out-ts/decentraland/sdk/components/avatar_movement.gen.ts +372 -0
  395. package/out-ts/decentraland/sdk/components/avatar_movement_info.gen.ts +435 -0
  396. package/out-ts/decentraland/sdk/components/avatar_nametag.gen.ts +162 -0
  397. package/out-ts/decentraland/sdk/components/avatar_shape.gen.ts +386 -0
  398. package/out-ts/decentraland/sdk/components/billboard.gen.ts +172 -0
  399. package/out-ts/decentraland/sdk/components/camera_layer.gen.ts +202 -0
  400. package/out-ts/decentraland/sdk/components/camera_layers.gen.ts +92 -0
  401. package/out-ts/decentraland/sdk/components/camera_mode.gen.ts +86 -0
  402. package/out-ts/decentraland/sdk/components/camera_mode_area.gen.ts +294 -0
  403. package/out-ts/decentraland/sdk/components/common/avatar_mask.gen.ts +31 -0
  404. package/out-ts/decentraland/sdk/components/common/camera_type.gen.ts +43 -0
  405. package/out-ts/decentraland/sdk/components/common/explorer_ui.gen.ts +77 -0
  406. package/out-ts/decentraland/sdk/components/common/id.gen.ts +3 -0
  407. package/out-ts/decentraland/sdk/components/common/input_action.gen.ts +224 -0
  408. package/out-ts/decentraland/sdk/components/common/loading_state.gen.ts +54 -0
  409. package/out-ts/decentraland/sdk/components/common/raycast_hit.gen.ts +204 -0
  410. package/out-ts/decentraland/sdk/components/common/texts.gen.ts +117 -0
  411. package/out-ts/decentraland/sdk/components/engine_info.gen.ts +149 -0
  412. package/out-ts/decentraland/sdk/components/environment_fog.gen.ts +113 -0
  413. package/out-ts/decentraland/sdk/components/explorer_configuration.gen.ts +87 -0
  414. package/out-ts/decentraland/sdk/components/explorer_item_purchase_result.gen.ts +370 -0
  415. package/out-ts/decentraland/sdk/components/explorer_ui_events_result.gen.ts +281 -0
  416. package/out-ts/decentraland/sdk/components/global_light.gen.ts +138 -0
  417. package/out-ts/decentraland/sdk/components/gltf_container.gen.ts +127 -0
  418. package/out-ts/decentraland/sdk/components/gltf_container_loading_state.gen.ts +195 -0
  419. package/out-ts/decentraland/sdk/components/gltf_node.gen.ts +116 -0
  420. package/out-ts/decentraland/sdk/components/gltf_node_modifiers.gen.ts +204 -0
  421. package/out-ts/decentraland/sdk/components/gltf_node_state.gen.ts +139 -0
  422. package/out-ts/decentraland/sdk/components/input_modifier.gen.ts +265 -0
  423. package/out-ts/decentraland/sdk/components/material.gen.ts +756 -0
  424. package/out-ts/decentraland/sdk/components/mesh_collider.gen.ts +635 -0
  425. package/out-ts/decentraland/sdk/components/mesh_renderer.gen.ts +551 -0
  426. package/out-ts/decentraland/sdk/components/nft_shape.gen.ts +288 -0
  427. package/out-ts/decentraland/sdk/components/player_identity_data.gen.ts +102 -0
  428. package/out-ts/decentraland/sdk/components/pointer_events.gen.ts +436 -0
  429. package/out-ts/decentraland/sdk/components/pointer_events_result.gen.ts +170 -0
  430. package/out-ts/decentraland/sdk/components/pointer_lock.gen.ts +85 -0
  431. package/out-ts/decentraland/sdk/components/raycast.gen.ts +405 -0
  432. package/out-ts/decentraland/sdk/components/raycast_result.gen.ts +168 -0
  433. package/out-ts/decentraland/sdk/components/realm_info.gen.ts +183 -0
  434. package/out-ts/decentraland/sdk/components/skybox.gen.ts +440 -0
  435. package/out-ts/decentraland/sdk/components/sun.gen.ts +155 -0
  436. package/out-ts/decentraland/sdk/components/text_shape.gen.ts +488 -0
  437. package/out-ts/decentraland/sdk/components/texture_camera.gen.ts +362 -0
  438. package/out-ts/decentraland/sdk/components/touch_screen_controls.gen.ts +265 -0
  439. package/out-ts/decentraland/sdk/components/tween.gen.ts +1336 -0
  440. package/out-ts/decentraland/sdk/components/tween_sequence.gen.ts +134 -0
  441. package/out-ts/decentraland/sdk/components/tween_state.gen.ts +136 -0
  442. package/out-ts/decentraland/sdk/components/ui_background.gen.ts +223 -0
  443. package/out-ts/decentraland/sdk/components/ui_canvas.gen.ts +115 -0
  444. package/out-ts/decentraland/sdk/components/ui_dropdown.gen.ts +249 -0
  445. package/out-ts/decentraland/sdk/components/ui_dropdown_result.gen.ts +80 -0
  446. package/out-ts/decentraland/sdk/components/ui_input.gen.ts +269 -0
  447. package/out-ts/decentraland/sdk/components/ui_input_binding.gen.ts +114 -0
  448. package/out-ts/decentraland/sdk/components/ui_input_result.gen.ts +97 -0
  449. package/out-ts/decentraland/sdk/components/ui_scroll_result.gen.ts +83 -0
  450. package/out-ts/decentraland/sdk/components/ui_text.gen.ts +279 -0
  451. package/out-ts/decentraland/sdk/components/ui_transform.gen.ts +1968 -0
  452. package/out-ts/decentraland/sdk/components/video_player.gen.ts +231 -0
  453. package/out-ts/decentraland/sdk/components/visibility_component.gen.ts +108 -0
  454. package/out-ts/decentraland/sdk/development/local_development.gen.ts +316 -0
  455. package/out-ts/decentraland/sdk/ecs6/components_ecs6.gen.ts +8957 -0
  456. package/out-ts/decentraland/sdk/ecs6/engine_interface_ecs6.gen.ts +2886 -0
  457. package/out-ts/decentraland/social_service/errors.gen.ts +442 -0
  458. package/out-ts/decentraland/social_service/v1/social_service_v1.gen.ts +2799 -0
  459. package/out-ts/decentraland/social_service/v2/social_service_v2.gen.ts +10939 -0
  460. package/out-ts/google/protobuf/descriptor.gen.ts +4781 -0
  461. package/out-ts/google/protobuf/empty.gen.ts +72 -0
  462. package/out-ts/quests.gen.ts +3 -0
  463. package/out-ts/sdk-apis.gen.ts +3 -0
  464. package/out-ts/sdk-components.gen.ts +3 -0
  465. package/out-ts/sdk-development.gen.ts +3 -0
  466. package/out-ts/social.gen.ts +3 -0
  467. package/package.json +35 -4
  468. package/proto/decentraland/common/auth.proto +22 -0
  469. package/proto/decentraland/common/border_rect.proto +18 -0
  470. package/proto/decentraland/common/colors.proto +21 -0
  471. package/proto/decentraland/common/content_mapping.proto +7 -0
  472. package/proto/decentraland/common/entity.proto +13 -0
  473. package/proto/decentraland/common/floats.proto +8 -0
  474. package/proto/decentraland/common/gradient.proto +16 -0
  475. package/proto/decentraland/common/options.proto +51 -0
  476. package/proto/decentraland/common/quantization_example.proto +164 -0
  477. package/proto/decentraland/common/sdk/user_data.proto +25 -0
  478. package/proto/decentraland/common/texture.proto +52 -0
  479. package/proto/decentraland/common/vectors.proto +26 -0
  480. package/proto/decentraland/kernel/apis/comms_api.proto +61 -0
  481. package/proto/decentraland/kernel/apis/communications_controller.proto +29 -0
  482. package/proto/decentraland/kernel/apis/dev_tools.proto +15 -0
  483. package/proto/decentraland/kernel/apis/engine_api.proto +118 -0
  484. package/proto/decentraland/kernel/apis/environment_api.proto +76 -0
  485. package/proto/decentraland/kernel/apis/ethereum_controller.proto +64 -0
  486. package/proto/decentraland/kernel/apis/parcel_identity.proto +43 -0
  487. package/proto/decentraland/kernel/apis/permissions.proto +36 -0
  488. package/proto/decentraland/kernel/apis/players.proto +35 -0
  489. package/proto/decentraland/kernel/apis/portable_experiences.proto +55 -0
  490. package/proto/decentraland/kernel/apis/restricted_actions.proto +179 -0
  491. package/proto/decentraland/kernel/apis/runtime.proto +78 -0
  492. package/proto/decentraland/kernel/apis/scene.proto +16 -0
  493. package/proto/decentraland/kernel/apis/scene_credits.proto +108 -0
  494. package/proto/decentraland/kernel/apis/signed_fetch.proto +33 -0
  495. package/proto/decentraland/kernel/apis/social_controller.proto +19 -0
  496. package/proto/decentraland/kernel/apis/testing.proto +100 -0
  497. package/proto/decentraland/kernel/apis/user_action_module.proto +13 -0
  498. package/proto/decentraland/kernel/apis/user_identity.proto +22 -0
  499. package/proto/decentraland/kernel/comms/rfc4/comms.proto +253 -0
  500. package/proto/decentraland/kernel/comms/rfc5/ws_comms.proto +107 -0
  501. package/proto/decentraland/kernel/comms/v1/broker.proto +114 -0
  502. package/proto/decentraland/kernel/comms/v1/comms.proto +68 -0
  503. package/proto/decentraland/kernel/comms/v2/comms.proto +61 -0
  504. package/proto/decentraland/kernel/comms/v3/archipelago.proto +159 -0
  505. package/proto/decentraland/kernel/comms/v3/comms.proto +64 -0
  506. package/proto/decentraland/pulse/pulse_client.proto +147 -0
  507. package/proto/decentraland/pulse/pulse_clusters.proto +94 -0
  508. package/proto/decentraland/pulse/pulse_server.proto +217 -0
  509. package/proto/decentraland/pulse/pulse_shared.proto +57 -0
  510. package/proto/decentraland/quests/definitions.proto +185 -0
  511. package/proto/decentraland/realm/about.proto +138 -0
  512. package/proto/decentraland/sdk/components/README.md +32 -0
  513. package/proto/decentraland/sdk/components/Transform.md +25 -0
  514. package/proto/decentraland/sdk/components/animator.proto +31 -0
  515. package/proto/decentraland/sdk/components/asset_load.proto +10 -0
  516. package/proto/decentraland/sdk/components/asset_load_loading_state.proto +16 -0
  517. package/proto/decentraland/sdk/components/audio_analysis.proto +44 -0
  518. package/proto/decentraland/sdk/components/audio_event.proto +12 -0
  519. package/proto/decentraland/sdk/components/audio_source.proto +31 -0
  520. package/proto/decentraland/sdk/components/audio_stream.proto +22 -0
  521. package/proto/decentraland/sdk/components/avatar_attach.proto +51 -0
  522. package/proto/decentraland/sdk/components/avatar_base.proto +16 -0
  523. package/proto/decentraland/sdk/components/avatar_emote_command.proto +32 -0
  524. package/proto/decentraland/sdk/components/avatar_equipped_data.proto +23 -0
  525. package/proto/decentraland/sdk/components/avatar_locomotion_settings.proto +21 -0
  526. package/proto/decentraland/sdk/components/avatar_modifier_area.proto +54 -0
  527. package/proto/decentraland/sdk/components/avatar_movement.proto +63 -0
  528. package/proto/decentraland/sdk/components/avatar_movement_info.proto +38 -0
  529. package/proto/decentraland/sdk/components/avatar_nametag.proto +33 -0
  530. package/proto/decentraland/sdk/components/avatar_shape.proto +60 -0
  531. package/proto/decentraland/sdk/components/billboard.proto +35 -0
  532. package/proto/decentraland/sdk/components/camera_layer.proto +30 -0
  533. package/proto/decentraland/sdk/components/camera_layers.proto +11 -0
  534. package/proto/decentraland/sdk/components/camera_mode.proto +12 -0
  535. package/proto/decentraland/sdk/components/camera_mode_area.proto +42 -0
  536. package/proto/decentraland/sdk/components/common/avatar_mask.proto +7 -0
  537. package/proto/decentraland/sdk/components/common/camera_transition.proto +11 -0
  538. package/proto/decentraland/sdk/components/common/camera_type.proto +9 -0
  539. package/proto/decentraland/sdk/components/common/explorer_ui.proto +15 -0
  540. package/proto/decentraland/sdk/components/common/id.md +2 -0
  541. package/proto/decentraland/sdk/components/common/id.proto +8 -0
  542. package/proto/decentraland/sdk/components/common/input_action.proto +40 -0
  543. package/proto/decentraland/sdk/components/common/loading_state.proto +10 -0
  544. package/proto/decentraland/sdk/components/common/media_state.proto +13 -0
  545. package/proto/decentraland/sdk/components/common/raycast_hit.proto +16 -0
  546. package/proto/decentraland/sdk/components/common/texts.proto +21 -0
  547. package/proto/decentraland/sdk/components/engine_info.proto +17 -0
  548. package/proto/decentraland/sdk/components/environment_fog.proto +21 -0
  549. package/proto/decentraland/sdk/components/explorer_configuration.proto +11 -0
  550. package/proto/decentraland/sdk/components/explorer_item_purchase_result.proto +24 -0
  551. package/proto/decentraland/sdk/components/explorer_ui_events_result.proto +33 -0
  552. package/proto/decentraland/sdk/components/global_light.proto +22 -0
  553. package/proto/decentraland/sdk/components/gltf_container.proto +19 -0
  554. package/proto/decentraland/sdk/components/gltf_container_loading_state.proto +26 -0
  555. package/proto/decentraland/sdk/components/gltf_node.proto +42 -0
  556. package/proto/decentraland/sdk/components/gltf_node_modifiers.proto +25 -0
  557. package/proto/decentraland/sdk/components/gltf_node_state.proto +20 -0
  558. package/proto/decentraland/sdk/components/input_modifier.proto +22 -0
  559. package/proto/decentraland/sdk/components/light_source.proto +28 -0
  560. package/proto/decentraland/sdk/components/main_camera.proto +11 -0
  561. package/proto/decentraland/sdk/components/map_pin.proto +16 -0
  562. package/proto/decentraland/sdk/components/material.proto +69 -0
  563. package/proto/decentraland/sdk/components/mesh_collider.proto +69 -0
  564. package/proto/decentraland/sdk/components/mesh_renderer.proto +48 -0
  565. package/proto/decentraland/sdk/components/nft_shape.proto +48 -0
  566. package/proto/decentraland/sdk/components/particle_system.proto +133 -0
  567. package/proto/decentraland/sdk/components/physics_combined_force.proto +21 -0
  568. package/proto/decentraland/sdk/components/physics_combined_impulse.proto +23 -0
  569. package/proto/decentraland/sdk/components/player_identity_data.proto +13 -0
  570. package/proto/decentraland/sdk/components/pointer_events.proto +68 -0
  571. package/proto/decentraland/sdk/components/pointer_events_result.proto +19 -0
  572. package/proto/decentraland/sdk/components/pointer_lock.proto +11 -0
  573. package/proto/decentraland/sdk/components/primary_pointer_info.proto +44 -0
  574. package/proto/decentraland/sdk/components/raycast.proto +71 -0
  575. package/proto/decentraland/sdk/components/raycast_result.proto +21 -0
  576. package/proto/decentraland/sdk/components/realm_info.proto +15 -0
  577. package/proto/decentraland/sdk/components/skybox.proto +51 -0
  578. package/proto/decentraland/sdk/components/skybox_time.proto +20 -0
  579. package/proto/decentraland/sdk/components/sun.proto +26 -0
  580. package/proto/decentraland/sdk/components/text_shape.proto +46 -0
  581. package/proto/decentraland/sdk/components/texture_camera.proto +46 -0
  582. package/proto/decentraland/sdk/components/touch_screen_controls.proto +38 -0
  583. package/proto/decentraland/sdk/components/trigger_area.proto +23 -0
  584. package/proto/decentraland/sdk/components/trigger_area_result.proto +34 -0
  585. package/proto/decentraland/sdk/components/tween.proto +117 -0
  586. package/proto/decentraland/sdk/components/tween_sequence.proto +18 -0
  587. package/proto/decentraland/sdk/components/tween_state.proto +18 -0
  588. package/proto/decentraland/sdk/components/ui_background.proto +34 -0
  589. package/proto/decentraland/sdk/components/ui_canvas.proto +16 -0
  590. package/proto/decentraland/sdk/components/ui_canvas_information.proto +30 -0
  591. package/proto/decentraland/sdk/components/ui_dropdown.proto +23 -0
  592. package/proto/decentraland/sdk/components/ui_dropdown_result.proto +11 -0
  593. package/proto/decentraland/sdk/components/ui_input.proto +23 -0
  594. package/proto/decentraland/sdk/components/ui_input_binding.proto +27 -0
  595. package/proto/decentraland/sdk/components/ui_input_result.proto +12 -0
  596. package/proto/decentraland/sdk/components/ui_layout_feedback.proto +28 -0
  597. package/proto/decentraland/sdk/components/ui_scroll_result.proto +12 -0
  598. package/proto/decentraland/sdk/components/ui_text.proto +32 -0
  599. package/proto/decentraland/sdk/components/ui_transform.proto +198 -0
  600. package/proto/decentraland/sdk/components/video_event.proto +25 -0
  601. package/proto/decentraland/sdk/components/video_player.proto +24 -0
  602. package/proto/decentraland/sdk/components/virtual_camera.proto +18 -0
  603. package/proto/decentraland/sdk/components/visibility_component.proto +16 -0
  604. package/proto/decentraland/sdk/development/local_development.proto +29 -0
  605. package/proto/decentraland/sdk/ecs6/components_ecs6.proto +678 -0
  606. package/proto/decentraland/sdk/ecs6/engine_interface_ecs6.proto +151 -0
  607. package/proto/decentraland/social_service/errors.proto +30 -0
  608. package/proto/decentraland/social_service/v1/social_service_v1.proto +163 -0
  609. package/proto/decentraland/social_service/v2/social_service_v2.proto +769 -0
  610. package/protoc-gen-bitwise/generator_csharp.js +248 -0
  611. package/protoc-gen-bitwise/options.js +139 -0
  612. package/protoc-gen-bitwise/plugin.js +87 -0
  613. package/protoc-gen-bitwise/runtime/cs/Quantize.cs +70 -0
  614. package/protoc-gen-bitwise/wire.js +239 -0
  615. package/public/about.proto +5 -0
  616. package/public/comms.proto +6 -0
  617. package/public/quests.proto +5 -0
  618. package/public/sdk-apis.proto +26 -0
  619. package/public/sdk-components.proto +62 -0
  620. package/public/sdk-development.proto +5 -0
  621. package/public/social.proto +6 -0
@@ -0,0 +1,4781 @@
1
+ /* eslint-disable */
2
+ import Long from "long";
3
+ import _m0 from "protobufjs/minimal";
4
+
5
+ export const protobufPackage = "google.protobuf";
6
+
7
+ /**
8
+ * The protocol compiler can output a FileDescriptorSet containing the .proto
9
+ * files it parses.
10
+ */
11
+ export interface FileDescriptorSet {
12
+ file: FileDescriptorProto[];
13
+ }
14
+
15
+ /** Describes a complete .proto file. */
16
+ export interface FileDescriptorProto {
17
+ /** file name, relative to root of source tree */
18
+ name: string;
19
+ /** e.g. "foo", "foo.bar", etc. */
20
+ package: string;
21
+ /** Names of files imported by this file. */
22
+ dependency: string[];
23
+ /** Indexes of the public imported files in the dependency list above. */
24
+ publicDependency: number[];
25
+ /**
26
+ * Indexes of the weak imported files in the dependency list.
27
+ * For Google-internal migration only. Do not use.
28
+ */
29
+ weakDependency: number[];
30
+ /** All top-level definitions in this file. */
31
+ messageType: DescriptorProto[];
32
+ enumType: EnumDescriptorProto[];
33
+ service: ServiceDescriptorProto[];
34
+ extension: FieldDescriptorProto[];
35
+ options:
36
+ | FileOptions
37
+ | undefined;
38
+ /**
39
+ * This field contains optional information about the original source code.
40
+ * You may safely remove this entire field without harming runtime
41
+ * functionality of the descriptors -- the information is needed only by
42
+ * development tools.
43
+ */
44
+ sourceCodeInfo:
45
+ | SourceCodeInfo
46
+ | undefined;
47
+ /**
48
+ * The syntax of the proto file.
49
+ * The supported values are "proto2", "proto3", and "editions".
50
+ *
51
+ * If `edition` is present, this value must be "editions".
52
+ */
53
+ syntax: string;
54
+ /** The edition of the proto file, which is an opaque string. */
55
+ edition: string;
56
+ }
57
+
58
+ /** Describes a message type. */
59
+ export interface DescriptorProto {
60
+ name: string;
61
+ field: FieldDescriptorProto[];
62
+ extension: FieldDescriptorProto[];
63
+ nestedType: DescriptorProto[];
64
+ enumType: EnumDescriptorProto[];
65
+ extensionRange: DescriptorProto_ExtensionRange[];
66
+ oneofDecl: OneofDescriptorProto[];
67
+ options: MessageOptions | undefined;
68
+ reservedRange: DescriptorProto_ReservedRange[];
69
+ /**
70
+ * Reserved field names, which may not be used by fields in the same message.
71
+ * A given name may only be reserved once.
72
+ */
73
+ reservedName: string[];
74
+ }
75
+
76
+ export interface DescriptorProto_ExtensionRange {
77
+ /** Inclusive. */
78
+ start: number;
79
+ /** Exclusive. */
80
+ end: number;
81
+ options: ExtensionRangeOptions | undefined;
82
+ }
83
+
84
+ /**
85
+ * Range of reserved tag numbers. Reserved tag numbers may not be used by
86
+ * fields or extension ranges in the same message. Reserved ranges may
87
+ * not overlap.
88
+ */
89
+ export interface DescriptorProto_ReservedRange {
90
+ /** Inclusive. */
91
+ start: number;
92
+ /** Exclusive. */
93
+ end: number;
94
+ }
95
+
96
+ export interface ExtensionRangeOptions {
97
+ /** The parser stores options it doesn't recognize here. See above. */
98
+ uninterpretedOption: UninterpretedOption[];
99
+ }
100
+
101
+ /** Describes a field within a message. */
102
+ export interface FieldDescriptorProto {
103
+ name: string;
104
+ number: number;
105
+ label: FieldDescriptorProto_Label;
106
+ /**
107
+ * If type_name is set, this need not be set. If both this and type_name
108
+ * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
109
+ */
110
+ type: FieldDescriptorProto_Type;
111
+ /**
112
+ * For message and enum types, this is the name of the type. If the name
113
+ * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping
114
+ * rules are used to find the type (i.e. first the nested types within this
115
+ * message are searched, then within the parent, on up to the root
116
+ * namespace).
117
+ */
118
+ typeName: string;
119
+ /**
120
+ * For extensions, this is the name of the type being extended. It is
121
+ * resolved in the same manner as type_name.
122
+ */
123
+ extendee: string;
124
+ /**
125
+ * For numeric types, contains the original text representation of the value.
126
+ * For booleans, "true" or "false".
127
+ * For strings, contains the default text contents (not escaped in any way).
128
+ * For bytes, contains the C escaped value. All bytes >= 128 are escaped.
129
+ */
130
+ defaultValue: string;
131
+ /**
132
+ * If set, gives the index of a oneof in the containing type's oneof_decl
133
+ * list. This field is a member of that oneof.
134
+ */
135
+ oneofIndex: number;
136
+ /**
137
+ * JSON name of this field. The value is set by protocol compiler. If the
138
+ * user has set a "json_name" option on this field, that option's value
139
+ * will be used. Otherwise, it's deduced from the field's name by converting
140
+ * it to camelCase.
141
+ */
142
+ jsonName: string;
143
+ options:
144
+ | FieldOptions
145
+ | undefined;
146
+ /**
147
+ * If true, this is a proto3 "optional". When a proto3 field is optional, it
148
+ * tracks presence regardless of field type.
149
+ *
150
+ * When proto3_optional is true, this field must be belong to a oneof to
151
+ * signal to old proto3 clients that presence is tracked for this field. This
152
+ * oneof is known as a "synthetic" oneof, and this field must be its sole
153
+ * member (each proto3 optional field gets its own synthetic oneof). Synthetic
154
+ * oneofs exist in the descriptor only, and do not generate any API. Synthetic
155
+ * oneofs must be ordered after all "real" oneofs.
156
+ *
157
+ * For message fields, proto3_optional doesn't create any semantic change,
158
+ * since non-repeated message fields always track presence. However it still
159
+ * indicates the semantic detail of whether the user wrote "optional" or not.
160
+ * This can be useful for round-tripping the .proto file. For consistency we
161
+ * give message fields a synthetic oneof also, even though it is not required
162
+ * to track presence. This is especially important because the parser can't
163
+ * tell if a field is a message or an enum, so it must always create a
164
+ * synthetic oneof.
165
+ *
166
+ * Proto2 optional fields do not set this flag, because they already indicate
167
+ * optional with `LABEL_OPTIONAL`.
168
+ */
169
+ proto3Optional: boolean;
170
+ }
171
+
172
+ export enum FieldDescriptorProto_Type {
173
+ /**
174
+ * TYPE_DOUBLE - 0 is reserved for errors.
175
+ * Order is weird for historical reasons.
176
+ */
177
+ TYPE_DOUBLE = 1,
178
+ TYPE_FLOAT = 2,
179
+ /**
180
+ * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if
181
+ * negative values are likely.
182
+ */
183
+ TYPE_INT64 = 3,
184
+ TYPE_UINT64 = 4,
185
+ /**
186
+ * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if
187
+ * negative values are likely.
188
+ */
189
+ TYPE_INT32 = 5,
190
+ TYPE_FIXED64 = 6,
191
+ TYPE_FIXED32 = 7,
192
+ TYPE_BOOL = 8,
193
+ TYPE_STRING = 9,
194
+ /**
195
+ * TYPE_GROUP - Tag-delimited aggregate.
196
+ * Group type is deprecated and not supported in proto3. However, Proto3
197
+ * implementations should still be able to parse the group wire format and
198
+ * treat group fields as unknown fields.
199
+ */
200
+ TYPE_GROUP = 10,
201
+ /** TYPE_MESSAGE - Length-delimited aggregate. */
202
+ TYPE_MESSAGE = 11,
203
+ /** TYPE_BYTES - New in version 2. */
204
+ TYPE_BYTES = 12,
205
+ TYPE_UINT32 = 13,
206
+ TYPE_ENUM = 14,
207
+ TYPE_SFIXED32 = 15,
208
+ TYPE_SFIXED64 = 16,
209
+ /** TYPE_SINT32 - Uses ZigZag encoding. */
210
+ TYPE_SINT32 = 17,
211
+ /** TYPE_SINT64 - Uses ZigZag encoding. */
212
+ TYPE_SINT64 = 18,
213
+ UNRECOGNIZED = -1,
214
+ }
215
+
216
+ export function fieldDescriptorProto_TypeFromJSON(object: any): FieldDescriptorProto_Type {
217
+ switch (object) {
218
+ case 1:
219
+ case "TYPE_DOUBLE":
220
+ return FieldDescriptorProto_Type.TYPE_DOUBLE;
221
+ case 2:
222
+ case "TYPE_FLOAT":
223
+ return FieldDescriptorProto_Type.TYPE_FLOAT;
224
+ case 3:
225
+ case "TYPE_INT64":
226
+ return FieldDescriptorProto_Type.TYPE_INT64;
227
+ case 4:
228
+ case "TYPE_UINT64":
229
+ return FieldDescriptorProto_Type.TYPE_UINT64;
230
+ case 5:
231
+ case "TYPE_INT32":
232
+ return FieldDescriptorProto_Type.TYPE_INT32;
233
+ case 6:
234
+ case "TYPE_FIXED64":
235
+ return FieldDescriptorProto_Type.TYPE_FIXED64;
236
+ case 7:
237
+ case "TYPE_FIXED32":
238
+ return FieldDescriptorProto_Type.TYPE_FIXED32;
239
+ case 8:
240
+ case "TYPE_BOOL":
241
+ return FieldDescriptorProto_Type.TYPE_BOOL;
242
+ case 9:
243
+ case "TYPE_STRING":
244
+ return FieldDescriptorProto_Type.TYPE_STRING;
245
+ case 10:
246
+ case "TYPE_GROUP":
247
+ return FieldDescriptorProto_Type.TYPE_GROUP;
248
+ case 11:
249
+ case "TYPE_MESSAGE":
250
+ return FieldDescriptorProto_Type.TYPE_MESSAGE;
251
+ case 12:
252
+ case "TYPE_BYTES":
253
+ return FieldDescriptorProto_Type.TYPE_BYTES;
254
+ case 13:
255
+ case "TYPE_UINT32":
256
+ return FieldDescriptorProto_Type.TYPE_UINT32;
257
+ case 14:
258
+ case "TYPE_ENUM":
259
+ return FieldDescriptorProto_Type.TYPE_ENUM;
260
+ case 15:
261
+ case "TYPE_SFIXED32":
262
+ return FieldDescriptorProto_Type.TYPE_SFIXED32;
263
+ case 16:
264
+ case "TYPE_SFIXED64":
265
+ return FieldDescriptorProto_Type.TYPE_SFIXED64;
266
+ case 17:
267
+ case "TYPE_SINT32":
268
+ return FieldDescriptorProto_Type.TYPE_SINT32;
269
+ case 18:
270
+ case "TYPE_SINT64":
271
+ return FieldDescriptorProto_Type.TYPE_SINT64;
272
+ case -1:
273
+ case "UNRECOGNIZED":
274
+ default:
275
+ return FieldDescriptorProto_Type.UNRECOGNIZED;
276
+ }
277
+ }
278
+
279
+ export function fieldDescriptorProto_TypeToJSON(object: FieldDescriptorProto_Type): string {
280
+ switch (object) {
281
+ case FieldDescriptorProto_Type.TYPE_DOUBLE:
282
+ return "TYPE_DOUBLE";
283
+ case FieldDescriptorProto_Type.TYPE_FLOAT:
284
+ return "TYPE_FLOAT";
285
+ case FieldDescriptorProto_Type.TYPE_INT64:
286
+ return "TYPE_INT64";
287
+ case FieldDescriptorProto_Type.TYPE_UINT64:
288
+ return "TYPE_UINT64";
289
+ case FieldDescriptorProto_Type.TYPE_INT32:
290
+ return "TYPE_INT32";
291
+ case FieldDescriptorProto_Type.TYPE_FIXED64:
292
+ return "TYPE_FIXED64";
293
+ case FieldDescriptorProto_Type.TYPE_FIXED32:
294
+ return "TYPE_FIXED32";
295
+ case FieldDescriptorProto_Type.TYPE_BOOL:
296
+ return "TYPE_BOOL";
297
+ case FieldDescriptorProto_Type.TYPE_STRING:
298
+ return "TYPE_STRING";
299
+ case FieldDescriptorProto_Type.TYPE_GROUP:
300
+ return "TYPE_GROUP";
301
+ case FieldDescriptorProto_Type.TYPE_MESSAGE:
302
+ return "TYPE_MESSAGE";
303
+ case FieldDescriptorProto_Type.TYPE_BYTES:
304
+ return "TYPE_BYTES";
305
+ case FieldDescriptorProto_Type.TYPE_UINT32:
306
+ return "TYPE_UINT32";
307
+ case FieldDescriptorProto_Type.TYPE_ENUM:
308
+ return "TYPE_ENUM";
309
+ case FieldDescriptorProto_Type.TYPE_SFIXED32:
310
+ return "TYPE_SFIXED32";
311
+ case FieldDescriptorProto_Type.TYPE_SFIXED64:
312
+ return "TYPE_SFIXED64";
313
+ case FieldDescriptorProto_Type.TYPE_SINT32:
314
+ return "TYPE_SINT32";
315
+ case FieldDescriptorProto_Type.TYPE_SINT64:
316
+ return "TYPE_SINT64";
317
+ case FieldDescriptorProto_Type.UNRECOGNIZED:
318
+ default:
319
+ return "UNRECOGNIZED";
320
+ }
321
+ }
322
+
323
+ export enum FieldDescriptorProto_Label {
324
+ /** LABEL_OPTIONAL - 0 is reserved for errors */
325
+ LABEL_OPTIONAL = 1,
326
+ LABEL_REQUIRED = 2,
327
+ LABEL_REPEATED = 3,
328
+ UNRECOGNIZED = -1,
329
+ }
330
+
331
+ export function fieldDescriptorProto_LabelFromJSON(object: any): FieldDescriptorProto_Label {
332
+ switch (object) {
333
+ case 1:
334
+ case "LABEL_OPTIONAL":
335
+ return FieldDescriptorProto_Label.LABEL_OPTIONAL;
336
+ case 2:
337
+ case "LABEL_REQUIRED":
338
+ return FieldDescriptorProto_Label.LABEL_REQUIRED;
339
+ case 3:
340
+ case "LABEL_REPEATED":
341
+ return FieldDescriptorProto_Label.LABEL_REPEATED;
342
+ case -1:
343
+ case "UNRECOGNIZED":
344
+ default:
345
+ return FieldDescriptorProto_Label.UNRECOGNIZED;
346
+ }
347
+ }
348
+
349
+ export function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_Label): string {
350
+ switch (object) {
351
+ case FieldDescriptorProto_Label.LABEL_OPTIONAL:
352
+ return "LABEL_OPTIONAL";
353
+ case FieldDescriptorProto_Label.LABEL_REQUIRED:
354
+ return "LABEL_REQUIRED";
355
+ case FieldDescriptorProto_Label.LABEL_REPEATED:
356
+ return "LABEL_REPEATED";
357
+ case FieldDescriptorProto_Label.UNRECOGNIZED:
358
+ default:
359
+ return "UNRECOGNIZED";
360
+ }
361
+ }
362
+
363
+ /** Describes a oneof. */
364
+ export interface OneofDescriptorProto {
365
+ name: string;
366
+ options: OneofOptions | undefined;
367
+ }
368
+
369
+ /** Describes an enum type. */
370
+ export interface EnumDescriptorProto {
371
+ name: string;
372
+ value: EnumValueDescriptorProto[];
373
+ options:
374
+ | EnumOptions
375
+ | undefined;
376
+ /**
377
+ * Range of reserved numeric values. Reserved numeric values may not be used
378
+ * by enum values in the same enum declaration. Reserved ranges may not
379
+ * overlap.
380
+ */
381
+ reservedRange: EnumDescriptorProto_EnumReservedRange[];
382
+ /**
383
+ * Reserved enum value names, which may not be reused. A given name may only
384
+ * be reserved once.
385
+ */
386
+ reservedName: string[];
387
+ }
388
+
389
+ /**
390
+ * Range of reserved numeric values. Reserved values may not be used by
391
+ * entries in the same enum. Reserved ranges may not overlap.
392
+ *
393
+ * Note that this is distinct from DescriptorProto.ReservedRange in that it
394
+ * is inclusive such that it can appropriately represent the entire int32
395
+ * domain.
396
+ */
397
+ export interface EnumDescriptorProto_EnumReservedRange {
398
+ /** Inclusive. */
399
+ start: number;
400
+ /** Inclusive. */
401
+ end: number;
402
+ }
403
+
404
+ /** Describes a value within an enum. */
405
+ export interface EnumValueDescriptorProto {
406
+ name: string;
407
+ number: number;
408
+ options: EnumValueOptions | undefined;
409
+ }
410
+
411
+ /** Describes a service. */
412
+ export interface ServiceDescriptorProto {
413
+ name: string;
414
+ method: MethodDescriptorProto[];
415
+ options: ServiceOptions | undefined;
416
+ }
417
+
418
+ /** Describes a method of a service. */
419
+ export interface MethodDescriptorProto {
420
+ name: string;
421
+ /**
422
+ * Input and output type names. These are resolved in the same way as
423
+ * FieldDescriptorProto.type_name, but must refer to a message type.
424
+ */
425
+ inputType: string;
426
+ outputType: string;
427
+ options:
428
+ | MethodOptions
429
+ | undefined;
430
+ /** Identifies if client streams multiple client messages */
431
+ clientStreaming: boolean;
432
+ /** Identifies if server streams multiple server messages */
433
+ serverStreaming: boolean;
434
+ }
435
+
436
+ export interface FileOptions {
437
+ /**
438
+ * Sets the Java package where classes generated from this .proto will be
439
+ * placed. By default, the proto package is used, but this is often
440
+ * inappropriate because proto packages do not normally start with backwards
441
+ * domain names.
442
+ */
443
+ javaPackage: string;
444
+ /**
445
+ * Controls the name of the wrapper Java class generated for the .proto file.
446
+ * That class will always contain the .proto file's getDescriptor() method as
447
+ * well as any top-level extensions defined in the .proto file.
448
+ * If java_multiple_files is disabled, then all the other classes from the
449
+ * .proto file will be nested inside the single wrapper outer class.
450
+ */
451
+ javaOuterClassname: string;
452
+ /**
453
+ * If enabled, then the Java code generator will generate a separate .java
454
+ * file for each top-level message, enum, and service defined in the .proto
455
+ * file. Thus, these types will *not* be nested inside the wrapper class
456
+ * named by java_outer_classname. However, the wrapper class will still be
457
+ * generated to contain the file's getDescriptor() method as well as any
458
+ * top-level extensions defined in the file.
459
+ */
460
+ javaMultipleFiles: boolean;
461
+ /**
462
+ * This option does nothing.
463
+ *
464
+ * @deprecated
465
+ */
466
+ javaGenerateEqualsAndHash: boolean;
467
+ /**
468
+ * If set true, then the Java2 code generator will generate code that
469
+ * throws an exception whenever an attempt is made to assign a non-UTF-8
470
+ * byte sequence to a string field.
471
+ * Message reflection will do the same.
472
+ * However, an extension field still accepts non-UTF-8 byte sequences.
473
+ * This option has no effect on when used with the lite runtime.
474
+ */
475
+ javaStringCheckUtf8: boolean;
476
+ optimizeFor: FileOptions_OptimizeMode;
477
+ /**
478
+ * Sets the Go package where structs generated from this .proto will be
479
+ * placed. If omitted, the Go package will be derived from the following:
480
+ * - The basename of the package import path, if provided.
481
+ * - Otherwise, the package statement in the .proto file, if present.
482
+ * - Otherwise, the basename of the .proto file, without extension.
483
+ */
484
+ goPackage: string;
485
+ /**
486
+ * Should generic services be generated in each language? "Generic" services
487
+ * are not specific to any particular RPC system. They are generated by the
488
+ * main code generators in each language (without additional plugins).
489
+ * Generic services were the only kind of service generation supported by
490
+ * early versions of google.protobuf.
491
+ *
492
+ * Generic services are now considered deprecated in favor of using plugins
493
+ * that generate code specific to your particular RPC system. Therefore,
494
+ * these default to false. Old code which depends on generic services should
495
+ * explicitly set them to true.
496
+ */
497
+ ccGenericServices: boolean;
498
+ javaGenericServices: boolean;
499
+ pyGenericServices: boolean;
500
+ phpGenericServices: boolean;
501
+ /**
502
+ * Is this file deprecated?
503
+ * Depending on the target platform, this can emit Deprecated annotations
504
+ * for everything in the file, or it will be completely ignored; in the very
505
+ * least, this is a formalization for deprecating files.
506
+ */
507
+ deprecated: boolean;
508
+ /**
509
+ * Enables the use of arenas for the proto messages in this file. This applies
510
+ * only to generated classes for C++.
511
+ */
512
+ ccEnableArenas: boolean;
513
+ /**
514
+ * Sets the objective c class prefix which is prepended to all objective c
515
+ * generated classes from this .proto. There is no default.
516
+ */
517
+ objcClassPrefix: string;
518
+ /** Namespace for generated classes; defaults to the package. */
519
+ csharpNamespace: string;
520
+ /**
521
+ * By default Swift generators will take the proto package and CamelCase it
522
+ * replacing '.' with underscore and use that to prefix the types/symbols
523
+ * defined. When this options is provided, they will use this value instead
524
+ * to prefix the types/symbols defined.
525
+ */
526
+ swiftPrefix: string;
527
+ /**
528
+ * Sets the php class prefix which is prepended to all php generated classes
529
+ * from this .proto. Default is empty.
530
+ */
531
+ phpClassPrefix: string;
532
+ /**
533
+ * Use this option to change the namespace of php generated classes. Default
534
+ * is empty. When this option is empty, the package name will be used for
535
+ * determining the namespace.
536
+ */
537
+ phpNamespace: string;
538
+ /**
539
+ * Use this option to change the namespace of php generated metadata classes.
540
+ * Default is empty. When this option is empty, the proto file name will be
541
+ * used for determining the namespace.
542
+ */
543
+ phpMetadataNamespace: string;
544
+ /**
545
+ * Use this option to change the package of ruby generated classes. Default
546
+ * is empty. When this option is not set, the package name will be used for
547
+ * determining the ruby package.
548
+ */
549
+ rubyPackage: string;
550
+ /**
551
+ * The parser stores options it doesn't recognize here.
552
+ * See the documentation for the "Options" section above.
553
+ */
554
+ uninterpretedOption: UninterpretedOption[];
555
+ }
556
+
557
+ /** Generated classes can be optimized for speed or code size. */
558
+ export enum FileOptions_OptimizeMode {
559
+ /** SPEED - Generate complete code for parsing, serialization, */
560
+ SPEED = 1,
561
+ /** CODE_SIZE - etc. */
562
+ CODE_SIZE = 2,
563
+ /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */
564
+ LITE_RUNTIME = 3,
565
+ UNRECOGNIZED = -1,
566
+ }
567
+
568
+ export function fileOptions_OptimizeModeFromJSON(object: any): FileOptions_OptimizeMode {
569
+ switch (object) {
570
+ case 1:
571
+ case "SPEED":
572
+ return FileOptions_OptimizeMode.SPEED;
573
+ case 2:
574
+ case "CODE_SIZE":
575
+ return FileOptions_OptimizeMode.CODE_SIZE;
576
+ case 3:
577
+ case "LITE_RUNTIME":
578
+ return FileOptions_OptimizeMode.LITE_RUNTIME;
579
+ case -1:
580
+ case "UNRECOGNIZED":
581
+ default:
582
+ return FileOptions_OptimizeMode.UNRECOGNIZED;
583
+ }
584
+ }
585
+
586
+ export function fileOptions_OptimizeModeToJSON(object: FileOptions_OptimizeMode): string {
587
+ switch (object) {
588
+ case FileOptions_OptimizeMode.SPEED:
589
+ return "SPEED";
590
+ case FileOptions_OptimizeMode.CODE_SIZE:
591
+ return "CODE_SIZE";
592
+ case FileOptions_OptimizeMode.LITE_RUNTIME:
593
+ return "LITE_RUNTIME";
594
+ case FileOptions_OptimizeMode.UNRECOGNIZED:
595
+ default:
596
+ return "UNRECOGNIZED";
597
+ }
598
+ }
599
+
600
+ export interface MessageOptions {
601
+ /**
602
+ * Set true to use the old proto1 MessageSet wire format for extensions.
603
+ * This is provided for backwards-compatibility with the MessageSet wire
604
+ * format. You should not use this for any other reason: It's less
605
+ * efficient, has fewer features, and is more complicated.
606
+ *
607
+ * The message must be defined exactly as follows:
608
+ * message Foo {
609
+ * option message_set_wire_format = true;
610
+ * extensions 4 to max;
611
+ * }
612
+ * Note that the message cannot have any defined fields; MessageSets only
613
+ * have extensions.
614
+ *
615
+ * All extensions of your type must be singular messages; e.g. they cannot
616
+ * be int32s, enums, or repeated messages.
617
+ *
618
+ * Because this is an option, the above two restrictions are not enforced by
619
+ * the protocol compiler.
620
+ */
621
+ messageSetWireFormat: boolean;
622
+ /**
623
+ * Disables the generation of the standard "descriptor()" accessor, which can
624
+ * conflict with a field of the same name. This is meant to make migration
625
+ * from proto1 easier; new code should avoid fields named "descriptor".
626
+ */
627
+ noStandardDescriptorAccessor: boolean;
628
+ /**
629
+ * Is this message deprecated?
630
+ * Depending on the target platform, this can emit Deprecated annotations
631
+ * for the message, or it will be completely ignored; in the very least,
632
+ * this is a formalization for deprecating messages.
633
+ */
634
+ deprecated: boolean;
635
+ /**
636
+ * NOTE: Do not set the option in .proto files. Always use the maps syntax
637
+ * instead. The option should only be implicitly set by the proto compiler
638
+ * parser.
639
+ *
640
+ * Whether the message is an automatically generated map entry type for the
641
+ * maps field.
642
+ *
643
+ * For maps fields:
644
+ * map<KeyType, ValueType> map_field = 1;
645
+ * The parsed descriptor looks like:
646
+ * message MapFieldEntry {
647
+ * option map_entry = true;
648
+ * optional KeyType key = 1;
649
+ * optional ValueType value = 2;
650
+ * }
651
+ * repeated MapFieldEntry map_field = 1;
652
+ *
653
+ * Implementations may choose not to generate the map_entry=true message, but
654
+ * use a native map in the target language to hold the keys and values.
655
+ * The reflection APIs in such implementations still need to work as
656
+ * if the field is a repeated message field.
657
+ */
658
+ mapEntry: boolean;
659
+ /**
660
+ * Enable the legacy handling of JSON field name conflicts. This lowercases
661
+ * and strips underscored from the fields before comparison in proto3 only.
662
+ * The new behavior takes `json_name` into account and applies to proto2 as
663
+ * well.
664
+ *
665
+ * This should only be used as a temporary measure against broken builds due
666
+ * to the change in behavior for JSON field name conflicts.
667
+ *
668
+ * TODO(b/261750190) This is legacy behavior we plan to remove once downstream
669
+ * teams have had time to migrate.
670
+ *
671
+ * @deprecated
672
+ */
673
+ deprecatedLegacyJsonFieldConflicts: boolean;
674
+ /** The parser stores options it doesn't recognize here. See above. */
675
+ uninterpretedOption: UninterpretedOption[];
676
+ }
677
+
678
+ export interface FieldOptions {
679
+ /**
680
+ * The ctype option instructs the C++ code generator to use a different
681
+ * representation of the field than it normally would. See the specific
682
+ * options below. This option is not yet implemented in the open source
683
+ * release -- sorry, we'll try to include it in a future version!
684
+ */
685
+ ctype: FieldOptions_CType;
686
+ /**
687
+ * The packed option can be enabled for repeated primitive fields to enable
688
+ * a more efficient representation on the wire. Rather than repeatedly
689
+ * writing the tag and type for each element, the entire array is encoded as
690
+ * a single length-delimited blob. In proto3, only explicit setting it to
691
+ * false will avoid using packed encoding.
692
+ */
693
+ packed: boolean;
694
+ /**
695
+ * The jstype option determines the JavaScript type used for values of the
696
+ * field. The option is permitted only for 64 bit integral and fixed types
697
+ * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING
698
+ * is represented as JavaScript string, which avoids loss of precision that
699
+ * can happen when a large value is converted to a floating point JavaScript.
700
+ * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to
701
+ * use the JavaScript "number" type. The behavior of the default option
702
+ * JS_NORMAL is implementation dependent.
703
+ *
704
+ * This option is an enum to permit additional types to be added, e.g.
705
+ * goog.math.Integer.
706
+ */
707
+ jstype: FieldOptions_JSType;
708
+ /**
709
+ * Should this field be parsed lazily? Lazy applies only to message-type
710
+ * fields. It means that when the outer message is initially parsed, the
711
+ * inner message's contents will not be parsed but instead stored in encoded
712
+ * form. The inner message will actually be parsed when it is first accessed.
713
+ *
714
+ * This is only a hint. Implementations are free to choose whether to use
715
+ * eager or lazy parsing regardless of the value of this option. However,
716
+ * setting this option true suggests that the protocol author believes that
717
+ * using lazy parsing on this field is worth the additional bookkeeping
718
+ * overhead typically needed to implement it.
719
+ *
720
+ * This option does not affect the public interface of any generated code;
721
+ * all method signatures remain the same. Furthermore, thread-safety of the
722
+ * interface is not affected by this option; const methods remain safe to
723
+ * call from multiple threads concurrently, while non-const methods continue
724
+ * to require exclusive access.
725
+ *
726
+ * Note that implementations may choose not to check required fields within
727
+ * a lazy sub-message. That is, calling IsInitialized() on the outer message
728
+ * may return true even if the inner message has missing required fields.
729
+ * This is necessary because otherwise the inner message would have to be
730
+ * parsed in order to perform the check, defeating the purpose of lazy
731
+ * parsing. An implementation which chooses not to check required fields
732
+ * must be consistent about it. That is, for any particular sub-message, the
733
+ * implementation must either *always* check its required fields, or *never*
734
+ * check its required fields, regardless of whether or not the message has
735
+ * been parsed.
736
+ *
737
+ * As of May 2022, lazy verifies the contents of the byte stream during
738
+ * parsing. An invalid byte stream will cause the overall parsing to fail.
739
+ */
740
+ lazy: boolean;
741
+ /**
742
+ * unverified_lazy does no correctness checks on the byte stream. This should
743
+ * only be used where lazy with verification is prohibitive for performance
744
+ * reasons.
745
+ */
746
+ unverifiedLazy: boolean;
747
+ /**
748
+ * Is this field deprecated?
749
+ * Depending on the target platform, this can emit Deprecated annotations
750
+ * for accessors, or it will be completely ignored; in the very least, this
751
+ * is a formalization for deprecating fields.
752
+ */
753
+ deprecated: boolean;
754
+ /** For Google-internal migration only. Do not use. */
755
+ weak: boolean;
756
+ /**
757
+ * Indicate that the field value should not be printed out when using debug
758
+ * formats, e.g. when the field contains sensitive credentials.
759
+ */
760
+ debugRedact: boolean;
761
+ retention: FieldOptions_OptionRetention;
762
+ target: FieldOptions_OptionTargetType;
763
+ /** The parser stores options it doesn't recognize here. See above. */
764
+ uninterpretedOption: UninterpretedOption[];
765
+ }
766
+
767
+ export enum FieldOptions_CType {
768
+ /** STRING - Default mode. */
769
+ STRING = 0,
770
+ CORD = 1,
771
+ STRING_PIECE = 2,
772
+ UNRECOGNIZED = -1,
773
+ }
774
+
775
+ export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType {
776
+ switch (object) {
777
+ case 0:
778
+ case "STRING":
779
+ return FieldOptions_CType.STRING;
780
+ case 1:
781
+ case "CORD":
782
+ return FieldOptions_CType.CORD;
783
+ case 2:
784
+ case "STRING_PIECE":
785
+ return FieldOptions_CType.STRING_PIECE;
786
+ case -1:
787
+ case "UNRECOGNIZED":
788
+ default:
789
+ return FieldOptions_CType.UNRECOGNIZED;
790
+ }
791
+ }
792
+
793
+ export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string {
794
+ switch (object) {
795
+ case FieldOptions_CType.STRING:
796
+ return "STRING";
797
+ case FieldOptions_CType.CORD:
798
+ return "CORD";
799
+ case FieldOptions_CType.STRING_PIECE:
800
+ return "STRING_PIECE";
801
+ case FieldOptions_CType.UNRECOGNIZED:
802
+ default:
803
+ return "UNRECOGNIZED";
804
+ }
805
+ }
806
+
807
+ export enum FieldOptions_JSType {
808
+ /** JS_NORMAL - Use the default type. */
809
+ JS_NORMAL = 0,
810
+ /** JS_STRING - Use JavaScript strings. */
811
+ JS_STRING = 1,
812
+ /** JS_NUMBER - Use JavaScript numbers. */
813
+ JS_NUMBER = 2,
814
+ UNRECOGNIZED = -1,
815
+ }
816
+
817
+ export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType {
818
+ switch (object) {
819
+ case 0:
820
+ case "JS_NORMAL":
821
+ return FieldOptions_JSType.JS_NORMAL;
822
+ case 1:
823
+ case "JS_STRING":
824
+ return FieldOptions_JSType.JS_STRING;
825
+ case 2:
826
+ case "JS_NUMBER":
827
+ return FieldOptions_JSType.JS_NUMBER;
828
+ case -1:
829
+ case "UNRECOGNIZED":
830
+ default:
831
+ return FieldOptions_JSType.UNRECOGNIZED;
832
+ }
833
+ }
834
+
835
+ export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string {
836
+ switch (object) {
837
+ case FieldOptions_JSType.JS_NORMAL:
838
+ return "JS_NORMAL";
839
+ case FieldOptions_JSType.JS_STRING:
840
+ return "JS_STRING";
841
+ case FieldOptions_JSType.JS_NUMBER:
842
+ return "JS_NUMBER";
843
+ case FieldOptions_JSType.UNRECOGNIZED:
844
+ default:
845
+ return "UNRECOGNIZED";
846
+ }
847
+ }
848
+
849
+ /**
850
+ * If set to RETENTION_SOURCE, the option will be omitted from the binary.
851
+ * Note: as of January 2023, support for this is in progress and does not yet
852
+ * have an effect (b/264593489).
853
+ */
854
+ export enum FieldOptions_OptionRetention {
855
+ RETENTION_UNKNOWN = 0,
856
+ RETENTION_RUNTIME = 1,
857
+ RETENTION_SOURCE = 2,
858
+ UNRECOGNIZED = -1,
859
+ }
860
+
861
+ export function fieldOptions_OptionRetentionFromJSON(object: any): FieldOptions_OptionRetention {
862
+ switch (object) {
863
+ case 0:
864
+ case "RETENTION_UNKNOWN":
865
+ return FieldOptions_OptionRetention.RETENTION_UNKNOWN;
866
+ case 1:
867
+ case "RETENTION_RUNTIME":
868
+ return FieldOptions_OptionRetention.RETENTION_RUNTIME;
869
+ case 2:
870
+ case "RETENTION_SOURCE":
871
+ return FieldOptions_OptionRetention.RETENTION_SOURCE;
872
+ case -1:
873
+ case "UNRECOGNIZED":
874
+ default:
875
+ return FieldOptions_OptionRetention.UNRECOGNIZED;
876
+ }
877
+ }
878
+
879
+ export function fieldOptions_OptionRetentionToJSON(object: FieldOptions_OptionRetention): string {
880
+ switch (object) {
881
+ case FieldOptions_OptionRetention.RETENTION_UNKNOWN:
882
+ return "RETENTION_UNKNOWN";
883
+ case FieldOptions_OptionRetention.RETENTION_RUNTIME:
884
+ return "RETENTION_RUNTIME";
885
+ case FieldOptions_OptionRetention.RETENTION_SOURCE:
886
+ return "RETENTION_SOURCE";
887
+ case FieldOptions_OptionRetention.UNRECOGNIZED:
888
+ default:
889
+ return "UNRECOGNIZED";
890
+ }
891
+ }
892
+
893
+ /**
894
+ * This indicates the types of entities that the field may apply to when used
895
+ * as an option. If it is unset, then the field may be freely used as an
896
+ * option on any kind of entity. Note: as of January 2023, support for this is
897
+ * in progress and does not yet have an effect (b/264593489).
898
+ */
899
+ export enum FieldOptions_OptionTargetType {
900
+ TARGET_TYPE_UNKNOWN = 0,
901
+ TARGET_TYPE_FILE = 1,
902
+ TARGET_TYPE_EXTENSION_RANGE = 2,
903
+ TARGET_TYPE_MESSAGE = 3,
904
+ TARGET_TYPE_FIELD = 4,
905
+ TARGET_TYPE_ONEOF = 5,
906
+ TARGET_TYPE_ENUM = 6,
907
+ TARGET_TYPE_ENUM_ENTRY = 7,
908
+ TARGET_TYPE_SERVICE = 8,
909
+ TARGET_TYPE_METHOD = 9,
910
+ UNRECOGNIZED = -1,
911
+ }
912
+
913
+ export function fieldOptions_OptionTargetTypeFromJSON(object: any): FieldOptions_OptionTargetType {
914
+ switch (object) {
915
+ case 0:
916
+ case "TARGET_TYPE_UNKNOWN":
917
+ return FieldOptions_OptionTargetType.TARGET_TYPE_UNKNOWN;
918
+ case 1:
919
+ case "TARGET_TYPE_FILE":
920
+ return FieldOptions_OptionTargetType.TARGET_TYPE_FILE;
921
+ case 2:
922
+ case "TARGET_TYPE_EXTENSION_RANGE":
923
+ return FieldOptions_OptionTargetType.TARGET_TYPE_EXTENSION_RANGE;
924
+ case 3:
925
+ case "TARGET_TYPE_MESSAGE":
926
+ return FieldOptions_OptionTargetType.TARGET_TYPE_MESSAGE;
927
+ case 4:
928
+ case "TARGET_TYPE_FIELD":
929
+ return FieldOptions_OptionTargetType.TARGET_TYPE_FIELD;
930
+ case 5:
931
+ case "TARGET_TYPE_ONEOF":
932
+ return FieldOptions_OptionTargetType.TARGET_TYPE_ONEOF;
933
+ case 6:
934
+ case "TARGET_TYPE_ENUM":
935
+ return FieldOptions_OptionTargetType.TARGET_TYPE_ENUM;
936
+ case 7:
937
+ case "TARGET_TYPE_ENUM_ENTRY":
938
+ return FieldOptions_OptionTargetType.TARGET_TYPE_ENUM_ENTRY;
939
+ case 8:
940
+ case "TARGET_TYPE_SERVICE":
941
+ return FieldOptions_OptionTargetType.TARGET_TYPE_SERVICE;
942
+ case 9:
943
+ case "TARGET_TYPE_METHOD":
944
+ return FieldOptions_OptionTargetType.TARGET_TYPE_METHOD;
945
+ case -1:
946
+ case "UNRECOGNIZED":
947
+ default:
948
+ return FieldOptions_OptionTargetType.UNRECOGNIZED;
949
+ }
950
+ }
951
+
952
+ export function fieldOptions_OptionTargetTypeToJSON(object: FieldOptions_OptionTargetType): string {
953
+ switch (object) {
954
+ case FieldOptions_OptionTargetType.TARGET_TYPE_UNKNOWN:
955
+ return "TARGET_TYPE_UNKNOWN";
956
+ case FieldOptions_OptionTargetType.TARGET_TYPE_FILE:
957
+ return "TARGET_TYPE_FILE";
958
+ case FieldOptions_OptionTargetType.TARGET_TYPE_EXTENSION_RANGE:
959
+ return "TARGET_TYPE_EXTENSION_RANGE";
960
+ case FieldOptions_OptionTargetType.TARGET_TYPE_MESSAGE:
961
+ return "TARGET_TYPE_MESSAGE";
962
+ case FieldOptions_OptionTargetType.TARGET_TYPE_FIELD:
963
+ return "TARGET_TYPE_FIELD";
964
+ case FieldOptions_OptionTargetType.TARGET_TYPE_ONEOF:
965
+ return "TARGET_TYPE_ONEOF";
966
+ case FieldOptions_OptionTargetType.TARGET_TYPE_ENUM:
967
+ return "TARGET_TYPE_ENUM";
968
+ case FieldOptions_OptionTargetType.TARGET_TYPE_ENUM_ENTRY:
969
+ return "TARGET_TYPE_ENUM_ENTRY";
970
+ case FieldOptions_OptionTargetType.TARGET_TYPE_SERVICE:
971
+ return "TARGET_TYPE_SERVICE";
972
+ case FieldOptions_OptionTargetType.TARGET_TYPE_METHOD:
973
+ return "TARGET_TYPE_METHOD";
974
+ case FieldOptions_OptionTargetType.UNRECOGNIZED:
975
+ default:
976
+ return "UNRECOGNIZED";
977
+ }
978
+ }
979
+
980
+ export interface OneofOptions {
981
+ /** The parser stores options it doesn't recognize here. See above. */
982
+ uninterpretedOption: UninterpretedOption[];
983
+ }
984
+
985
+ export interface EnumOptions {
986
+ /**
987
+ * Set this option to true to allow mapping different tag names to the same
988
+ * value.
989
+ */
990
+ allowAlias: boolean;
991
+ /**
992
+ * Is this enum deprecated?
993
+ * Depending on the target platform, this can emit Deprecated annotations
994
+ * for the enum, or it will be completely ignored; in the very least, this
995
+ * is a formalization for deprecating enums.
996
+ */
997
+ deprecated: boolean;
998
+ /**
999
+ * Enable the legacy handling of JSON field name conflicts. This lowercases
1000
+ * and strips underscored from the fields before comparison in proto3 only.
1001
+ * The new behavior takes `json_name` into account and applies to proto2 as
1002
+ * well.
1003
+ * TODO(b/261750190) Remove this legacy behavior once downstream teams have
1004
+ * had time to migrate.
1005
+ *
1006
+ * @deprecated
1007
+ */
1008
+ deprecatedLegacyJsonFieldConflicts: boolean;
1009
+ /** The parser stores options it doesn't recognize here. See above. */
1010
+ uninterpretedOption: UninterpretedOption[];
1011
+ }
1012
+
1013
+ export interface EnumValueOptions {
1014
+ /**
1015
+ * Is this enum value deprecated?
1016
+ * Depending on the target platform, this can emit Deprecated annotations
1017
+ * for the enum value, or it will be completely ignored; in the very least,
1018
+ * this is a formalization for deprecating enum values.
1019
+ */
1020
+ deprecated: boolean;
1021
+ /** The parser stores options it doesn't recognize here. See above. */
1022
+ uninterpretedOption: UninterpretedOption[];
1023
+ }
1024
+
1025
+ export interface ServiceOptions {
1026
+ /**
1027
+ * Is this service deprecated?
1028
+ * Depending on the target platform, this can emit Deprecated annotations
1029
+ * for the service, or it will be completely ignored; in the very least,
1030
+ * this is a formalization for deprecating services.
1031
+ */
1032
+ deprecated: boolean;
1033
+ /** The parser stores options it doesn't recognize here. See above. */
1034
+ uninterpretedOption: UninterpretedOption[];
1035
+ }
1036
+
1037
+ export interface MethodOptions {
1038
+ /**
1039
+ * Is this method deprecated?
1040
+ * Depending on the target platform, this can emit Deprecated annotations
1041
+ * for the method, or it will be completely ignored; in the very least,
1042
+ * this is a formalization for deprecating methods.
1043
+ */
1044
+ deprecated: boolean;
1045
+ idempotencyLevel: MethodOptions_IdempotencyLevel;
1046
+ /** The parser stores options it doesn't recognize here. See above. */
1047
+ uninterpretedOption: UninterpretedOption[];
1048
+ }
1049
+
1050
+ /**
1051
+ * Is this method side-effect-free (or safe in HTTP parlance), or idempotent,
1052
+ * or neither? HTTP based RPC implementation may choose GET verb for safe
1053
+ * methods, and PUT verb for idempotent methods instead of the default POST.
1054
+ */
1055
+ export enum MethodOptions_IdempotencyLevel {
1056
+ IDEMPOTENCY_UNKNOWN = 0,
1057
+ /** NO_SIDE_EFFECTS - implies idempotent */
1058
+ NO_SIDE_EFFECTS = 1,
1059
+ /** IDEMPOTENT - idempotent, but may have side effects */
1060
+ IDEMPOTENT = 2,
1061
+ UNRECOGNIZED = -1,
1062
+ }
1063
+
1064
+ export function methodOptions_IdempotencyLevelFromJSON(object: any): MethodOptions_IdempotencyLevel {
1065
+ switch (object) {
1066
+ case 0:
1067
+ case "IDEMPOTENCY_UNKNOWN":
1068
+ return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN;
1069
+ case 1:
1070
+ case "NO_SIDE_EFFECTS":
1071
+ return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS;
1072
+ case 2:
1073
+ case "IDEMPOTENT":
1074
+ return MethodOptions_IdempotencyLevel.IDEMPOTENT;
1075
+ case -1:
1076
+ case "UNRECOGNIZED":
1077
+ default:
1078
+ return MethodOptions_IdempotencyLevel.UNRECOGNIZED;
1079
+ }
1080
+ }
1081
+
1082
+ export function methodOptions_IdempotencyLevelToJSON(object: MethodOptions_IdempotencyLevel): string {
1083
+ switch (object) {
1084
+ case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN:
1085
+ return "IDEMPOTENCY_UNKNOWN";
1086
+ case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS:
1087
+ return "NO_SIDE_EFFECTS";
1088
+ case MethodOptions_IdempotencyLevel.IDEMPOTENT:
1089
+ return "IDEMPOTENT";
1090
+ case MethodOptions_IdempotencyLevel.UNRECOGNIZED:
1091
+ default:
1092
+ return "UNRECOGNIZED";
1093
+ }
1094
+ }
1095
+
1096
+ /**
1097
+ * A message representing a option the parser does not recognize. This only
1098
+ * appears in options protos created by the compiler::Parser class.
1099
+ * DescriptorPool resolves these when building Descriptor objects. Therefore,
1100
+ * options protos in descriptor objects (e.g. returned by Descriptor::options(),
1101
+ * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions
1102
+ * in them.
1103
+ */
1104
+ export interface UninterpretedOption {
1105
+ name: UninterpretedOption_NamePart[];
1106
+ /**
1107
+ * The value of the uninterpreted option, in whatever type the tokenizer
1108
+ * identified it as during parsing. Exactly one of these should be set.
1109
+ */
1110
+ identifierValue: string;
1111
+ positiveIntValue: number;
1112
+ negativeIntValue: number;
1113
+ doubleValue: number;
1114
+ stringValue: Uint8Array;
1115
+ aggregateValue: string;
1116
+ }
1117
+
1118
+ /**
1119
+ * The name of the uninterpreted option. Each string represents a segment in
1120
+ * a dot-separated name. is_extension is true iff a segment represents an
1121
+ * extension (denoted with parentheses in options specs in .proto files).
1122
+ * E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents
1123
+ * "foo.(bar.baz).moo".
1124
+ */
1125
+ export interface UninterpretedOption_NamePart {
1126
+ namePart: string;
1127
+ isExtension: boolean;
1128
+ }
1129
+
1130
+ /**
1131
+ * Encapsulates information about the original source file from which a
1132
+ * FileDescriptorProto was generated.
1133
+ */
1134
+ export interface SourceCodeInfo {
1135
+ /**
1136
+ * A Location identifies a piece of source code in a .proto file which
1137
+ * corresponds to a particular definition. This information is intended
1138
+ * to be useful to IDEs, code indexers, documentation generators, and similar
1139
+ * tools.
1140
+ *
1141
+ * For example, say we have a file like:
1142
+ * message Foo {
1143
+ * optional string foo = 1;
1144
+ * }
1145
+ * Let's look at just the field definition:
1146
+ * optional string foo = 1;
1147
+ * ^ ^^ ^^ ^ ^^^
1148
+ * a bc de f ghi
1149
+ * We have the following locations:
1150
+ * span path represents
1151
+ * [a,i) [ 4, 0, 2, 0 ] The whole field definition.
1152
+ * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional).
1153
+ * [c,d) [ 4, 0, 2, 0, 5 ] The type (string).
1154
+ * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo).
1155
+ * [g,h) [ 4, 0, 2, 0, 3 ] The number (1).
1156
+ *
1157
+ * Notes:
1158
+ * - A location may refer to a repeated field itself (i.e. not to any
1159
+ * particular index within it). This is used whenever a set of elements are
1160
+ * logically enclosed in a single code segment. For example, an entire
1161
+ * extend block (possibly containing multiple extension definitions) will
1162
+ * have an outer location whose path refers to the "extensions" repeated
1163
+ * field without an index.
1164
+ * - Multiple locations may have the same path. This happens when a single
1165
+ * logical declaration is spread out across multiple places. The most
1166
+ * obvious example is the "extend" block again -- there may be multiple
1167
+ * extend blocks in the same scope, each of which will have the same path.
1168
+ * - A location's span is not always a subset of its parent's span. For
1169
+ * example, the "extendee" of an extension declaration appears at the
1170
+ * beginning of the "extend" block and is shared by all extensions within
1171
+ * the block.
1172
+ * - Just because a location's span is a subset of some other location's span
1173
+ * does not mean that it is a descendant. For example, a "group" defines
1174
+ * both a type and a field in a single declaration. Thus, the locations
1175
+ * corresponding to the type and field and their components will overlap.
1176
+ * - Code which tries to interpret locations should probably be designed to
1177
+ * ignore those that it doesn't understand, as more types of locations could
1178
+ * be recorded in the future.
1179
+ */
1180
+ location: SourceCodeInfo_Location[];
1181
+ }
1182
+
1183
+ export interface SourceCodeInfo_Location {
1184
+ /**
1185
+ * Identifies which part of the FileDescriptorProto was defined at this
1186
+ * location.
1187
+ *
1188
+ * Each element is a field number or an index. They form a path from
1189
+ * the root FileDescriptorProto to the place where the definition occurs.
1190
+ * For example, this path:
1191
+ * [ 4, 3, 2, 7, 1 ]
1192
+ * refers to:
1193
+ * file.message_type(3) // 4, 3
1194
+ * .field(7) // 2, 7
1195
+ * .name() // 1
1196
+ * This is because FileDescriptorProto.message_type has field number 4:
1197
+ * repeated DescriptorProto message_type = 4;
1198
+ * and DescriptorProto.field has field number 2:
1199
+ * repeated FieldDescriptorProto field = 2;
1200
+ * and FieldDescriptorProto.name has field number 1:
1201
+ * optional string name = 1;
1202
+ *
1203
+ * Thus, the above path gives the location of a field name. If we removed
1204
+ * the last element:
1205
+ * [ 4, 3, 2, 7 ]
1206
+ * this path refers to the whole field declaration (from the beginning
1207
+ * of the label to the terminating semicolon).
1208
+ */
1209
+ path: number[];
1210
+ /**
1211
+ * Always has exactly three or four elements: start line, start column,
1212
+ * end line (optional, otherwise assumed same as start line), end column.
1213
+ * These are packed into a single field for efficiency. Note that line
1214
+ * and column numbers are zero-based -- typically you will want to add
1215
+ * 1 to each before displaying to a user.
1216
+ */
1217
+ span: number[];
1218
+ /**
1219
+ * If this SourceCodeInfo represents a complete declaration, these are any
1220
+ * comments appearing before and after the declaration which appear to be
1221
+ * attached to the declaration.
1222
+ *
1223
+ * A series of line comments appearing on consecutive lines, with no other
1224
+ * tokens appearing on those lines, will be treated as a single comment.
1225
+ *
1226
+ * leading_detached_comments will keep paragraphs of comments that appear
1227
+ * before (but not connected to) the current element. Each paragraph,
1228
+ * separated by empty lines, will be one comment element in the repeated
1229
+ * field.
1230
+ *
1231
+ * Only the comment content is provided; comment markers (e.g. //) are
1232
+ * stripped out. For block comments, leading whitespace and an asterisk
1233
+ * will be stripped from the beginning of each line other than the first.
1234
+ * Newlines are included in the output.
1235
+ *
1236
+ * Examples:
1237
+ *
1238
+ * optional int32 foo = 1; // Comment attached to foo.
1239
+ * // Comment attached to bar.
1240
+ * optional int32 bar = 2;
1241
+ *
1242
+ * optional string baz = 3;
1243
+ * // Comment attached to baz.
1244
+ * // Another line attached to baz.
1245
+ *
1246
+ * // Comment attached to moo.
1247
+ * //
1248
+ * // Another line attached to moo.
1249
+ * optional double moo = 4;
1250
+ *
1251
+ * // Detached comment for corge. This is not leading or trailing comments
1252
+ * // to moo or corge because there are blank lines separating it from
1253
+ * // both.
1254
+ *
1255
+ * // Detached comment for corge paragraph 2.
1256
+ *
1257
+ * optional string corge = 5;
1258
+ * /* Block comment attached
1259
+ * * to corge. Leading asterisks
1260
+ * * will be removed. * /
1261
+ * /* Block comment attached to
1262
+ * * grault. * /
1263
+ * optional int32 grault = 6;
1264
+ *
1265
+ * // ignored detached comments.
1266
+ */
1267
+ leadingComments: string;
1268
+ trailingComments: string;
1269
+ leadingDetachedComments: string[];
1270
+ }
1271
+
1272
+ /**
1273
+ * Describes the relationship between generated code and its original source
1274
+ * file. A GeneratedCodeInfo message is associated with only one generated
1275
+ * source file, but may contain references to different source .proto files.
1276
+ */
1277
+ export interface GeneratedCodeInfo {
1278
+ /**
1279
+ * An Annotation connects some span of text in generated code to an element
1280
+ * of its generating .proto file.
1281
+ */
1282
+ annotation: GeneratedCodeInfo_Annotation[];
1283
+ }
1284
+
1285
+ export interface GeneratedCodeInfo_Annotation {
1286
+ /**
1287
+ * Identifies the element in the original source .proto file. This field
1288
+ * is formatted the same as SourceCodeInfo.Location.path.
1289
+ */
1290
+ path: number[];
1291
+ /** Identifies the filesystem path to the original source .proto. */
1292
+ sourceFile: string;
1293
+ /**
1294
+ * Identifies the starting offset in bytes in the generated code
1295
+ * that relates to the identified object.
1296
+ */
1297
+ begin: number;
1298
+ /**
1299
+ * Identifies the ending offset in bytes in the generated code that
1300
+ * relates to the identified object. The end offset should be one past
1301
+ * the last relevant byte (so the length of the text = end - begin).
1302
+ */
1303
+ end: number;
1304
+ semantic: GeneratedCodeInfo_Annotation_Semantic;
1305
+ }
1306
+
1307
+ /**
1308
+ * Represents the identified object's effect on the element in the original
1309
+ * .proto file.
1310
+ */
1311
+ export enum GeneratedCodeInfo_Annotation_Semantic {
1312
+ /** NONE - There is no effect or the effect is indescribable. */
1313
+ NONE = 0,
1314
+ /** SET - The element is set or otherwise mutated. */
1315
+ SET = 1,
1316
+ /** ALIAS - An alias to the element is returned. */
1317
+ ALIAS = 2,
1318
+ UNRECOGNIZED = -1,
1319
+ }
1320
+
1321
+ export function generatedCodeInfo_Annotation_SemanticFromJSON(object: any): GeneratedCodeInfo_Annotation_Semantic {
1322
+ switch (object) {
1323
+ case 0:
1324
+ case "NONE":
1325
+ return GeneratedCodeInfo_Annotation_Semantic.NONE;
1326
+ case 1:
1327
+ case "SET":
1328
+ return GeneratedCodeInfo_Annotation_Semantic.SET;
1329
+ case 2:
1330
+ case "ALIAS":
1331
+ return GeneratedCodeInfo_Annotation_Semantic.ALIAS;
1332
+ case -1:
1333
+ case "UNRECOGNIZED":
1334
+ default:
1335
+ return GeneratedCodeInfo_Annotation_Semantic.UNRECOGNIZED;
1336
+ }
1337
+ }
1338
+
1339
+ export function generatedCodeInfo_Annotation_SemanticToJSON(object: GeneratedCodeInfo_Annotation_Semantic): string {
1340
+ switch (object) {
1341
+ case GeneratedCodeInfo_Annotation_Semantic.NONE:
1342
+ return "NONE";
1343
+ case GeneratedCodeInfo_Annotation_Semantic.SET:
1344
+ return "SET";
1345
+ case GeneratedCodeInfo_Annotation_Semantic.ALIAS:
1346
+ return "ALIAS";
1347
+ case GeneratedCodeInfo_Annotation_Semantic.UNRECOGNIZED:
1348
+ default:
1349
+ return "UNRECOGNIZED";
1350
+ }
1351
+ }
1352
+
1353
+ function createBaseFileDescriptorSet(): FileDescriptorSet {
1354
+ return { file: [] };
1355
+ }
1356
+
1357
+ export namespace FileDescriptorSet {
1358
+ export function encode(message: FileDescriptorSet, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1359
+ for (const v of message.file) {
1360
+ FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim();
1361
+ }
1362
+ return writer;
1363
+ }
1364
+
1365
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): FileDescriptorSet {
1366
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
1367
+ let end = length === undefined ? reader.len : reader.pos + length;
1368
+ const message = createBaseFileDescriptorSet();
1369
+ while (reader.pos < end) {
1370
+ const tag = reader.uint32();
1371
+ switch (tag >>> 3) {
1372
+ case 1:
1373
+ if (tag !== 10) {
1374
+ break;
1375
+ }
1376
+
1377
+ message.file.push(FileDescriptorProto.decode(reader, reader.uint32()));
1378
+ continue;
1379
+ }
1380
+ if ((tag & 7) === 4 || tag === 0) {
1381
+ break;
1382
+ }
1383
+ reader.skipType(tag & 7);
1384
+ }
1385
+ return message;
1386
+ }
1387
+
1388
+ export function fromJSON(object: any): FileDescriptorSet {
1389
+ return { file: Array.isArray(object?.file) ? object.file.map((e: any) => FileDescriptorProto.fromJSON(e)) : [] };
1390
+ }
1391
+
1392
+ export function toJSON(message: FileDescriptorSet): unknown {
1393
+ const obj: any = {};
1394
+ if (message.file) {
1395
+ obj.file = message.file.map((e) => e ? FileDescriptorProto.toJSON(e) : undefined);
1396
+ } else {
1397
+ obj.file = [];
1398
+ }
1399
+ return obj;
1400
+ }
1401
+
1402
+ export function create<I extends Exact<DeepPartial<FileDescriptorSet>, I>>(base?: I): FileDescriptorSet {
1403
+ return FileDescriptorSet.fromPartial(base ?? {});
1404
+ }
1405
+
1406
+ export function fromPartial<I extends Exact<DeepPartial<FileDescriptorSet>, I>>(object: I): FileDescriptorSet {
1407
+ const message = createBaseFileDescriptorSet();
1408
+ message.file = object.file?.map((e) => FileDescriptorProto.fromPartial(e)) || [];
1409
+ return message;
1410
+ }
1411
+ }
1412
+
1413
+ function createBaseFileDescriptorProto(): FileDescriptorProto {
1414
+ return {
1415
+ name: "",
1416
+ package: "",
1417
+ dependency: [],
1418
+ publicDependency: [],
1419
+ weakDependency: [],
1420
+ messageType: [],
1421
+ enumType: [],
1422
+ service: [],
1423
+ extension: [],
1424
+ options: undefined,
1425
+ sourceCodeInfo: undefined,
1426
+ syntax: "",
1427
+ edition: "",
1428
+ };
1429
+ }
1430
+
1431
+ export namespace FileDescriptorProto {
1432
+ export function encode(message: FileDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1433
+ if (message.name !== "") {
1434
+ writer.uint32(10).string(message.name);
1435
+ }
1436
+ if (message.package !== "") {
1437
+ writer.uint32(18).string(message.package);
1438
+ }
1439
+ for (const v of message.dependency) {
1440
+ writer.uint32(26).string(v!);
1441
+ }
1442
+ writer.uint32(82).fork();
1443
+ for (const v of message.publicDependency) {
1444
+ writer.int32(v);
1445
+ }
1446
+ writer.ldelim();
1447
+ writer.uint32(90).fork();
1448
+ for (const v of message.weakDependency) {
1449
+ writer.int32(v);
1450
+ }
1451
+ writer.ldelim();
1452
+ for (const v of message.messageType) {
1453
+ DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim();
1454
+ }
1455
+ for (const v of message.enumType) {
1456
+ EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim();
1457
+ }
1458
+ for (const v of message.service) {
1459
+ ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim();
1460
+ }
1461
+ for (const v of message.extension) {
1462
+ FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim();
1463
+ }
1464
+ if (message.options !== undefined) {
1465
+ FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim();
1466
+ }
1467
+ if (message.sourceCodeInfo !== undefined) {
1468
+ SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(74).fork()).ldelim();
1469
+ }
1470
+ if (message.syntax !== "") {
1471
+ writer.uint32(98).string(message.syntax);
1472
+ }
1473
+ if (message.edition !== "") {
1474
+ writer.uint32(106).string(message.edition);
1475
+ }
1476
+ return writer;
1477
+ }
1478
+
1479
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): FileDescriptorProto {
1480
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
1481
+ let end = length === undefined ? reader.len : reader.pos + length;
1482
+ const message = createBaseFileDescriptorProto();
1483
+ while (reader.pos < end) {
1484
+ const tag = reader.uint32();
1485
+ switch (tag >>> 3) {
1486
+ case 1:
1487
+ if (tag !== 10) {
1488
+ break;
1489
+ }
1490
+
1491
+ message.name = reader.string();
1492
+ continue;
1493
+ case 2:
1494
+ if (tag !== 18) {
1495
+ break;
1496
+ }
1497
+
1498
+ message.package = reader.string();
1499
+ continue;
1500
+ case 3:
1501
+ if (tag !== 26) {
1502
+ break;
1503
+ }
1504
+
1505
+ message.dependency.push(reader.string());
1506
+ continue;
1507
+ case 10:
1508
+ if (tag === 80) {
1509
+ message.publicDependency.push(reader.int32());
1510
+
1511
+ continue;
1512
+ }
1513
+
1514
+ if (tag === 82) {
1515
+ const end2 = reader.uint32() + reader.pos;
1516
+ while (reader.pos < end2) {
1517
+ message.publicDependency.push(reader.int32());
1518
+ }
1519
+
1520
+ continue;
1521
+ }
1522
+
1523
+ break;
1524
+ case 11:
1525
+ if (tag === 88) {
1526
+ message.weakDependency.push(reader.int32());
1527
+
1528
+ continue;
1529
+ }
1530
+
1531
+ if (tag === 90) {
1532
+ const end2 = reader.uint32() + reader.pos;
1533
+ while (reader.pos < end2) {
1534
+ message.weakDependency.push(reader.int32());
1535
+ }
1536
+
1537
+ continue;
1538
+ }
1539
+
1540
+ break;
1541
+ case 4:
1542
+ if (tag !== 34) {
1543
+ break;
1544
+ }
1545
+
1546
+ message.messageType.push(DescriptorProto.decode(reader, reader.uint32()));
1547
+ continue;
1548
+ case 5:
1549
+ if (tag !== 42) {
1550
+ break;
1551
+ }
1552
+
1553
+ message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32()));
1554
+ continue;
1555
+ case 6:
1556
+ if (tag !== 50) {
1557
+ break;
1558
+ }
1559
+
1560
+ message.service.push(ServiceDescriptorProto.decode(reader, reader.uint32()));
1561
+ continue;
1562
+ case 7:
1563
+ if (tag !== 58) {
1564
+ break;
1565
+ }
1566
+
1567
+ message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32()));
1568
+ continue;
1569
+ case 8:
1570
+ if (tag !== 66) {
1571
+ break;
1572
+ }
1573
+
1574
+ message.options = FileOptions.decode(reader, reader.uint32());
1575
+ continue;
1576
+ case 9:
1577
+ if (tag !== 74) {
1578
+ break;
1579
+ }
1580
+
1581
+ message.sourceCodeInfo = SourceCodeInfo.decode(reader, reader.uint32());
1582
+ continue;
1583
+ case 12:
1584
+ if (tag !== 98) {
1585
+ break;
1586
+ }
1587
+
1588
+ message.syntax = reader.string();
1589
+ continue;
1590
+ case 13:
1591
+ if (tag !== 106) {
1592
+ break;
1593
+ }
1594
+
1595
+ message.edition = reader.string();
1596
+ continue;
1597
+ }
1598
+ if ((tag & 7) === 4 || tag === 0) {
1599
+ break;
1600
+ }
1601
+ reader.skipType(tag & 7);
1602
+ }
1603
+ return message;
1604
+ }
1605
+
1606
+ export function fromJSON(object: any): FileDescriptorProto {
1607
+ return {
1608
+ name: isSet(object.name) ? String(object.name) : "",
1609
+ package: isSet(object.package) ? String(object.package) : "",
1610
+ dependency: Array.isArray(object?.dependency) ? object.dependency.map((e: any) => String(e)) : [],
1611
+ publicDependency: Array.isArray(object?.publicDependency)
1612
+ ? object.publicDependency.map((e: any) => Number(e))
1613
+ : [],
1614
+ weakDependency: Array.isArray(object?.weakDependency) ? object.weakDependency.map((e: any) => Number(e)) : [],
1615
+ messageType: Array.isArray(object?.messageType)
1616
+ ? object.messageType.map((e: any) => DescriptorProto.fromJSON(e))
1617
+ : [],
1618
+ enumType: Array.isArray(object?.enumType) ? object.enumType.map((e: any) => EnumDescriptorProto.fromJSON(e)) : [],
1619
+ service: Array.isArray(object?.service) ? object.service.map((e: any) => ServiceDescriptorProto.fromJSON(e)) : [],
1620
+ extension: Array.isArray(object?.extension)
1621
+ ? object.extension.map((e: any) => FieldDescriptorProto.fromJSON(e))
1622
+ : [],
1623
+ options: isSet(object.options) ? FileOptions.fromJSON(object.options) : undefined,
1624
+ sourceCodeInfo: isSet(object.sourceCodeInfo) ? SourceCodeInfo.fromJSON(object.sourceCodeInfo) : undefined,
1625
+ syntax: isSet(object.syntax) ? String(object.syntax) : "",
1626
+ edition: isSet(object.edition) ? String(object.edition) : "",
1627
+ };
1628
+ }
1629
+
1630
+ export function toJSON(message: FileDescriptorProto): unknown {
1631
+ const obj: any = {};
1632
+ message.name !== undefined && (obj.name = message.name);
1633
+ message.package !== undefined && (obj.package = message.package);
1634
+ if (message.dependency) {
1635
+ obj.dependency = message.dependency.map((e) => e);
1636
+ } else {
1637
+ obj.dependency = [];
1638
+ }
1639
+ if (message.publicDependency) {
1640
+ obj.publicDependency = message.publicDependency.map((e) => Math.round(e));
1641
+ } else {
1642
+ obj.publicDependency = [];
1643
+ }
1644
+ if (message.weakDependency) {
1645
+ obj.weakDependency = message.weakDependency.map((e) => Math.round(e));
1646
+ } else {
1647
+ obj.weakDependency = [];
1648
+ }
1649
+ if (message.messageType) {
1650
+ obj.messageType = message.messageType.map((e) => e ? DescriptorProto.toJSON(e) : undefined);
1651
+ } else {
1652
+ obj.messageType = [];
1653
+ }
1654
+ if (message.enumType) {
1655
+ obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined);
1656
+ } else {
1657
+ obj.enumType = [];
1658
+ }
1659
+ if (message.service) {
1660
+ obj.service = message.service.map((e) => e ? ServiceDescriptorProto.toJSON(e) : undefined);
1661
+ } else {
1662
+ obj.service = [];
1663
+ }
1664
+ if (message.extension) {
1665
+ obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined);
1666
+ } else {
1667
+ obj.extension = [];
1668
+ }
1669
+ message.options !== undefined && (obj.options = message.options ? FileOptions.toJSON(message.options) : undefined);
1670
+ message.sourceCodeInfo !== undefined &&
1671
+ (obj.sourceCodeInfo = message.sourceCodeInfo ? SourceCodeInfo.toJSON(message.sourceCodeInfo) : undefined);
1672
+ message.syntax !== undefined && (obj.syntax = message.syntax);
1673
+ message.edition !== undefined && (obj.edition = message.edition);
1674
+ return obj;
1675
+ }
1676
+
1677
+ export function create<I extends Exact<DeepPartial<FileDescriptorProto>, I>>(base?: I): FileDescriptorProto {
1678
+ return FileDescriptorProto.fromPartial(base ?? {});
1679
+ }
1680
+
1681
+ export function fromPartial<I extends Exact<DeepPartial<FileDescriptorProto>, I>>(object: I): FileDescriptorProto {
1682
+ const message = createBaseFileDescriptorProto();
1683
+ message.name = object.name ?? "";
1684
+ message.package = object.package ?? "";
1685
+ message.dependency = object.dependency?.map((e) => e) || [];
1686
+ message.publicDependency = object.publicDependency?.map((e) => e) || [];
1687
+ message.weakDependency = object.weakDependency?.map((e) => e) || [];
1688
+ message.messageType = object.messageType?.map((e) => DescriptorProto.fromPartial(e)) || [];
1689
+ message.enumType = object.enumType?.map((e) => EnumDescriptorProto.fromPartial(e)) || [];
1690
+ message.service = object.service?.map((e) => ServiceDescriptorProto.fromPartial(e)) || [];
1691
+ message.extension = object.extension?.map((e) => FieldDescriptorProto.fromPartial(e)) || [];
1692
+ message.options = (object.options !== undefined && object.options !== null)
1693
+ ? FileOptions.fromPartial(object.options)
1694
+ : undefined;
1695
+ message.sourceCodeInfo = (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null)
1696
+ ? SourceCodeInfo.fromPartial(object.sourceCodeInfo)
1697
+ : undefined;
1698
+ message.syntax = object.syntax ?? "";
1699
+ message.edition = object.edition ?? "";
1700
+ return message;
1701
+ }
1702
+ }
1703
+
1704
+ function createBaseDescriptorProto(): DescriptorProto {
1705
+ return {
1706
+ name: "",
1707
+ field: [],
1708
+ extension: [],
1709
+ nestedType: [],
1710
+ enumType: [],
1711
+ extensionRange: [],
1712
+ oneofDecl: [],
1713
+ options: undefined,
1714
+ reservedRange: [],
1715
+ reservedName: [],
1716
+ };
1717
+ }
1718
+
1719
+ export namespace DescriptorProto {
1720
+ export function encode(message: DescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1721
+ if (message.name !== "") {
1722
+ writer.uint32(10).string(message.name);
1723
+ }
1724
+ for (const v of message.field) {
1725
+ FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim();
1726
+ }
1727
+ for (const v of message.extension) {
1728
+ FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim();
1729
+ }
1730
+ for (const v of message.nestedType) {
1731
+ DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim();
1732
+ }
1733
+ for (const v of message.enumType) {
1734
+ EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim();
1735
+ }
1736
+ for (const v of message.extensionRange) {
1737
+ DescriptorProto_ExtensionRange.encode(v!, writer.uint32(42).fork()).ldelim();
1738
+ }
1739
+ for (const v of message.oneofDecl) {
1740
+ OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim();
1741
+ }
1742
+ if (message.options !== undefined) {
1743
+ MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim();
1744
+ }
1745
+ for (const v of message.reservedRange) {
1746
+ DescriptorProto_ReservedRange.encode(v!, writer.uint32(74).fork()).ldelim();
1747
+ }
1748
+ for (const v of message.reservedName) {
1749
+ writer.uint32(82).string(v!);
1750
+ }
1751
+ return writer;
1752
+ }
1753
+
1754
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): DescriptorProto {
1755
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
1756
+ let end = length === undefined ? reader.len : reader.pos + length;
1757
+ const message = createBaseDescriptorProto();
1758
+ while (reader.pos < end) {
1759
+ const tag = reader.uint32();
1760
+ switch (tag >>> 3) {
1761
+ case 1:
1762
+ if (tag !== 10) {
1763
+ break;
1764
+ }
1765
+
1766
+ message.name = reader.string();
1767
+ continue;
1768
+ case 2:
1769
+ if (tag !== 18) {
1770
+ break;
1771
+ }
1772
+
1773
+ message.field.push(FieldDescriptorProto.decode(reader, reader.uint32()));
1774
+ continue;
1775
+ case 6:
1776
+ if (tag !== 50) {
1777
+ break;
1778
+ }
1779
+
1780
+ message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32()));
1781
+ continue;
1782
+ case 3:
1783
+ if (tag !== 26) {
1784
+ break;
1785
+ }
1786
+
1787
+ message.nestedType.push(DescriptorProto.decode(reader, reader.uint32()));
1788
+ continue;
1789
+ case 4:
1790
+ if (tag !== 34) {
1791
+ break;
1792
+ }
1793
+
1794
+ message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32()));
1795
+ continue;
1796
+ case 5:
1797
+ if (tag !== 42) {
1798
+ break;
1799
+ }
1800
+
1801
+ message.extensionRange.push(DescriptorProto_ExtensionRange.decode(reader, reader.uint32()));
1802
+ continue;
1803
+ case 8:
1804
+ if (tag !== 66) {
1805
+ break;
1806
+ }
1807
+
1808
+ message.oneofDecl.push(OneofDescriptorProto.decode(reader, reader.uint32()));
1809
+ continue;
1810
+ case 7:
1811
+ if (tag !== 58) {
1812
+ break;
1813
+ }
1814
+
1815
+ message.options = MessageOptions.decode(reader, reader.uint32());
1816
+ continue;
1817
+ case 9:
1818
+ if (tag !== 74) {
1819
+ break;
1820
+ }
1821
+
1822
+ message.reservedRange.push(DescriptorProto_ReservedRange.decode(reader, reader.uint32()));
1823
+ continue;
1824
+ case 10:
1825
+ if (tag !== 82) {
1826
+ break;
1827
+ }
1828
+
1829
+ message.reservedName.push(reader.string());
1830
+ continue;
1831
+ }
1832
+ if ((tag & 7) === 4 || tag === 0) {
1833
+ break;
1834
+ }
1835
+ reader.skipType(tag & 7);
1836
+ }
1837
+ return message;
1838
+ }
1839
+
1840
+ export function fromJSON(object: any): DescriptorProto {
1841
+ return {
1842
+ name: isSet(object.name) ? String(object.name) : "",
1843
+ field: Array.isArray(object?.field) ? object.field.map((e: any) => FieldDescriptorProto.fromJSON(e)) : [],
1844
+ extension: Array.isArray(object?.extension)
1845
+ ? object.extension.map((e: any) => FieldDescriptorProto.fromJSON(e))
1846
+ : [],
1847
+ nestedType: Array.isArray(object?.nestedType)
1848
+ ? object.nestedType.map((e: any) => DescriptorProto.fromJSON(e))
1849
+ : [],
1850
+ enumType: Array.isArray(object?.enumType) ? object.enumType.map((e: any) => EnumDescriptorProto.fromJSON(e)) : [],
1851
+ extensionRange: Array.isArray(object?.extensionRange)
1852
+ ? object.extensionRange.map((e: any) => DescriptorProto_ExtensionRange.fromJSON(e))
1853
+ : [],
1854
+ oneofDecl: Array.isArray(object?.oneofDecl)
1855
+ ? object.oneofDecl.map((e: any) => OneofDescriptorProto.fromJSON(e))
1856
+ : [],
1857
+ options: isSet(object.options) ? MessageOptions.fromJSON(object.options) : undefined,
1858
+ reservedRange: Array.isArray(object?.reservedRange)
1859
+ ? object.reservedRange.map((e: any) => DescriptorProto_ReservedRange.fromJSON(e))
1860
+ : [],
1861
+ reservedName: Array.isArray(object?.reservedName) ? object.reservedName.map((e: any) => String(e)) : [],
1862
+ };
1863
+ }
1864
+
1865
+ export function toJSON(message: DescriptorProto): unknown {
1866
+ const obj: any = {};
1867
+ message.name !== undefined && (obj.name = message.name);
1868
+ if (message.field) {
1869
+ obj.field = message.field.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined);
1870
+ } else {
1871
+ obj.field = [];
1872
+ }
1873
+ if (message.extension) {
1874
+ obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined);
1875
+ } else {
1876
+ obj.extension = [];
1877
+ }
1878
+ if (message.nestedType) {
1879
+ obj.nestedType = message.nestedType.map((e) => e ? DescriptorProto.toJSON(e) : undefined);
1880
+ } else {
1881
+ obj.nestedType = [];
1882
+ }
1883
+ if (message.enumType) {
1884
+ obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined);
1885
+ } else {
1886
+ obj.enumType = [];
1887
+ }
1888
+ if (message.extensionRange) {
1889
+ obj.extensionRange = message.extensionRange.map((e) => e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined);
1890
+ } else {
1891
+ obj.extensionRange = [];
1892
+ }
1893
+ if (message.oneofDecl) {
1894
+ obj.oneofDecl = message.oneofDecl.map((e) => e ? OneofDescriptorProto.toJSON(e) : undefined);
1895
+ } else {
1896
+ obj.oneofDecl = [];
1897
+ }
1898
+ message.options !== undefined &&
1899
+ (obj.options = message.options ? MessageOptions.toJSON(message.options) : undefined);
1900
+ if (message.reservedRange) {
1901
+ obj.reservedRange = message.reservedRange.map((e) => e ? DescriptorProto_ReservedRange.toJSON(e) : undefined);
1902
+ } else {
1903
+ obj.reservedRange = [];
1904
+ }
1905
+ if (message.reservedName) {
1906
+ obj.reservedName = message.reservedName.map((e) => e);
1907
+ } else {
1908
+ obj.reservedName = [];
1909
+ }
1910
+ return obj;
1911
+ }
1912
+
1913
+ export function create<I extends Exact<DeepPartial<DescriptorProto>, I>>(base?: I): DescriptorProto {
1914
+ return DescriptorProto.fromPartial(base ?? {});
1915
+ }
1916
+
1917
+ export function fromPartial<I extends Exact<DeepPartial<DescriptorProto>, I>>(object: I): DescriptorProto {
1918
+ const message = createBaseDescriptorProto();
1919
+ message.name = object.name ?? "";
1920
+ message.field = object.field?.map((e) => FieldDescriptorProto.fromPartial(e)) || [];
1921
+ message.extension = object.extension?.map((e) => FieldDescriptorProto.fromPartial(e)) || [];
1922
+ message.nestedType = object.nestedType?.map((e) => DescriptorProto.fromPartial(e)) || [];
1923
+ message.enumType = object.enumType?.map((e) => EnumDescriptorProto.fromPartial(e)) || [];
1924
+ message.extensionRange = object.extensionRange?.map((e) => DescriptorProto_ExtensionRange.fromPartial(e)) || [];
1925
+ message.oneofDecl = object.oneofDecl?.map((e) => OneofDescriptorProto.fromPartial(e)) || [];
1926
+ message.options = (object.options !== undefined && object.options !== null)
1927
+ ? MessageOptions.fromPartial(object.options)
1928
+ : undefined;
1929
+ message.reservedRange = object.reservedRange?.map((e) => DescriptorProto_ReservedRange.fromPartial(e)) || [];
1930
+ message.reservedName = object.reservedName?.map((e) => e) || [];
1931
+ return message;
1932
+ }
1933
+ }
1934
+
1935
+ function createBaseDescriptorProto_ExtensionRange(): DescriptorProto_ExtensionRange {
1936
+ return { start: 0, end: 0, options: undefined };
1937
+ }
1938
+
1939
+ export namespace DescriptorProto_ExtensionRange {
1940
+ export function encode(
1941
+ message: DescriptorProto_ExtensionRange,
1942
+ writer: _m0.Writer = _m0.Writer.create(),
1943
+ ): _m0.Writer {
1944
+ if (message.start !== 0) {
1945
+ writer.uint32(8).int32(message.start);
1946
+ }
1947
+ if (message.end !== 0) {
1948
+ writer.uint32(16).int32(message.end);
1949
+ }
1950
+ if (message.options !== undefined) {
1951
+ ExtensionRangeOptions.encode(message.options, writer.uint32(26).fork()).ldelim();
1952
+ }
1953
+ return writer;
1954
+ }
1955
+
1956
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): DescriptorProto_ExtensionRange {
1957
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
1958
+ let end = length === undefined ? reader.len : reader.pos + length;
1959
+ const message = createBaseDescriptorProto_ExtensionRange();
1960
+ while (reader.pos < end) {
1961
+ const tag = reader.uint32();
1962
+ switch (tag >>> 3) {
1963
+ case 1:
1964
+ if (tag !== 8) {
1965
+ break;
1966
+ }
1967
+
1968
+ message.start = reader.int32();
1969
+ continue;
1970
+ case 2:
1971
+ if (tag !== 16) {
1972
+ break;
1973
+ }
1974
+
1975
+ message.end = reader.int32();
1976
+ continue;
1977
+ case 3:
1978
+ if (tag !== 26) {
1979
+ break;
1980
+ }
1981
+
1982
+ message.options = ExtensionRangeOptions.decode(reader, reader.uint32());
1983
+ continue;
1984
+ }
1985
+ if ((tag & 7) === 4 || tag === 0) {
1986
+ break;
1987
+ }
1988
+ reader.skipType(tag & 7);
1989
+ }
1990
+ return message;
1991
+ }
1992
+
1993
+ export function fromJSON(object: any): DescriptorProto_ExtensionRange {
1994
+ return {
1995
+ start: isSet(object.start) ? Number(object.start) : 0,
1996
+ end: isSet(object.end) ? Number(object.end) : 0,
1997
+ options: isSet(object.options) ? ExtensionRangeOptions.fromJSON(object.options) : undefined,
1998
+ };
1999
+ }
2000
+
2001
+ export function toJSON(message: DescriptorProto_ExtensionRange): unknown {
2002
+ const obj: any = {};
2003
+ message.start !== undefined && (obj.start = Math.round(message.start));
2004
+ message.end !== undefined && (obj.end = Math.round(message.end));
2005
+ message.options !== undefined &&
2006
+ (obj.options = message.options ? ExtensionRangeOptions.toJSON(message.options) : undefined);
2007
+ return obj;
2008
+ }
2009
+
2010
+ export function create<I extends Exact<DeepPartial<DescriptorProto_ExtensionRange>, I>>(
2011
+ base?: I,
2012
+ ): DescriptorProto_ExtensionRange {
2013
+ return DescriptorProto_ExtensionRange.fromPartial(base ?? {});
2014
+ }
2015
+
2016
+ export function fromPartial<I extends Exact<DeepPartial<DescriptorProto_ExtensionRange>, I>>(
2017
+ object: I,
2018
+ ): DescriptorProto_ExtensionRange {
2019
+ const message = createBaseDescriptorProto_ExtensionRange();
2020
+ message.start = object.start ?? 0;
2021
+ message.end = object.end ?? 0;
2022
+ message.options = (object.options !== undefined && object.options !== null)
2023
+ ? ExtensionRangeOptions.fromPartial(object.options)
2024
+ : undefined;
2025
+ return message;
2026
+ }
2027
+ }
2028
+
2029
+ function createBaseDescriptorProto_ReservedRange(): DescriptorProto_ReservedRange {
2030
+ return { start: 0, end: 0 };
2031
+ }
2032
+
2033
+ export namespace DescriptorProto_ReservedRange {
2034
+ export function encode(message: DescriptorProto_ReservedRange, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
2035
+ if (message.start !== 0) {
2036
+ writer.uint32(8).int32(message.start);
2037
+ }
2038
+ if (message.end !== 0) {
2039
+ writer.uint32(16).int32(message.end);
2040
+ }
2041
+ return writer;
2042
+ }
2043
+
2044
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): DescriptorProto_ReservedRange {
2045
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
2046
+ let end = length === undefined ? reader.len : reader.pos + length;
2047
+ const message = createBaseDescriptorProto_ReservedRange();
2048
+ while (reader.pos < end) {
2049
+ const tag = reader.uint32();
2050
+ switch (tag >>> 3) {
2051
+ case 1:
2052
+ if (tag !== 8) {
2053
+ break;
2054
+ }
2055
+
2056
+ message.start = reader.int32();
2057
+ continue;
2058
+ case 2:
2059
+ if (tag !== 16) {
2060
+ break;
2061
+ }
2062
+
2063
+ message.end = reader.int32();
2064
+ continue;
2065
+ }
2066
+ if ((tag & 7) === 4 || tag === 0) {
2067
+ break;
2068
+ }
2069
+ reader.skipType(tag & 7);
2070
+ }
2071
+ return message;
2072
+ }
2073
+
2074
+ export function fromJSON(object: any): DescriptorProto_ReservedRange {
2075
+ return { start: isSet(object.start) ? Number(object.start) : 0, end: isSet(object.end) ? Number(object.end) : 0 };
2076
+ }
2077
+
2078
+ export function toJSON(message: DescriptorProto_ReservedRange): unknown {
2079
+ const obj: any = {};
2080
+ message.start !== undefined && (obj.start = Math.round(message.start));
2081
+ message.end !== undefined && (obj.end = Math.round(message.end));
2082
+ return obj;
2083
+ }
2084
+
2085
+ export function create<I extends Exact<DeepPartial<DescriptorProto_ReservedRange>, I>>(
2086
+ base?: I,
2087
+ ): DescriptorProto_ReservedRange {
2088
+ return DescriptorProto_ReservedRange.fromPartial(base ?? {});
2089
+ }
2090
+
2091
+ export function fromPartial<I extends Exact<DeepPartial<DescriptorProto_ReservedRange>, I>>(
2092
+ object: I,
2093
+ ): DescriptorProto_ReservedRange {
2094
+ const message = createBaseDescriptorProto_ReservedRange();
2095
+ message.start = object.start ?? 0;
2096
+ message.end = object.end ?? 0;
2097
+ return message;
2098
+ }
2099
+ }
2100
+
2101
+ function createBaseExtensionRangeOptions(): ExtensionRangeOptions {
2102
+ return { uninterpretedOption: [] };
2103
+ }
2104
+
2105
+ export namespace ExtensionRangeOptions {
2106
+ export function encode(message: ExtensionRangeOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
2107
+ for (const v of message.uninterpretedOption) {
2108
+ UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();
2109
+ }
2110
+ return writer;
2111
+ }
2112
+
2113
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): ExtensionRangeOptions {
2114
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
2115
+ let end = length === undefined ? reader.len : reader.pos + length;
2116
+ const message = createBaseExtensionRangeOptions();
2117
+ while (reader.pos < end) {
2118
+ const tag = reader.uint32();
2119
+ switch (tag >>> 3) {
2120
+ case 999:
2121
+ if (tag !== 7994) {
2122
+ break;
2123
+ }
2124
+
2125
+ message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32()));
2126
+ continue;
2127
+ }
2128
+ if ((tag & 7) === 4 || tag === 0) {
2129
+ break;
2130
+ }
2131
+ reader.skipType(tag & 7);
2132
+ }
2133
+ return message;
2134
+ }
2135
+
2136
+ export function fromJSON(object: any): ExtensionRangeOptions {
2137
+ return {
2138
+ uninterpretedOption: Array.isArray(object?.uninterpretedOption)
2139
+ ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
2140
+ : [],
2141
+ };
2142
+ }
2143
+
2144
+ export function toJSON(message: ExtensionRangeOptions): unknown {
2145
+ const obj: any = {};
2146
+ if (message.uninterpretedOption) {
2147
+ obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined);
2148
+ } else {
2149
+ obj.uninterpretedOption = [];
2150
+ }
2151
+ return obj;
2152
+ }
2153
+
2154
+ export function create<I extends Exact<DeepPartial<ExtensionRangeOptions>, I>>(base?: I): ExtensionRangeOptions {
2155
+ return ExtensionRangeOptions.fromPartial(base ?? {});
2156
+ }
2157
+
2158
+ export function fromPartial<I extends Exact<DeepPartial<ExtensionRangeOptions>, I>>(
2159
+ object: I,
2160
+ ): ExtensionRangeOptions {
2161
+ const message = createBaseExtensionRangeOptions();
2162
+ message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
2163
+ return message;
2164
+ }
2165
+ }
2166
+
2167
+ function createBaseFieldDescriptorProto(): FieldDescriptorProto {
2168
+ return {
2169
+ name: "",
2170
+ number: 0,
2171
+ label: 1,
2172
+ type: 1,
2173
+ typeName: "",
2174
+ extendee: "",
2175
+ defaultValue: "",
2176
+ oneofIndex: 0,
2177
+ jsonName: "",
2178
+ options: undefined,
2179
+ proto3Optional: false,
2180
+ };
2181
+ }
2182
+
2183
+ export namespace FieldDescriptorProto {
2184
+ export function encode(message: FieldDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
2185
+ if (message.name !== "") {
2186
+ writer.uint32(10).string(message.name);
2187
+ }
2188
+ if (message.number !== 0) {
2189
+ writer.uint32(24).int32(message.number);
2190
+ }
2191
+ if (message.label !== 1) {
2192
+ writer.uint32(32).int32(message.label);
2193
+ }
2194
+ if (message.type !== 1) {
2195
+ writer.uint32(40).int32(message.type);
2196
+ }
2197
+ if (message.typeName !== "") {
2198
+ writer.uint32(50).string(message.typeName);
2199
+ }
2200
+ if (message.extendee !== "") {
2201
+ writer.uint32(18).string(message.extendee);
2202
+ }
2203
+ if (message.defaultValue !== "") {
2204
+ writer.uint32(58).string(message.defaultValue);
2205
+ }
2206
+ if (message.oneofIndex !== 0) {
2207
+ writer.uint32(72).int32(message.oneofIndex);
2208
+ }
2209
+ if (message.jsonName !== "") {
2210
+ writer.uint32(82).string(message.jsonName);
2211
+ }
2212
+ if (message.options !== undefined) {
2213
+ FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim();
2214
+ }
2215
+ if (message.proto3Optional === true) {
2216
+ writer.uint32(136).bool(message.proto3Optional);
2217
+ }
2218
+ return writer;
2219
+ }
2220
+
2221
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): FieldDescriptorProto {
2222
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
2223
+ let end = length === undefined ? reader.len : reader.pos + length;
2224
+ const message = createBaseFieldDescriptorProto();
2225
+ while (reader.pos < end) {
2226
+ const tag = reader.uint32();
2227
+ switch (tag >>> 3) {
2228
+ case 1:
2229
+ if (tag !== 10) {
2230
+ break;
2231
+ }
2232
+
2233
+ message.name = reader.string();
2234
+ continue;
2235
+ case 3:
2236
+ if (tag !== 24) {
2237
+ break;
2238
+ }
2239
+
2240
+ message.number = reader.int32();
2241
+ continue;
2242
+ case 4:
2243
+ if (tag !== 32) {
2244
+ break;
2245
+ }
2246
+
2247
+ message.label = reader.int32() as any;
2248
+ continue;
2249
+ case 5:
2250
+ if (tag !== 40) {
2251
+ break;
2252
+ }
2253
+
2254
+ message.type = reader.int32() as any;
2255
+ continue;
2256
+ case 6:
2257
+ if (tag !== 50) {
2258
+ break;
2259
+ }
2260
+
2261
+ message.typeName = reader.string();
2262
+ continue;
2263
+ case 2:
2264
+ if (tag !== 18) {
2265
+ break;
2266
+ }
2267
+
2268
+ message.extendee = reader.string();
2269
+ continue;
2270
+ case 7:
2271
+ if (tag !== 58) {
2272
+ break;
2273
+ }
2274
+
2275
+ message.defaultValue = reader.string();
2276
+ continue;
2277
+ case 9:
2278
+ if (tag !== 72) {
2279
+ break;
2280
+ }
2281
+
2282
+ message.oneofIndex = reader.int32();
2283
+ continue;
2284
+ case 10:
2285
+ if (tag !== 82) {
2286
+ break;
2287
+ }
2288
+
2289
+ message.jsonName = reader.string();
2290
+ continue;
2291
+ case 8:
2292
+ if (tag !== 66) {
2293
+ break;
2294
+ }
2295
+
2296
+ message.options = FieldOptions.decode(reader, reader.uint32());
2297
+ continue;
2298
+ case 17:
2299
+ if (tag !== 136) {
2300
+ break;
2301
+ }
2302
+
2303
+ message.proto3Optional = reader.bool();
2304
+ continue;
2305
+ }
2306
+ if ((tag & 7) === 4 || tag === 0) {
2307
+ break;
2308
+ }
2309
+ reader.skipType(tag & 7);
2310
+ }
2311
+ return message;
2312
+ }
2313
+
2314
+ export function fromJSON(object: any): FieldDescriptorProto {
2315
+ return {
2316
+ name: isSet(object.name) ? String(object.name) : "",
2317
+ number: isSet(object.number) ? Number(object.number) : 0,
2318
+ label: isSet(object.label) ? fieldDescriptorProto_LabelFromJSON(object.label) : 1,
2319
+ type: isSet(object.type) ? fieldDescriptorProto_TypeFromJSON(object.type) : 1,
2320
+ typeName: isSet(object.typeName) ? String(object.typeName) : "",
2321
+ extendee: isSet(object.extendee) ? String(object.extendee) : "",
2322
+ defaultValue: isSet(object.defaultValue) ? String(object.defaultValue) : "",
2323
+ oneofIndex: isSet(object.oneofIndex) ? Number(object.oneofIndex) : 0,
2324
+ jsonName: isSet(object.jsonName) ? String(object.jsonName) : "",
2325
+ options: isSet(object.options) ? FieldOptions.fromJSON(object.options) : undefined,
2326
+ proto3Optional: isSet(object.proto3Optional) ? Boolean(object.proto3Optional) : false,
2327
+ };
2328
+ }
2329
+
2330
+ export function toJSON(message: FieldDescriptorProto): unknown {
2331
+ const obj: any = {};
2332
+ message.name !== undefined && (obj.name = message.name);
2333
+ message.number !== undefined && (obj.number = Math.round(message.number));
2334
+ message.label !== undefined && (obj.label = fieldDescriptorProto_LabelToJSON(message.label));
2335
+ message.type !== undefined && (obj.type = fieldDescriptorProto_TypeToJSON(message.type));
2336
+ message.typeName !== undefined && (obj.typeName = message.typeName);
2337
+ message.extendee !== undefined && (obj.extendee = message.extendee);
2338
+ message.defaultValue !== undefined && (obj.defaultValue = message.defaultValue);
2339
+ message.oneofIndex !== undefined && (obj.oneofIndex = Math.round(message.oneofIndex));
2340
+ message.jsonName !== undefined && (obj.jsonName = message.jsonName);
2341
+ message.options !== undefined && (obj.options = message.options ? FieldOptions.toJSON(message.options) : undefined);
2342
+ message.proto3Optional !== undefined && (obj.proto3Optional = message.proto3Optional);
2343
+ return obj;
2344
+ }
2345
+
2346
+ export function create<I extends Exact<DeepPartial<FieldDescriptorProto>, I>>(base?: I): FieldDescriptorProto {
2347
+ return FieldDescriptorProto.fromPartial(base ?? {});
2348
+ }
2349
+
2350
+ export function fromPartial<I extends Exact<DeepPartial<FieldDescriptorProto>, I>>(object: I): FieldDescriptorProto {
2351
+ const message = createBaseFieldDescriptorProto();
2352
+ message.name = object.name ?? "";
2353
+ message.number = object.number ?? 0;
2354
+ message.label = object.label ?? 1;
2355
+ message.type = object.type ?? 1;
2356
+ message.typeName = object.typeName ?? "";
2357
+ message.extendee = object.extendee ?? "";
2358
+ message.defaultValue = object.defaultValue ?? "";
2359
+ message.oneofIndex = object.oneofIndex ?? 0;
2360
+ message.jsonName = object.jsonName ?? "";
2361
+ message.options = (object.options !== undefined && object.options !== null)
2362
+ ? FieldOptions.fromPartial(object.options)
2363
+ : undefined;
2364
+ message.proto3Optional = object.proto3Optional ?? false;
2365
+ return message;
2366
+ }
2367
+ }
2368
+
2369
+ function createBaseOneofDescriptorProto(): OneofDescriptorProto {
2370
+ return { name: "", options: undefined };
2371
+ }
2372
+
2373
+ export namespace OneofDescriptorProto {
2374
+ export function encode(message: OneofDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
2375
+ if (message.name !== "") {
2376
+ writer.uint32(10).string(message.name);
2377
+ }
2378
+ if (message.options !== undefined) {
2379
+ OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim();
2380
+ }
2381
+ return writer;
2382
+ }
2383
+
2384
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): OneofDescriptorProto {
2385
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
2386
+ let end = length === undefined ? reader.len : reader.pos + length;
2387
+ const message = createBaseOneofDescriptorProto();
2388
+ while (reader.pos < end) {
2389
+ const tag = reader.uint32();
2390
+ switch (tag >>> 3) {
2391
+ case 1:
2392
+ if (tag !== 10) {
2393
+ break;
2394
+ }
2395
+
2396
+ message.name = reader.string();
2397
+ continue;
2398
+ case 2:
2399
+ if (tag !== 18) {
2400
+ break;
2401
+ }
2402
+
2403
+ message.options = OneofOptions.decode(reader, reader.uint32());
2404
+ continue;
2405
+ }
2406
+ if ((tag & 7) === 4 || tag === 0) {
2407
+ break;
2408
+ }
2409
+ reader.skipType(tag & 7);
2410
+ }
2411
+ return message;
2412
+ }
2413
+
2414
+ export function fromJSON(object: any): OneofDescriptorProto {
2415
+ return {
2416
+ name: isSet(object.name) ? String(object.name) : "",
2417
+ options: isSet(object.options) ? OneofOptions.fromJSON(object.options) : undefined,
2418
+ };
2419
+ }
2420
+
2421
+ export function toJSON(message: OneofDescriptorProto): unknown {
2422
+ const obj: any = {};
2423
+ message.name !== undefined && (obj.name = message.name);
2424
+ message.options !== undefined && (obj.options = message.options ? OneofOptions.toJSON(message.options) : undefined);
2425
+ return obj;
2426
+ }
2427
+
2428
+ export function create<I extends Exact<DeepPartial<OneofDescriptorProto>, I>>(base?: I): OneofDescriptorProto {
2429
+ return OneofDescriptorProto.fromPartial(base ?? {});
2430
+ }
2431
+
2432
+ export function fromPartial<I extends Exact<DeepPartial<OneofDescriptorProto>, I>>(object: I): OneofDescriptorProto {
2433
+ const message = createBaseOneofDescriptorProto();
2434
+ message.name = object.name ?? "";
2435
+ message.options = (object.options !== undefined && object.options !== null)
2436
+ ? OneofOptions.fromPartial(object.options)
2437
+ : undefined;
2438
+ return message;
2439
+ }
2440
+ }
2441
+
2442
+ function createBaseEnumDescriptorProto(): EnumDescriptorProto {
2443
+ return { name: "", value: [], options: undefined, reservedRange: [], reservedName: [] };
2444
+ }
2445
+
2446
+ export namespace EnumDescriptorProto {
2447
+ export function encode(message: EnumDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
2448
+ if (message.name !== "") {
2449
+ writer.uint32(10).string(message.name);
2450
+ }
2451
+ for (const v of message.value) {
2452
+ EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim();
2453
+ }
2454
+ if (message.options !== undefined) {
2455
+ EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim();
2456
+ }
2457
+ for (const v of message.reservedRange) {
2458
+ EnumDescriptorProto_EnumReservedRange.encode(v!, writer.uint32(34).fork()).ldelim();
2459
+ }
2460
+ for (const v of message.reservedName) {
2461
+ writer.uint32(42).string(v!);
2462
+ }
2463
+ return writer;
2464
+ }
2465
+
2466
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): EnumDescriptorProto {
2467
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
2468
+ let end = length === undefined ? reader.len : reader.pos + length;
2469
+ const message = createBaseEnumDescriptorProto();
2470
+ while (reader.pos < end) {
2471
+ const tag = reader.uint32();
2472
+ switch (tag >>> 3) {
2473
+ case 1:
2474
+ if (tag !== 10) {
2475
+ break;
2476
+ }
2477
+
2478
+ message.name = reader.string();
2479
+ continue;
2480
+ case 2:
2481
+ if (tag !== 18) {
2482
+ break;
2483
+ }
2484
+
2485
+ message.value.push(EnumValueDescriptorProto.decode(reader, reader.uint32()));
2486
+ continue;
2487
+ case 3:
2488
+ if (tag !== 26) {
2489
+ break;
2490
+ }
2491
+
2492
+ message.options = EnumOptions.decode(reader, reader.uint32());
2493
+ continue;
2494
+ case 4:
2495
+ if (tag !== 34) {
2496
+ break;
2497
+ }
2498
+
2499
+ message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.decode(reader, reader.uint32()));
2500
+ continue;
2501
+ case 5:
2502
+ if (tag !== 42) {
2503
+ break;
2504
+ }
2505
+
2506
+ message.reservedName.push(reader.string());
2507
+ continue;
2508
+ }
2509
+ if ((tag & 7) === 4 || tag === 0) {
2510
+ break;
2511
+ }
2512
+ reader.skipType(tag & 7);
2513
+ }
2514
+ return message;
2515
+ }
2516
+
2517
+ export function fromJSON(object: any): EnumDescriptorProto {
2518
+ return {
2519
+ name: isSet(object.name) ? String(object.name) : "",
2520
+ value: Array.isArray(object?.value) ? object.value.map((e: any) => EnumValueDescriptorProto.fromJSON(e)) : [],
2521
+ options: isSet(object.options) ? EnumOptions.fromJSON(object.options) : undefined,
2522
+ reservedRange: Array.isArray(object?.reservedRange)
2523
+ ? object.reservedRange.map((e: any) => EnumDescriptorProto_EnumReservedRange.fromJSON(e))
2524
+ : [],
2525
+ reservedName: Array.isArray(object?.reservedName) ? object.reservedName.map((e: any) => String(e)) : [],
2526
+ };
2527
+ }
2528
+
2529
+ export function toJSON(message: EnumDescriptorProto): unknown {
2530
+ const obj: any = {};
2531
+ message.name !== undefined && (obj.name = message.name);
2532
+ if (message.value) {
2533
+ obj.value = message.value.map((e) => e ? EnumValueDescriptorProto.toJSON(e) : undefined);
2534
+ } else {
2535
+ obj.value = [];
2536
+ }
2537
+ message.options !== undefined && (obj.options = message.options ? EnumOptions.toJSON(message.options) : undefined);
2538
+ if (message.reservedRange) {
2539
+ obj.reservedRange = message.reservedRange.map((e) =>
2540
+ e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined
2541
+ );
2542
+ } else {
2543
+ obj.reservedRange = [];
2544
+ }
2545
+ if (message.reservedName) {
2546
+ obj.reservedName = message.reservedName.map((e) => e);
2547
+ } else {
2548
+ obj.reservedName = [];
2549
+ }
2550
+ return obj;
2551
+ }
2552
+
2553
+ export function create<I extends Exact<DeepPartial<EnumDescriptorProto>, I>>(base?: I): EnumDescriptorProto {
2554
+ return EnumDescriptorProto.fromPartial(base ?? {});
2555
+ }
2556
+
2557
+ export function fromPartial<I extends Exact<DeepPartial<EnumDescriptorProto>, I>>(object: I): EnumDescriptorProto {
2558
+ const message = createBaseEnumDescriptorProto();
2559
+ message.name = object.name ?? "";
2560
+ message.value = object.value?.map((e) => EnumValueDescriptorProto.fromPartial(e)) || [];
2561
+ message.options = (object.options !== undefined && object.options !== null)
2562
+ ? EnumOptions.fromPartial(object.options)
2563
+ : undefined;
2564
+ message.reservedRange = object.reservedRange?.map((e) => EnumDescriptorProto_EnumReservedRange.fromPartial(e)) ||
2565
+ [];
2566
+ message.reservedName = object.reservedName?.map((e) => e) || [];
2567
+ return message;
2568
+ }
2569
+ }
2570
+
2571
+ function createBaseEnumDescriptorProto_EnumReservedRange(): EnumDescriptorProto_EnumReservedRange {
2572
+ return { start: 0, end: 0 };
2573
+ }
2574
+
2575
+ export namespace EnumDescriptorProto_EnumReservedRange {
2576
+ export function encode(
2577
+ message: EnumDescriptorProto_EnumReservedRange,
2578
+ writer: _m0.Writer = _m0.Writer.create(),
2579
+ ): _m0.Writer {
2580
+ if (message.start !== 0) {
2581
+ writer.uint32(8).int32(message.start);
2582
+ }
2583
+ if (message.end !== 0) {
2584
+ writer.uint32(16).int32(message.end);
2585
+ }
2586
+ return writer;
2587
+ }
2588
+
2589
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): EnumDescriptorProto_EnumReservedRange {
2590
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
2591
+ let end = length === undefined ? reader.len : reader.pos + length;
2592
+ const message = createBaseEnumDescriptorProto_EnumReservedRange();
2593
+ while (reader.pos < end) {
2594
+ const tag = reader.uint32();
2595
+ switch (tag >>> 3) {
2596
+ case 1:
2597
+ if (tag !== 8) {
2598
+ break;
2599
+ }
2600
+
2601
+ message.start = reader.int32();
2602
+ continue;
2603
+ case 2:
2604
+ if (tag !== 16) {
2605
+ break;
2606
+ }
2607
+
2608
+ message.end = reader.int32();
2609
+ continue;
2610
+ }
2611
+ if ((tag & 7) === 4 || tag === 0) {
2612
+ break;
2613
+ }
2614
+ reader.skipType(tag & 7);
2615
+ }
2616
+ return message;
2617
+ }
2618
+
2619
+ export function fromJSON(object: any): EnumDescriptorProto_EnumReservedRange {
2620
+ return { start: isSet(object.start) ? Number(object.start) : 0, end: isSet(object.end) ? Number(object.end) : 0 };
2621
+ }
2622
+
2623
+ export function toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown {
2624
+ const obj: any = {};
2625
+ message.start !== undefined && (obj.start = Math.round(message.start));
2626
+ message.end !== undefined && (obj.end = Math.round(message.end));
2627
+ return obj;
2628
+ }
2629
+
2630
+ export function create<I extends Exact<DeepPartial<EnumDescriptorProto_EnumReservedRange>, I>>(
2631
+ base?: I,
2632
+ ): EnumDescriptorProto_EnumReservedRange {
2633
+ return EnumDescriptorProto_EnumReservedRange.fromPartial(base ?? {});
2634
+ }
2635
+
2636
+ export function fromPartial<I extends Exact<DeepPartial<EnumDescriptorProto_EnumReservedRange>, I>>(
2637
+ object: I,
2638
+ ): EnumDescriptorProto_EnumReservedRange {
2639
+ const message = createBaseEnumDescriptorProto_EnumReservedRange();
2640
+ message.start = object.start ?? 0;
2641
+ message.end = object.end ?? 0;
2642
+ return message;
2643
+ }
2644
+ }
2645
+
2646
+ function createBaseEnumValueDescriptorProto(): EnumValueDescriptorProto {
2647
+ return { name: "", number: 0, options: undefined };
2648
+ }
2649
+
2650
+ export namespace EnumValueDescriptorProto {
2651
+ export function encode(message: EnumValueDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
2652
+ if (message.name !== "") {
2653
+ writer.uint32(10).string(message.name);
2654
+ }
2655
+ if (message.number !== 0) {
2656
+ writer.uint32(16).int32(message.number);
2657
+ }
2658
+ if (message.options !== undefined) {
2659
+ EnumValueOptions.encode(message.options, writer.uint32(26).fork()).ldelim();
2660
+ }
2661
+ return writer;
2662
+ }
2663
+
2664
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): EnumValueDescriptorProto {
2665
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
2666
+ let end = length === undefined ? reader.len : reader.pos + length;
2667
+ const message = createBaseEnumValueDescriptorProto();
2668
+ while (reader.pos < end) {
2669
+ const tag = reader.uint32();
2670
+ switch (tag >>> 3) {
2671
+ case 1:
2672
+ if (tag !== 10) {
2673
+ break;
2674
+ }
2675
+
2676
+ message.name = reader.string();
2677
+ continue;
2678
+ case 2:
2679
+ if (tag !== 16) {
2680
+ break;
2681
+ }
2682
+
2683
+ message.number = reader.int32();
2684
+ continue;
2685
+ case 3:
2686
+ if (tag !== 26) {
2687
+ break;
2688
+ }
2689
+
2690
+ message.options = EnumValueOptions.decode(reader, reader.uint32());
2691
+ continue;
2692
+ }
2693
+ if ((tag & 7) === 4 || tag === 0) {
2694
+ break;
2695
+ }
2696
+ reader.skipType(tag & 7);
2697
+ }
2698
+ return message;
2699
+ }
2700
+
2701
+ export function fromJSON(object: any): EnumValueDescriptorProto {
2702
+ return {
2703
+ name: isSet(object.name) ? String(object.name) : "",
2704
+ number: isSet(object.number) ? Number(object.number) : 0,
2705
+ options: isSet(object.options) ? EnumValueOptions.fromJSON(object.options) : undefined,
2706
+ };
2707
+ }
2708
+
2709
+ export function toJSON(message: EnumValueDescriptorProto): unknown {
2710
+ const obj: any = {};
2711
+ message.name !== undefined && (obj.name = message.name);
2712
+ message.number !== undefined && (obj.number = Math.round(message.number));
2713
+ message.options !== undefined &&
2714
+ (obj.options = message.options ? EnumValueOptions.toJSON(message.options) : undefined);
2715
+ return obj;
2716
+ }
2717
+
2718
+ export function create<I extends Exact<DeepPartial<EnumValueDescriptorProto>, I>>(
2719
+ base?: I,
2720
+ ): EnumValueDescriptorProto {
2721
+ return EnumValueDescriptorProto.fromPartial(base ?? {});
2722
+ }
2723
+
2724
+ export function fromPartial<I extends Exact<DeepPartial<EnumValueDescriptorProto>, I>>(
2725
+ object: I,
2726
+ ): EnumValueDescriptorProto {
2727
+ const message = createBaseEnumValueDescriptorProto();
2728
+ message.name = object.name ?? "";
2729
+ message.number = object.number ?? 0;
2730
+ message.options = (object.options !== undefined && object.options !== null)
2731
+ ? EnumValueOptions.fromPartial(object.options)
2732
+ : undefined;
2733
+ return message;
2734
+ }
2735
+ }
2736
+
2737
+ function createBaseServiceDescriptorProto(): ServiceDescriptorProto {
2738
+ return { name: "", method: [], options: undefined };
2739
+ }
2740
+
2741
+ export namespace ServiceDescriptorProto {
2742
+ export function encode(message: ServiceDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
2743
+ if (message.name !== "") {
2744
+ writer.uint32(10).string(message.name);
2745
+ }
2746
+ for (const v of message.method) {
2747
+ MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim();
2748
+ }
2749
+ if (message.options !== undefined) {
2750
+ ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim();
2751
+ }
2752
+ return writer;
2753
+ }
2754
+
2755
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): ServiceDescriptorProto {
2756
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
2757
+ let end = length === undefined ? reader.len : reader.pos + length;
2758
+ const message = createBaseServiceDescriptorProto();
2759
+ while (reader.pos < end) {
2760
+ const tag = reader.uint32();
2761
+ switch (tag >>> 3) {
2762
+ case 1:
2763
+ if (tag !== 10) {
2764
+ break;
2765
+ }
2766
+
2767
+ message.name = reader.string();
2768
+ continue;
2769
+ case 2:
2770
+ if (tag !== 18) {
2771
+ break;
2772
+ }
2773
+
2774
+ message.method.push(MethodDescriptorProto.decode(reader, reader.uint32()));
2775
+ continue;
2776
+ case 3:
2777
+ if (tag !== 26) {
2778
+ break;
2779
+ }
2780
+
2781
+ message.options = ServiceOptions.decode(reader, reader.uint32());
2782
+ continue;
2783
+ }
2784
+ if ((tag & 7) === 4 || tag === 0) {
2785
+ break;
2786
+ }
2787
+ reader.skipType(tag & 7);
2788
+ }
2789
+ return message;
2790
+ }
2791
+
2792
+ export function fromJSON(object: any): ServiceDescriptorProto {
2793
+ return {
2794
+ name: isSet(object.name) ? String(object.name) : "",
2795
+ method: Array.isArray(object?.method) ? object.method.map((e: any) => MethodDescriptorProto.fromJSON(e)) : [],
2796
+ options: isSet(object.options) ? ServiceOptions.fromJSON(object.options) : undefined,
2797
+ };
2798
+ }
2799
+
2800
+ export function toJSON(message: ServiceDescriptorProto): unknown {
2801
+ const obj: any = {};
2802
+ message.name !== undefined && (obj.name = message.name);
2803
+ if (message.method) {
2804
+ obj.method = message.method.map((e) => e ? MethodDescriptorProto.toJSON(e) : undefined);
2805
+ } else {
2806
+ obj.method = [];
2807
+ }
2808
+ message.options !== undefined &&
2809
+ (obj.options = message.options ? ServiceOptions.toJSON(message.options) : undefined);
2810
+ return obj;
2811
+ }
2812
+
2813
+ export function create<I extends Exact<DeepPartial<ServiceDescriptorProto>, I>>(base?: I): ServiceDescriptorProto {
2814
+ return ServiceDescriptorProto.fromPartial(base ?? {});
2815
+ }
2816
+
2817
+ export function fromPartial<I extends Exact<DeepPartial<ServiceDescriptorProto>, I>>(
2818
+ object: I,
2819
+ ): ServiceDescriptorProto {
2820
+ const message = createBaseServiceDescriptorProto();
2821
+ message.name = object.name ?? "";
2822
+ message.method = object.method?.map((e) => MethodDescriptorProto.fromPartial(e)) || [];
2823
+ message.options = (object.options !== undefined && object.options !== null)
2824
+ ? ServiceOptions.fromPartial(object.options)
2825
+ : undefined;
2826
+ return message;
2827
+ }
2828
+ }
2829
+
2830
+ function createBaseMethodDescriptorProto(): MethodDescriptorProto {
2831
+ return {
2832
+ name: "",
2833
+ inputType: "",
2834
+ outputType: "",
2835
+ options: undefined,
2836
+ clientStreaming: false,
2837
+ serverStreaming: false,
2838
+ };
2839
+ }
2840
+
2841
+ export namespace MethodDescriptorProto {
2842
+ export function encode(message: MethodDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
2843
+ if (message.name !== "") {
2844
+ writer.uint32(10).string(message.name);
2845
+ }
2846
+ if (message.inputType !== "") {
2847
+ writer.uint32(18).string(message.inputType);
2848
+ }
2849
+ if (message.outputType !== "") {
2850
+ writer.uint32(26).string(message.outputType);
2851
+ }
2852
+ if (message.options !== undefined) {
2853
+ MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim();
2854
+ }
2855
+ if (message.clientStreaming === true) {
2856
+ writer.uint32(40).bool(message.clientStreaming);
2857
+ }
2858
+ if (message.serverStreaming === true) {
2859
+ writer.uint32(48).bool(message.serverStreaming);
2860
+ }
2861
+ return writer;
2862
+ }
2863
+
2864
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): MethodDescriptorProto {
2865
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
2866
+ let end = length === undefined ? reader.len : reader.pos + length;
2867
+ const message = createBaseMethodDescriptorProto();
2868
+ while (reader.pos < end) {
2869
+ const tag = reader.uint32();
2870
+ switch (tag >>> 3) {
2871
+ case 1:
2872
+ if (tag !== 10) {
2873
+ break;
2874
+ }
2875
+
2876
+ message.name = reader.string();
2877
+ continue;
2878
+ case 2:
2879
+ if (tag !== 18) {
2880
+ break;
2881
+ }
2882
+
2883
+ message.inputType = reader.string();
2884
+ continue;
2885
+ case 3:
2886
+ if (tag !== 26) {
2887
+ break;
2888
+ }
2889
+
2890
+ message.outputType = reader.string();
2891
+ continue;
2892
+ case 4:
2893
+ if (tag !== 34) {
2894
+ break;
2895
+ }
2896
+
2897
+ message.options = MethodOptions.decode(reader, reader.uint32());
2898
+ continue;
2899
+ case 5:
2900
+ if (tag !== 40) {
2901
+ break;
2902
+ }
2903
+
2904
+ message.clientStreaming = reader.bool();
2905
+ continue;
2906
+ case 6:
2907
+ if (tag !== 48) {
2908
+ break;
2909
+ }
2910
+
2911
+ message.serverStreaming = reader.bool();
2912
+ continue;
2913
+ }
2914
+ if ((tag & 7) === 4 || tag === 0) {
2915
+ break;
2916
+ }
2917
+ reader.skipType(tag & 7);
2918
+ }
2919
+ return message;
2920
+ }
2921
+
2922
+ export function fromJSON(object: any): MethodDescriptorProto {
2923
+ return {
2924
+ name: isSet(object.name) ? String(object.name) : "",
2925
+ inputType: isSet(object.inputType) ? String(object.inputType) : "",
2926
+ outputType: isSet(object.outputType) ? String(object.outputType) : "",
2927
+ options: isSet(object.options) ? MethodOptions.fromJSON(object.options) : undefined,
2928
+ clientStreaming: isSet(object.clientStreaming) ? Boolean(object.clientStreaming) : false,
2929
+ serverStreaming: isSet(object.serverStreaming) ? Boolean(object.serverStreaming) : false,
2930
+ };
2931
+ }
2932
+
2933
+ export function toJSON(message: MethodDescriptorProto): unknown {
2934
+ const obj: any = {};
2935
+ message.name !== undefined && (obj.name = message.name);
2936
+ message.inputType !== undefined && (obj.inputType = message.inputType);
2937
+ message.outputType !== undefined && (obj.outputType = message.outputType);
2938
+ message.options !== undefined &&
2939
+ (obj.options = message.options ? MethodOptions.toJSON(message.options) : undefined);
2940
+ message.clientStreaming !== undefined && (obj.clientStreaming = message.clientStreaming);
2941
+ message.serverStreaming !== undefined && (obj.serverStreaming = message.serverStreaming);
2942
+ return obj;
2943
+ }
2944
+
2945
+ export function create<I extends Exact<DeepPartial<MethodDescriptorProto>, I>>(base?: I): MethodDescriptorProto {
2946
+ return MethodDescriptorProto.fromPartial(base ?? {});
2947
+ }
2948
+
2949
+ export function fromPartial<I extends Exact<DeepPartial<MethodDescriptorProto>, I>>(
2950
+ object: I,
2951
+ ): MethodDescriptorProto {
2952
+ const message = createBaseMethodDescriptorProto();
2953
+ message.name = object.name ?? "";
2954
+ message.inputType = object.inputType ?? "";
2955
+ message.outputType = object.outputType ?? "";
2956
+ message.options = (object.options !== undefined && object.options !== null)
2957
+ ? MethodOptions.fromPartial(object.options)
2958
+ : undefined;
2959
+ message.clientStreaming = object.clientStreaming ?? false;
2960
+ message.serverStreaming = object.serverStreaming ?? false;
2961
+ return message;
2962
+ }
2963
+ }
2964
+
2965
+ function createBaseFileOptions(): FileOptions {
2966
+ return {
2967
+ javaPackage: "",
2968
+ javaOuterClassname: "",
2969
+ javaMultipleFiles: false,
2970
+ javaGenerateEqualsAndHash: false,
2971
+ javaStringCheckUtf8: false,
2972
+ optimizeFor: 1,
2973
+ goPackage: "",
2974
+ ccGenericServices: false,
2975
+ javaGenericServices: false,
2976
+ pyGenericServices: false,
2977
+ phpGenericServices: false,
2978
+ deprecated: false,
2979
+ ccEnableArenas: false,
2980
+ objcClassPrefix: "",
2981
+ csharpNamespace: "",
2982
+ swiftPrefix: "",
2983
+ phpClassPrefix: "",
2984
+ phpNamespace: "",
2985
+ phpMetadataNamespace: "",
2986
+ rubyPackage: "",
2987
+ uninterpretedOption: [],
2988
+ };
2989
+ }
2990
+
2991
+ export namespace FileOptions {
2992
+ export function encode(message: FileOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
2993
+ if (message.javaPackage !== "") {
2994
+ writer.uint32(10).string(message.javaPackage);
2995
+ }
2996
+ if (message.javaOuterClassname !== "") {
2997
+ writer.uint32(66).string(message.javaOuterClassname);
2998
+ }
2999
+ if (message.javaMultipleFiles === true) {
3000
+ writer.uint32(80).bool(message.javaMultipleFiles);
3001
+ }
3002
+ if (message.javaGenerateEqualsAndHash === true) {
3003
+ writer.uint32(160).bool(message.javaGenerateEqualsAndHash);
3004
+ }
3005
+ if (message.javaStringCheckUtf8 === true) {
3006
+ writer.uint32(216).bool(message.javaStringCheckUtf8);
3007
+ }
3008
+ if (message.optimizeFor !== 1) {
3009
+ writer.uint32(72).int32(message.optimizeFor);
3010
+ }
3011
+ if (message.goPackage !== "") {
3012
+ writer.uint32(90).string(message.goPackage);
3013
+ }
3014
+ if (message.ccGenericServices === true) {
3015
+ writer.uint32(128).bool(message.ccGenericServices);
3016
+ }
3017
+ if (message.javaGenericServices === true) {
3018
+ writer.uint32(136).bool(message.javaGenericServices);
3019
+ }
3020
+ if (message.pyGenericServices === true) {
3021
+ writer.uint32(144).bool(message.pyGenericServices);
3022
+ }
3023
+ if (message.phpGenericServices === true) {
3024
+ writer.uint32(336).bool(message.phpGenericServices);
3025
+ }
3026
+ if (message.deprecated === true) {
3027
+ writer.uint32(184).bool(message.deprecated);
3028
+ }
3029
+ if (message.ccEnableArenas === true) {
3030
+ writer.uint32(248).bool(message.ccEnableArenas);
3031
+ }
3032
+ if (message.objcClassPrefix !== "") {
3033
+ writer.uint32(290).string(message.objcClassPrefix);
3034
+ }
3035
+ if (message.csharpNamespace !== "") {
3036
+ writer.uint32(298).string(message.csharpNamespace);
3037
+ }
3038
+ if (message.swiftPrefix !== "") {
3039
+ writer.uint32(314).string(message.swiftPrefix);
3040
+ }
3041
+ if (message.phpClassPrefix !== "") {
3042
+ writer.uint32(322).string(message.phpClassPrefix);
3043
+ }
3044
+ if (message.phpNamespace !== "") {
3045
+ writer.uint32(330).string(message.phpNamespace);
3046
+ }
3047
+ if (message.phpMetadataNamespace !== "") {
3048
+ writer.uint32(354).string(message.phpMetadataNamespace);
3049
+ }
3050
+ if (message.rubyPackage !== "") {
3051
+ writer.uint32(362).string(message.rubyPackage);
3052
+ }
3053
+ for (const v of message.uninterpretedOption) {
3054
+ UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();
3055
+ }
3056
+ return writer;
3057
+ }
3058
+
3059
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): FileOptions {
3060
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
3061
+ let end = length === undefined ? reader.len : reader.pos + length;
3062
+ const message = createBaseFileOptions();
3063
+ while (reader.pos < end) {
3064
+ const tag = reader.uint32();
3065
+ switch (tag >>> 3) {
3066
+ case 1:
3067
+ if (tag !== 10) {
3068
+ break;
3069
+ }
3070
+
3071
+ message.javaPackage = reader.string();
3072
+ continue;
3073
+ case 8:
3074
+ if (tag !== 66) {
3075
+ break;
3076
+ }
3077
+
3078
+ message.javaOuterClassname = reader.string();
3079
+ continue;
3080
+ case 10:
3081
+ if (tag !== 80) {
3082
+ break;
3083
+ }
3084
+
3085
+ message.javaMultipleFiles = reader.bool();
3086
+ continue;
3087
+ case 20:
3088
+ if (tag !== 160) {
3089
+ break;
3090
+ }
3091
+
3092
+ message.javaGenerateEqualsAndHash = reader.bool();
3093
+ continue;
3094
+ case 27:
3095
+ if (tag !== 216) {
3096
+ break;
3097
+ }
3098
+
3099
+ message.javaStringCheckUtf8 = reader.bool();
3100
+ continue;
3101
+ case 9:
3102
+ if (tag !== 72) {
3103
+ break;
3104
+ }
3105
+
3106
+ message.optimizeFor = reader.int32() as any;
3107
+ continue;
3108
+ case 11:
3109
+ if (tag !== 90) {
3110
+ break;
3111
+ }
3112
+
3113
+ message.goPackage = reader.string();
3114
+ continue;
3115
+ case 16:
3116
+ if (tag !== 128) {
3117
+ break;
3118
+ }
3119
+
3120
+ message.ccGenericServices = reader.bool();
3121
+ continue;
3122
+ case 17:
3123
+ if (tag !== 136) {
3124
+ break;
3125
+ }
3126
+
3127
+ message.javaGenericServices = reader.bool();
3128
+ continue;
3129
+ case 18:
3130
+ if (tag !== 144) {
3131
+ break;
3132
+ }
3133
+
3134
+ message.pyGenericServices = reader.bool();
3135
+ continue;
3136
+ case 42:
3137
+ if (tag !== 336) {
3138
+ break;
3139
+ }
3140
+
3141
+ message.phpGenericServices = reader.bool();
3142
+ continue;
3143
+ case 23:
3144
+ if (tag !== 184) {
3145
+ break;
3146
+ }
3147
+
3148
+ message.deprecated = reader.bool();
3149
+ continue;
3150
+ case 31:
3151
+ if (tag !== 248) {
3152
+ break;
3153
+ }
3154
+
3155
+ message.ccEnableArenas = reader.bool();
3156
+ continue;
3157
+ case 36:
3158
+ if (tag !== 290) {
3159
+ break;
3160
+ }
3161
+
3162
+ message.objcClassPrefix = reader.string();
3163
+ continue;
3164
+ case 37:
3165
+ if (tag !== 298) {
3166
+ break;
3167
+ }
3168
+
3169
+ message.csharpNamespace = reader.string();
3170
+ continue;
3171
+ case 39:
3172
+ if (tag !== 314) {
3173
+ break;
3174
+ }
3175
+
3176
+ message.swiftPrefix = reader.string();
3177
+ continue;
3178
+ case 40:
3179
+ if (tag !== 322) {
3180
+ break;
3181
+ }
3182
+
3183
+ message.phpClassPrefix = reader.string();
3184
+ continue;
3185
+ case 41:
3186
+ if (tag !== 330) {
3187
+ break;
3188
+ }
3189
+
3190
+ message.phpNamespace = reader.string();
3191
+ continue;
3192
+ case 44:
3193
+ if (tag !== 354) {
3194
+ break;
3195
+ }
3196
+
3197
+ message.phpMetadataNamespace = reader.string();
3198
+ continue;
3199
+ case 45:
3200
+ if (tag !== 362) {
3201
+ break;
3202
+ }
3203
+
3204
+ message.rubyPackage = reader.string();
3205
+ continue;
3206
+ case 999:
3207
+ if (tag !== 7994) {
3208
+ break;
3209
+ }
3210
+
3211
+ message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32()));
3212
+ continue;
3213
+ }
3214
+ if ((tag & 7) === 4 || tag === 0) {
3215
+ break;
3216
+ }
3217
+ reader.skipType(tag & 7);
3218
+ }
3219
+ return message;
3220
+ }
3221
+
3222
+ export function fromJSON(object: any): FileOptions {
3223
+ return {
3224
+ javaPackage: isSet(object.javaPackage) ? String(object.javaPackage) : "",
3225
+ javaOuterClassname: isSet(object.javaOuterClassname) ? String(object.javaOuterClassname) : "",
3226
+ javaMultipleFiles: isSet(object.javaMultipleFiles) ? Boolean(object.javaMultipleFiles) : false,
3227
+ javaGenerateEqualsAndHash: isSet(object.javaGenerateEqualsAndHash)
3228
+ ? Boolean(object.javaGenerateEqualsAndHash)
3229
+ : false,
3230
+ javaStringCheckUtf8: isSet(object.javaStringCheckUtf8) ? Boolean(object.javaStringCheckUtf8) : false,
3231
+ optimizeFor: isSet(object.optimizeFor) ? fileOptions_OptimizeModeFromJSON(object.optimizeFor) : 1,
3232
+ goPackage: isSet(object.goPackage) ? String(object.goPackage) : "",
3233
+ ccGenericServices: isSet(object.ccGenericServices) ? Boolean(object.ccGenericServices) : false,
3234
+ javaGenericServices: isSet(object.javaGenericServices) ? Boolean(object.javaGenericServices) : false,
3235
+ pyGenericServices: isSet(object.pyGenericServices) ? Boolean(object.pyGenericServices) : false,
3236
+ phpGenericServices: isSet(object.phpGenericServices) ? Boolean(object.phpGenericServices) : false,
3237
+ deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false,
3238
+ ccEnableArenas: isSet(object.ccEnableArenas) ? Boolean(object.ccEnableArenas) : false,
3239
+ objcClassPrefix: isSet(object.objcClassPrefix) ? String(object.objcClassPrefix) : "",
3240
+ csharpNamespace: isSet(object.csharpNamespace) ? String(object.csharpNamespace) : "",
3241
+ swiftPrefix: isSet(object.swiftPrefix) ? String(object.swiftPrefix) : "",
3242
+ phpClassPrefix: isSet(object.phpClassPrefix) ? String(object.phpClassPrefix) : "",
3243
+ phpNamespace: isSet(object.phpNamespace) ? String(object.phpNamespace) : "",
3244
+ phpMetadataNamespace: isSet(object.phpMetadataNamespace) ? String(object.phpMetadataNamespace) : "",
3245
+ rubyPackage: isSet(object.rubyPackage) ? String(object.rubyPackage) : "",
3246
+ uninterpretedOption: Array.isArray(object?.uninterpretedOption)
3247
+ ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
3248
+ : [],
3249
+ };
3250
+ }
3251
+
3252
+ export function toJSON(message: FileOptions): unknown {
3253
+ const obj: any = {};
3254
+ message.javaPackage !== undefined && (obj.javaPackage = message.javaPackage);
3255
+ message.javaOuterClassname !== undefined && (obj.javaOuterClassname = message.javaOuterClassname);
3256
+ message.javaMultipleFiles !== undefined && (obj.javaMultipleFiles = message.javaMultipleFiles);
3257
+ message.javaGenerateEqualsAndHash !== undefined &&
3258
+ (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash);
3259
+ message.javaStringCheckUtf8 !== undefined && (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8);
3260
+ message.optimizeFor !== undefined && (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor));
3261
+ message.goPackage !== undefined && (obj.goPackage = message.goPackage);
3262
+ message.ccGenericServices !== undefined && (obj.ccGenericServices = message.ccGenericServices);
3263
+ message.javaGenericServices !== undefined && (obj.javaGenericServices = message.javaGenericServices);
3264
+ message.pyGenericServices !== undefined && (obj.pyGenericServices = message.pyGenericServices);
3265
+ message.phpGenericServices !== undefined && (obj.phpGenericServices = message.phpGenericServices);
3266
+ message.deprecated !== undefined && (obj.deprecated = message.deprecated);
3267
+ message.ccEnableArenas !== undefined && (obj.ccEnableArenas = message.ccEnableArenas);
3268
+ message.objcClassPrefix !== undefined && (obj.objcClassPrefix = message.objcClassPrefix);
3269
+ message.csharpNamespace !== undefined && (obj.csharpNamespace = message.csharpNamespace);
3270
+ message.swiftPrefix !== undefined && (obj.swiftPrefix = message.swiftPrefix);
3271
+ message.phpClassPrefix !== undefined && (obj.phpClassPrefix = message.phpClassPrefix);
3272
+ message.phpNamespace !== undefined && (obj.phpNamespace = message.phpNamespace);
3273
+ message.phpMetadataNamespace !== undefined && (obj.phpMetadataNamespace = message.phpMetadataNamespace);
3274
+ message.rubyPackage !== undefined && (obj.rubyPackage = message.rubyPackage);
3275
+ if (message.uninterpretedOption) {
3276
+ obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined);
3277
+ } else {
3278
+ obj.uninterpretedOption = [];
3279
+ }
3280
+ return obj;
3281
+ }
3282
+
3283
+ export function create<I extends Exact<DeepPartial<FileOptions>, I>>(base?: I): FileOptions {
3284
+ return FileOptions.fromPartial(base ?? {});
3285
+ }
3286
+
3287
+ export function fromPartial<I extends Exact<DeepPartial<FileOptions>, I>>(object: I): FileOptions {
3288
+ const message = createBaseFileOptions();
3289
+ message.javaPackage = object.javaPackage ?? "";
3290
+ message.javaOuterClassname = object.javaOuterClassname ?? "";
3291
+ message.javaMultipleFiles = object.javaMultipleFiles ?? false;
3292
+ message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash ?? false;
3293
+ message.javaStringCheckUtf8 = object.javaStringCheckUtf8 ?? false;
3294
+ message.optimizeFor = object.optimizeFor ?? 1;
3295
+ message.goPackage = object.goPackage ?? "";
3296
+ message.ccGenericServices = object.ccGenericServices ?? false;
3297
+ message.javaGenericServices = object.javaGenericServices ?? false;
3298
+ message.pyGenericServices = object.pyGenericServices ?? false;
3299
+ message.phpGenericServices = object.phpGenericServices ?? false;
3300
+ message.deprecated = object.deprecated ?? false;
3301
+ message.ccEnableArenas = object.ccEnableArenas ?? false;
3302
+ message.objcClassPrefix = object.objcClassPrefix ?? "";
3303
+ message.csharpNamespace = object.csharpNamespace ?? "";
3304
+ message.swiftPrefix = object.swiftPrefix ?? "";
3305
+ message.phpClassPrefix = object.phpClassPrefix ?? "";
3306
+ message.phpNamespace = object.phpNamespace ?? "";
3307
+ message.phpMetadataNamespace = object.phpMetadataNamespace ?? "";
3308
+ message.rubyPackage = object.rubyPackage ?? "";
3309
+ message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
3310
+ return message;
3311
+ }
3312
+ }
3313
+
3314
+ function createBaseMessageOptions(): MessageOptions {
3315
+ return {
3316
+ messageSetWireFormat: false,
3317
+ noStandardDescriptorAccessor: false,
3318
+ deprecated: false,
3319
+ mapEntry: false,
3320
+ deprecatedLegacyJsonFieldConflicts: false,
3321
+ uninterpretedOption: [],
3322
+ };
3323
+ }
3324
+
3325
+ export namespace MessageOptions {
3326
+ export function encode(message: MessageOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
3327
+ if (message.messageSetWireFormat === true) {
3328
+ writer.uint32(8).bool(message.messageSetWireFormat);
3329
+ }
3330
+ if (message.noStandardDescriptorAccessor === true) {
3331
+ writer.uint32(16).bool(message.noStandardDescriptorAccessor);
3332
+ }
3333
+ if (message.deprecated === true) {
3334
+ writer.uint32(24).bool(message.deprecated);
3335
+ }
3336
+ if (message.mapEntry === true) {
3337
+ writer.uint32(56).bool(message.mapEntry);
3338
+ }
3339
+ if (message.deprecatedLegacyJsonFieldConflicts === true) {
3340
+ writer.uint32(88).bool(message.deprecatedLegacyJsonFieldConflicts);
3341
+ }
3342
+ for (const v of message.uninterpretedOption) {
3343
+ UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();
3344
+ }
3345
+ return writer;
3346
+ }
3347
+
3348
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): MessageOptions {
3349
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
3350
+ let end = length === undefined ? reader.len : reader.pos + length;
3351
+ const message = createBaseMessageOptions();
3352
+ while (reader.pos < end) {
3353
+ const tag = reader.uint32();
3354
+ switch (tag >>> 3) {
3355
+ case 1:
3356
+ if (tag !== 8) {
3357
+ break;
3358
+ }
3359
+
3360
+ message.messageSetWireFormat = reader.bool();
3361
+ continue;
3362
+ case 2:
3363
+ if (tag !== 16) {
3364
+ break;
3365
+ }
3366
+
3367
+ message.noStandardDescriptorAccessor = reader.bool();
3368
+ continue;
3369
+ case 3:
3370
+ if (tag !== 24) {
3371
+ break;
3372
+ }
3373
+
3374
+ message.deprecated = reader.bool();
3375
+ continue;
3376
+ case 7:
3377
+ if (tag !== 56) {
3378
+ break;
3379
+ }
3380
+
3381
+ message.mapEntry = reader.bool();
3382
+ continue;
3383
+ case 11:
3384
+ if (tag !== 88) {
3385
+ break;
3386
+ }
3387
+
3388
+ message.deprecatedLegacyJsonFieldConflicts = reader.bool();
3389
+ continue;
3390
+ case 999:
3391
+ if (tag !== 7994) {
3392
+ break;
3393
+ }
3394
+
3395
+ message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32()));
3396
+ continue;
3397
+ }
3398
+ if ((tag & 7) === 4 || tag === 0) {
3399
+ break;
3400
+ }
3401
+ reader.skipType(tag & 7);
3402
+ }
3403
+ return message;
3404
+ }
3405
+
3406
+ export function fromJSON(object: any): MessageOptions {
3407
+ return {
3408
+ messageSetWireFormat: isSet(object.messageSetWireFormat) ? Boolean(object.messageSetWireFormat) : false,
3409
+ noStandardDescriptorAccessor: isSet(object.noStandardDescriptorAccessor)
3410
+ ? Boolean(object.noStandardDescriptorAccessor)
3411
+ : false,
3412
+ deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false,
3413
+ mapEntry: isSet(object.mapEntry) ? Boolean(object.mapEntry) : false,
3414
+ deprecatedLegacyJsonFieldConflicts: isSet(object.deprecatedLegacyJsonFieldConflicts)
3415
+ ? Boolean(object.deprecatedLegacyJsonFieldConflicts)
3416
+ : false,
3417
+ uninterpretedOption: Array.isArray(object?.uninterpretedOption)
3418
+ ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
3419
+ : [],
3420
+ };
3421
+ }
3422
+
3423
+ export function toJSON(message: MessageOptions): unknown {
3424
+ const obj: any = {};
3425
+ message.messageSetWireFormat !== undefined && (obj.messageSetWireFormat = message.messageSetWireFormat);
3426
+ message.noStandardDescriptorAccessor !== undefined &&
3427
+ (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor);
3428
+ message.deprecated !== undefined && (obj.deprecated = message.deprecated);
3429
+ message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry);
3430
+ message.deprecatedLegacyJsonFieldConflicts !== undefined &&
3431
+ (obj.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts);
3432
+ if (message.uninterpretedOption) {
3433
+ obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined);
3434
+ } else {
3435
+ obj.uninterpretedOption = [];
3436
+ }
3437
+ return obj;
3438
+ }
3439
+
3440
+ export function create<I extends Exact<DeepPartial<MessageOptions>, I>>(base?: I): MessageOptions {
3441
+ return MessageOptions.fromPartial(base ?? {});
3442
+ }
3443
+
3444
+ export function fromPartial<I extends Exact<DeepPartial<MessageOptions>, I>>(object: I): MessageOptions {
3445
+ const message = createBaseMessageOptions();
3446
+ message.messageSetWireFormat = object.messageSetWireFormat ?? false;
3447
+ message.noStandardDescriptorAccessor = object.noStandardDescriptorAccessor ?? false;
3448
+ message.deprecated = object.deprecated ?? false;
3449
+ message.mapEntry = object.mapEntry ?? false;
3450
+ message.deprecatedLegacyJsonFieldConflicts = object.deprecatedLegacyJsonFieldConflicts ?? false;
3451
+ message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
3452
+ return message;
3453
+ }
3454
+ }
3455
+
3456
+ function createBaseFieldOptions(): FieldOptions {
3457
+ return {
3458
+ ctype: 0,
3459
+ packed: false,
3460
+ jstype: 0,
3461
+ lazy: false,
3462
+ unverifiedLazy: false,
3463
+ deprecated: false,
3464
+ weak: false,
3465
+ debugRedact: false,
3466
+ retention: 0,
3467
+ target: 0,
3468
+ uninterpretedOption: [],
3469
+ };
3470
+ }
3471
+
3472
+ export namespace FieldOptions {
3473
+ export function encode(message: FieldOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
3474
+ if (message.ctype !== 0) {
3475
+ writer.uint32(8).int32(message.ctype);
3476
+ }
3477
+ if (message.packed === true) {
3478
+ writer.uint32(16).bool(message.packed);
3479
+ }
3480
+ if (message.jstype !== 0) {
3481
+ writer.uint32(48).int32(message.jstype);
3482
+ }
3483
+ if (message.lazy === true) {
3484
+ writer.uint32(40).bool(message.lazy);
3485
+ }
3486
+ if (message.unverifiedLazy === true) {
3487
+ writer.uint32(120).bool(message.unverifiedLazy);
3488
+ }
3489
+ if (message.deprecated === true) {
3490
+ writer.uint32(24).bool(message.deprecated);
3491
+ }
3492
+ if (message.weak === true) {
3493
+ writer.uint32(80).bool(message.weak);
3494
+ }
3495
+ if (message.debugRedact === true) {
3496
+ writer.uint32(128).bool(message.debugRedact);
3497
+ }
3498
+ if (message.retention !== 0) {
3499
+ writer.uint32(136).int32(message.retention);
3500
+ }
3501
+ if (message.target !== 0) {
3502
+ writer.uint32(144).int32(message.target);
3503
+ }
3504
+ for (const v of message.uninterpretedOption) {
3505
+ UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();
3506
+ }
3507
+ return writer;
3508
+ }
3509
+
3510
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): FieldOptions {
3511
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
3512
+ let end = length === undefined ? reader.len : reader.pos + length;
3513
+ const message = createBaseFieldOptions();
3514
+ while (reader.pos < end) {
3515
+ const tag = reader.uint32();
3516
+ switch (tag >>> 3) {
3517
+ case 1:
3518
+ if (tag !== 8) {
3519
+ break;
3520
+ }
3521
+
3522
+ message.ctype = reader.int32() as any;
3523
+ continue;
3524
+ case 2:
3525
+ if (tag !== 16) {
3526
+ break;
3527
+ }
3528
+
3529
+ message.packed = reader.bool();
3530
+ continue;
3531
+ case 6:
3532
+ if (tag !== 48) {
3533
+ break;
3534
+ }
3535
+
3536
+ message.jstype = reader.int32() as any;
3537
+ continue;
3538
+ case 5:
3539
+ if (tag !== 40) {
3540
+ break;
3541
+ }
3542
+
3543
+ message.lazy = reader.bool();
3544
+ continue;
3545
+ case 15:
3546
+ if (tag !== 120) {
3547
+ break;
3548
+ }
3549
+
3550
+ message.unverifiedLazy = reader.bool();
3551
+ continue;
3552
+ case 3:
3553
+ if (tag !== 24) {
3554
+ break;
3555
+ }
3556
+
3557
+ message.deprecated = reader.bool();
3558
+ continue;
3559
+ case 10:
3560
+ if (tag !== 80) {
3561
+ break;
3562
+ }
3563
+
3564
+ message.weak = reader.bool();
3565
+ continue;
3566
+ case 16:
3567
+ if (tag !== 128) {
3568
+ break;
3569
+ }
3570
+
3571
+ message.debugRedact = reader.bool();
3572
+ continue;
3573
+ case 17:
3574
+ if (tag !== 136) {
3575
+ break;
3576
+ }
3577
+
3578
+ message.retention = reader.int32() as any;
3579
+ continue;
3580
+ case 18:
3581
+ if (tag !== 144) {
3582
+ break;
3583
+ }
3584
+
3585
+ message.target = reader.int32() as any;
3586
+ continue;
3587
+ case 999:
3588
+ if (tag !== 7994) {
3589
+ break;
3590
+ }
3591
+
3592
+ message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32()));
3593
+ continue;
3594
+ }
3595
+ if ((tag & 7) === 4 || tag === 0) {
3596
+ break;
3597
+ }
3598
+ reader.skipType(tag & 7);
3599
+ }
3600
+ return message;
3601
+ }
3602
+
3603
+ export function fromJSON(object: any): FieldOptions {
3604
+ return {
3605
+ ctype: isSet(object.ctype) ? fieldOptions_CTypeFromJSON(object.ctype) : 0,
3606
+ packed: isSet(object.packed) ? Boolean(object.packed) : false,
3607
+ jstype: isSet(object.jstype) ? fieldOptions_JSTypeFromJSON(object.jstype) : 0,
3608
+ lazy: isSet(object.lazy) ? Boolean(object.lazy) : false,
3609
+ unverifiedLazy: isSet(object.unverifiedLazy) ? Boolean(object.unverifiedLazy) : false,
3610
+ deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false,
3611
+ weak: isSet(object.weak) ? Boolean(object.weak) : false,
3612
+ debugRedact: isSet(object.debugRedact) ? Boolean(object.debugRedact) : false,
3613
+ retention: isSet(object.retention) ? fieldOptions_OptionRetentionFromJSON(object.retention) : 0,
3614
+ target: isSet(object.target) ? fieldOptions_OptionTargetTypeFromJSON(object.target) : 0,
3615
+ uninterpretedOption: Array.isArray(object?.uninterpretedOption)
3616
+ ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
3617
+ : [],
3618
+ };
3619
+ }
3620
+
3621
+ export function toJSON(message: FieldOptions): unknown {
3622
+ const obj: any = {};
3623
+ message.ctype !== undefined && (obj.ctype = fieldOptions_CTypeToJSON(message.ctype));
3624
+ message.packed !== undefined && (obj.packed = message.packed);
3625
+ message.jstype !== undefined && (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype));
3626
+ message.lazy !== undefined && (obj.lazy = message.lazy);
3627
+ message.unverifiedLazy !== undefined && (obj.unverifiedLazy = message.unverifiedLazy);
3628
+ message.deprecated !== undefined && (obj.deprecated = message.deprecated);
3629
+ message.weak !== undefined && (obj.weak = message.weak);
3630
+ message.debugRedact !== undefined && (obj.debugRedact = message.debugRedact);
3631
+ message.retention !== undefined && (obj.retention = fieldOptions_OptionRetentionToJSON(message.retention));
3632
+ message.target !== undefined && (obj.target = fieldOptions_OptionTargetTypeToJSON(message.target));
3633
+ if (message.uninterpretedOption) {
3634
+ obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined);
3635
+ } else {
3636
+ obj.uninterpretedOption = [];
3637
+ }
3638
+ return obj;
3639
+ }
3640
+
3641
+ export function create<I extends Exact<DeepPartial<FieldOptions>, I>>(base?: I): FieldOptions {
3642
+ return FieldOptions.fromPartial(base ?? {});
3643
+ }
3644
+
3645
+ export function fromPartial<I extends Exact<DeepPartial<FieldOptions>, I>>(object: I): FieldOptions {
3646
+ const message = createBaseFieldOptions();
3647
+ message.ctype = object.ctype ?? 0;
3648
+ message.packed = object.packed ?? false;
3649
+ message.jstype = object.jstype ?? 0;
3650
+ message.lazy = object.lazy ?? false;
3651
+ message.unverifiedLazy = object.unverifiedLazy ?? false;
3652
+ message.deprecated = object.deprecated ?? false;
3653
+ message.weak = object.weak ?? false;
3654
+ message.debugRedact = object.debugRedact ?? false;
3655
+ message.retention = object.retention ?? 0;
3656
+ message.target = object.target ?? 0;
3657
+ message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
3658
+ return message;
3659
+ }
3660
+ }
3661
+
3662
+ function createBaseOneofOptions(): OneofOptions {
3663
+ return { uninterpretedOption: [] };
3664
+ }
3665
+
3666
+ export namespace OneofOptions {
3667
+ export function encode(message: OneofOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
3668
+ for (const v of message.uninterpretedOption) {
3669
+ UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();
3670
+ }
3671
+ return writer;
3672
+ }
3673
+
3674
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): OneofOptions {
3675
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
3676
+ let end = length === undefined ? reader.len : reader.pos + length;
3677
+ const message = createBaseOneofOptions();
3678
+ while (reader.pos < end) {
3679
+ const tag = reader.uint32();
3680
+ switch (tag >>> 3) {
3681
+ case 999:
3682
+ if (tag !== 7994) {
3683
+ break;
3684
+ }
3685
+
3686
+ message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32()));
3687
+ continue;
3688
+ }
3689
+ if ((tag & 7) === 4 || tag === 0) {
3690
+ break;
3691
+ }
3692
+ reader.skipType(tag & 7);
3693
+ }
3694
+ return message;
3695
+ }
3696
+
3697
+ export function fromJSON(object: any): OneofOptions {
3698
+ return {
3699
+ uninterpretedOption: Array.isArray(object?.uninterpretedOption)
3700
+ ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
3701
+ : [],
3702
+ };
3703
+ }
3704
+
3705
+ export function toJSON(message: OneofOptions): unknown {
3706
+ const obj: any = {};
3707
+ if (message.uninterpretedOption) {
3708
+ obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined);
3709
+ } else {
3710
+ obj.uninterpretedOption = [];
3711
+ }
3712
+ return obj;
3713
+ }
3714
+
3715
+ export function create<I extends Exact<DeepPartial<OneofOptions>, I>>(base?: I): OneofOptions {
3716
+ return OneofOptions.fromPartial(base ?? {});
3717
+ }
3718
+
3719
+ export function fromPartial<I extends Exact<DeepPartial<OneofOptions>, I>>(object: I): OneofOptions {
3720
+ const message = createBaseOneofOptions();
3721
+ message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
3722
+ return message;
3723
+ }
3724
+ }
3725
+
3726
+ function createBaseEnumOptions(): EnumOptions {
3727
+ return { allowAlias: false, deprecated: false, deprecatedLegacyJsonFieldConflicts: false, uninterpretedOption: [] };
3728
+ }
3729
+
3730
+ export namespace EnumOptions {
3731
+ export function encode(message: EnumOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
3732
+ if (message.allowAlias === true) {
3733
+ writer.uint32(16).bool(message.allowAlias);
3734
+ }
3735
+ if (message.deprecated === true) {
3736
+ writer.uint32(24).bool(message.deprecated);
3737
+ }
3738
+ if (message.deprecatedLegacyJsonFieldConflicts === true) {
3739
+ writer.uint32(48).bool(message.deprecatedLegacyJsonFieldConflicts);
3740
+ }
3741
+ for (const v of message.uninterpretedOption) {
3742
+ UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();
3743
+ }
3744
+ return writer;
3745
+ }
3746
+
3747
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): EnumOptions {
3748
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
3749
+ let end = length === undefined ? reader.len : reader.pos + length;
3750
+ const message = createBaseEnumOptions();
3751
+ while (reader.pos < end) {
3752
+ const tag = reader.uint32();
3753
+ switch (tag >>> 3) {
3754
+ case 2:
3755
+ if (tag !== 16) {
3756
+ break;
3757
+ }
3758
+
3759
+ message.allowAlias = reader.bool();
3760
+ continue;
3761
+ case 3:
3762
+ if (tag !== 24) {
3763
+ break;
3764
+ }
3765
+
3766
+ message.deprecated = reader.bool();
3767
+ continue;
3768
+ case 6:
3769
+ if (tag !== 48) {
3770
+ break;
3771
+ }
3772
+
3773
+ message.deprecatedLegacyJsonFieldConflicts = reader.bool();
3774
+ continue;
3775
+ case 999:
3776
+ if (tag !== 7994) {
3777
+ break;
3778
+ }
3779
+
3780
+ message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32()));
3781
+ continue;
3782
+ }
3783
+ if ((tag & 7) === 4 || tag === 0) {
3784
+ break;
3785
+ }
3786
+ reader.skipType(tag & 7);
3787
+ }
3788
+ return message;
3789
+ }
3790
+
3791
+ export function fromJSON(object: any): EnumOptions {
3792
+ return {
3793
+ allowAlias: isSet(object.allowAlias) ? Boolean(object.allowAlias) : false,
3794
+ deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false,
3795
+ deprecatedLegacyJsonFieldConflicts: isSet(object.deprecatedLegacyJsonFieldConflicts)
3796
+ ? Boolean(object.deprecatedLegacyJsonFieldConflicts)
3797
+ : false,
3798
+ uninterpretedOption: Array.isArray(object?.uninterpretedOption)
3799
+ ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
3800
+ : [],
3801
+ };
3802
+ }
3803
+
3804
+ export function toJSON(message: EnumOptions): unknown {
3805
+ const obj: any = {};
3806
+ message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias);
3807
+ message.deprecated !== undefined && (obj.deprecated = message.deprecated);
3808
+ message.deprecatedLegacyJsonFieldConflicts !== undefined &&
3809
+ (obj.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts);
3810
+ if (message.uninterpretedOption) {
3811
+ obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined);
3812
+ } else {
3813
+ obj.uninterpretedOption = [];
3814
+ }
3815
+ return obj;
3816
+ }
3817
+
3818
+ export function create<I extends Exact<DeepPartial<EnumOptions>, I>>(base?: I): EnumOptions {
3819
+ return EnumOptions.fromPartial(base ?? {});
3820
+ }
3821
+
3822
+ export function fromPartial<I extends Exact<DeepPartial<EnumOptions>, I>>(object: I): EnumOptions {
3823
+ const message = createBaseEnumOptions();
3824
+ message.allowAlias = object.allowAlias ?? false;
3825
+ message.deprecated = object.deprecated ?? false;
3826
+ message.deprecatedLegacyJsonFieldConflicts = object.deprecatedLegacyJsonFieldConflicts ?? false;
3827
+ message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
3828
+ return message;
3829
+ }
3830
+ }
3831
+
3832
+ function createBaseEnumValueOptions(): EnumValueOptions {
3833
+ return { deprecated: false, uninterpretedOption: [] };
3834
+ }
3835
+
3836
+ export namespace EnumValueOptions {
3837
+ export function encode(message: EnumValueOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
3838
+ if (message.deprecated === true) {
3839
+ writer.uint32(8).bool(message.deprecated);
3840
+ }
3841
+ for (const v of message.uninterpretedOption) {
3842
+ UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();
3843
+ }
3844
+ return writer;
3845
+ }
3846
+
3847
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): EnumValueOptions {
3848
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
3849
+ let end = length === undefined ? reader.len : reader.pos + length;
3850
+ const message = createBaseEnumValueOptions();
3851
+ while (reader.pos < end) {
3852
+ const tag = reader.uint32();
3853
+ switch (tag >>> 3) {
3854
+ case 1:
3855
+ if (tag !== 8) {
3856
+ break;
3857
+ }
3858
+
3859
+ message.deprecated = reader.bool();
3860
+ continue;
3861
+ case 999:
3862
+ if (tag !== 7994) {
3863
+ break;
3864
+ }
3865
+
3866
+ message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32()));
3867
+ continue;
3868
+ }
3869
+ if ((tag & 7) === 4 || tag === 0) {
3870
+ break;
3871
+ }
3872
+ reader.skipType(tag & 7);
3873
+ }
3874
+ return message;
3875
+ }
3876
+
3877
+ export function fromJSON(object: any): EnumValueOptions {
3878
+ return {
3879
+ deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false,
3880
+ uninterpretedOption: Array.isArray(object?.uninterpretedOption)
3881
+ ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
3882
+ : [],
3883
+ };
3884
+ }
3885
+
3886
+ export function toJSON(message: EnumValueOptions): unknown {
3887
+ const obj: any = {};
3888
+ message.deprecated !== undefined && (obj.deprecated = message.deprecated);
3889
+ if (message.uninterpretedOption) {
3890
+ obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined);
3891
+ } else {
3892
+ obj.uninterpretedOption = [];
3893
+ }
3894
+ return obj;
3895
+ }
3896
+
3897
+ export function create<I extends Exact<DeepPartial<EnumValueOptions>, I>>(base?: I): EnumValueOptions {
3898
+ return EnumValueOptions.fromPartial(base ?? {});
3899
+ }
3900
+
3901
+ export function fromPartial<I extends Exact<DeepPartial<EnumValueOptions>, I>>(object: I): EnumValueOptions {
3902
+ const message = createBaseEnumValueOptions();
3903
+ message.deprecated = object.deprecated ?? false;
3904
+ message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
3905
+ return message;
3906
+ }
3907
+ }
3908
+
3909
+ function createBaseServiceOptions(): ServiceOptions {
3910
+ return { deprecated: false, uninterpretedOption: [] };
3911
+ }
3912
+
3913
+ export namespace ServiceOptions {
3914
+ export function encode(message: ServiceOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
3915
+ if (message.deprecated === true) {
3916
+ writer.uint32(264).bool(message.deprecated);
3917
+ }
3918
+ for (const v of message.uninterpretedOption) {
3919
+ UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();
3920
+ }
3921
+ return writer;
3922
+ }
3923
+
3924
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): ServiceOptions {
3925
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
3926
+ let end = length === undefined ? reader.len : reader.pos + length;
3927
+ const message = createBaseServiceOptions();
3928
+ while (reader.pos < end) {
3929
+ const tag = reader.uint32();
3930
+ switch (tag >>> 3) {
3931
+ case 33:
3932
+ if (tag !== 264) {
3933
+ break;
3934
+ }
3935
+
3936
+ message.deprecated = reader.bool();
3937
+ continue;
3938
+ case 999:
3939
+ if (tag !== 7994) {
3940
+ break;
3941
+ }
3942
+
3943
+ message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32()));
3944
+ continue;
3945
+ }
3946
+ if ((tag & 7) === 4 || tag === 0) {
3947
+ break;
3948
+ }
3949
+ reader.skipType(tag & 7);
3950
+ }
3951
+ return message;
3952
+ }
3953
+
3954
+ export function fromJSON(object: any): ServiceOptions {
3955
+ return {
3956
+ deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false,
3957
+ uninterpretedOption: Array.isArray(object?.uninterpretedOption)
3958
+ ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
3959
+ : [],
3960
+ };
3961
+ }
3962
+
3963
+ export function toJSON(message: ServiceOptions): unknown {
3964
+ const obj: any = {};
3965
+ message.deprecated !== undefined && (obj.deprecated = message.deprecated);
3966
+ if (message.uninterpretedOption) {
3967
+ obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined);
3968
+ } else {
3969
+ obj.uninterpretedOption = [];
3970
+ }
3971
+ return obj;
3972
+ }
3973
+
3974
+ export function create<I extends Exact<DeepPartial<ServiceOptions>, I>>(base?: I): ServiceOptions {
3975
+ return ServiceOptions.fromPartial(base ?? {});
3976
+ }
3977
+
3978
+ export function fromPartial<I extends Exact<DeepPartial<ServiceOptions>, I>>(object: I): ServiceOptions {
3979
+ const message = createBaseServiceOptions();
3980
+ message.deprecated = object.deprecated ?? false;
3981
+ message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
3982
+ return message;
3983
+ }
3984
+ }
3985
+
3986
+ function createBaseMethodOptions(): MethodOptions {
3987
+ return { deprecated: false, idempotencyLevel: 0, uninterpretedOption: [] };
3988
+ }
3989
+
3990
+ export namespace MethodOptions {
3991
+ export function encode(message: MethodOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
3992
+ if (message.deprecated === true) {
3993
+ writer.uint32(264).bool(message.deprecated);
3994
+ }
3995
+ if (message.idempotencyLevel !== 0) {
3996
+ writer.uint32(272).int32(message.idempotencyLevel);
3997
+ }
3998
+ for (const v of message.uninterpretedOption) {
3999
+ UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();
4000
+ }
4001
+ return writer;
4002
+ }
4003
+
4004
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): MethodOptions {
4005
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
4006
+ let end = length === undefined ? reader.len : reader.pos + length;
4007
+ const message = createBaseMethodOptions();
4008
+ while (reader.pos < end) {
4009
+ const tag = reader.uint32();
4010
+ switch (tag >>> 3) {
4011
+ case 33:
4012
+ if (tag !== 264) {
4013
+ break;
4014
+ }
4015
+
4016
+ message.deprecated = reader.bool();
4017
+ continue;
4018
+ case 34:
4019
+ if (tag !== 272) {
4020
+ break;
4021
+ }
4022
+
4023
+ message.idempotencyLevel = reader.int32() as any;
4024
+ continue;
4025
+ case 999:
4026
+ if (tag !== 7994) {
4027
+ break;
4028
+ }
4029
+
4030
+ message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32()));
4031
+ continue;
4032
+ }
4033
+ if ((tag & 7) === 4 || tag === 0) {
4034
+ break;
4035
+ }
4036
+ reader.skipType(tag & 7);
4037
+ }
4038
+ return message;
4039
+ }
4040
+
4041
+ export function fromJSON(object: any): MethodOptions {
4042
+ return {
4043
+ deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false,
4044
+ idempotencyLevel: isSet(object.idempotencyLevel)
4045
+ ? methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel)
4046
+ : 0,
4047
+ uninterpretedOption: Array.isArray(object?.uninterpretedOption)
4048
+ ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
4049
+ : [],
4050
+ };
4051
+ }
4052
+
4053
+ export function toJSON(message: MethodOptions): unknown {
4054
+ const obj: any = {};
4055
+ message.deprecated !== undefined && (obj.deprecated = message.deprecated);
4056
+ message.idempotencyLevel !== undefined &&
4057
+ (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel));
4058
+ if (message.uninterpretedOption) {
4059
+ obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined);
4060
+ } else {
4061
+ obj.uninterpretedOption = [];
4062
+ }
4063
+ return obj;
4064
+ }
4065
+
4066
+ export function create<I extends Exact<DeepPartial<MethodOptions>, I>>(base?: I): MethodOptions {
4067
+ return MethodOptions.fromPartial(base ?? {});
4068
+ }
4069
+
4070
+ export function fromPartial<I extends Exact<DeepPartial<MethodOptions>, I>>(object: I): MethodOptions {
4071
+ const message = createBaseMethodOptions();
4072
+ message.deprecated = object.deprecated ?? false;
4073
+ message.idempotencyLevel = object.idempotencyLevel ?? 0;
4074
+ message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
4075
+ return message;
4076
+ }
4077
+ }
4078
+
4079
+ function createBaseUninterpretedOption(): UninterpretedOption {
4080
+ return {
4081
+ name: [],
4082
+ identifierValue: "",
4083
+ positiveIntValue: 0,
4084
+ negativeIntValue: 0,
4085
+ doubleValue: 0,
4086
+ stringValue: new Uint8Array(0),
4087
+ aggregateValue: "",
4088
+ };
4089
+ }
4090
+
4091
+ export namespace UninterpretedOption {
4092
+ export function encode(message: UninterpretedOption, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
4093
+ for (const v of message.name) {
4094
+ UninterpretedOption_NamePart.encode(v!, writer.uint32(18).fork()).ldelim();
4095
+ }
4096
+ if (message.identifierValue !== "") {
4097
+ writer.uint32(26).string(message.identifierValue);
4098
+ }
4099
+ if (message.positiveIntValue !== 0) {
4100
+ writer.uint32(32).uint64(message.positiveIntValue);
4101
+ }
4102
+ if (message.negativeIntValue !== 0) {
4103
+ writer.uint32(40).int64(message.negativeIntValue);
4104
+ }
4105
+ if (message.doubleValue !== 0) {
4106
+ writer.uint32(49).double(message.doubleValue);
4107
+ }
4108
+ if (message.stringValue.length !== 0) {
4109
+ writer.uint32(58).bytes(message.stringValue);
4110
+ }
4111
+ if (message.aggregateValue !== "") {
4112
+ writer.uint32(66).string(message.aggregateValue);
4113
+ }
4114
+ return writer;
4115
+ }
4116
+
4117
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): UninterpretedOption {
4118
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
4119
+ let end = length === undefined ? reader.len : reader.pos + length;
4120
+ const message = createBaseUninterpretedOption();
4121
+ while (reader.pos < end) {
4122
+ const tag = reader.uint32();
4123
+ switch (tag >>> 3) {
4124
+ case 2:
4125
+ if (tag !== 18) {
4126
+ break;
4127
+ }
4128
+
4129
+ message.name.push(UninterpretedOption_NamePart.decode(reader, reader.uint32()));
4130
+ continue;
4131
+ case 3:
4132
+ if (tag !== 26) {
4133
+ break;
4134
+ }
4135
+
4136
+ message.identifierValue = reader.string();
4137
+ continue;
4138
+ case 4:
4139
+ if (tag !== 32) {
4140
+ break;
4141
+ }
4142
+
4143
+ message.positiveIntValue = longToNumber(reader.uint64() as Long);
4144
+ continue;
4145
+ case 5:
4146
+ if (tag !== 40) {
4147
+ break;
4148
+ }
4149
+
4150
+ message.negativeIntValue = longToNumber(reader.int64() as Long);
4151
+ continue;
4152
+ case 6:
4153
+ if (tag !== 49) {
4154
+ break;
4155
+ }
4156
+
4157
+ message.doubleValue = reader.double();
4158
+ continue;
4159
+ case 7:
4160
+ if (tag !== 58) {
4161
+ break;
4162
+ }
4163
+
4164
+ message.stringValue = reader.bytes();
4165
+ continue;
4166
+ case 8:
4167
+ if (tag !== 66) {
4168
+ break;
4169
+ }
4170
+
4171
+ message.aggregateValue = reader.string();
4172
+ continue;
4173
+ }
4174
+ if ((tag & 7) === 4 || tag === 0) {
4175
+ break;
4176
+ }
4177
+ reader.skipType(tag & 7);
4178
+ }
4179
+ return message;
4180
+ }
4181
+
4182
+ export function fromJSON(object: any): UninterpretedOption {
4183
+ return {
4184
+ name: Array.isArray(object?.name) ? object.name.map((e: any) => UninterpretedOption_NamePart.fromJSON(e)) : [],
4185
+ identifierValue: isSet(object.identifierValue) ? String(object.identifierValue) : "",
4186
+ positiveIntValue: isSet(object.positiveIntValue) ? Number(object.positiveIntValue) : 0,
4187
+ negativeIntValue: isSet(object.negativeIntValue) ? Number(object.negativeIntValue) : 0,
4188
+ doubleValue: isSet(object.doubleValue) ? Number(object.doubleValue) : 0,
4189
+ stringValue: isSet(object.stringValue) ? bytesFromBase64(object.stringValue) : new Uint8Array(0),
4190
+ aggregateValue: isSet(object.aggregateValue) ? String(object.aggregateValue) : "",
4191
+ };
4192
+ }
4193
+
4194
+ export function toJSON(message: UninterpretedOption): unknown {
4195
+ const obj: any = {};
4196
+ if (message.name) {
4197
+ obj.name = message.name.map((e) => e ? UninterpretedOption_NamePart.toJSON(e) : undefined);
4198
+ } else {
4199
+ obj.name = [];
4200
+ }
4201
+ message.identifierValue !== undefined && (obj.identifierValue = message.identifierValue);
4202
+ message.positiveIntValue !== undefined && (obj.positiveIntValue = Math.round(message.positiveIntValue));
4203
+ message.negativeIntValue !== undefined && (obj.negativeIntValue = Math.round(message.negativeIntValue));
4204
+ message.doubleValue !== undefined && (obj.doubleValue = message.doubleValue);
4205
+ message.stringValue !== undefined &&
4206
+ (obj.stringValue = base64FromBytes(message.stringValue !== undefined ? message.stringValue : new Uint8Array(0)));
4207
+ message.aggregateValue !== undefined && (obj.aggregateValue = message.aggregateValue);
4208
+ return obj;
4209
+ }
4210
+
4211
+ export function create<I extends Exact<DeepPartial<UninterpretedOption>, I>>(base?: I): UninterpretedOption {
4212
+ return UninterpretedOption.fromPartial(base ?? {});
4213
+ }
4214
+
4215
+ export function fromPartial<I extends Exact<DeepPartial<UninterpretedOption>, I>>(object: I): UninterpretedOption {
4216
+ const message = createBaseUninterpretedOption();
4217
+ message.name = object.name?.map((e) => UninterpretedOption_NamePart.fromPartial(e)) || [];
4218
+ message.identifierValue = object.identifierValue ?? "";
4219
+ message.positiveIntValue = object.positiveIntValue ?? 0;
4220
+ message.negativeIntValue = object.negativeIntValue ?? 0;
4221
+ message.doubleValue = object.doubleValue ?? 0;
4222
+ message.stringValue = object.stringValue ?? new Uint8Array(0);
4223
+ message.aggregateValue = object.aggregateValue ?? "";
4224
+ return message;
4225
+ }
4226
+ }
4227
+
4228
+ function createBaseUninterpretedOption_NamePart(): UninterpretedOption_NamePart {
4229
+ return { namePart: "", isExtension: false };
4230
+ }
4231
+
4232
+ export namespace UninterpretedOption_NamePart {
4233
+ export function encode(message: UninterpretedOption_NamePart, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
4234
+ if (message.namePart !== "") {
4235
+ writer.uint32(10).string(message.namePart);
4236
+ }
4237
+ if (message.isExtension === true) {
4238
+ writer.uint32(16).bool(message.isExtension);
4239
+ }
4240
+ return writer;
4241
+ }
4242
+
4243
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): UninterpretedOption_NamePart {
4244
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
4245
+ let end = length === undefined ? reader.len : reader.pos + length;
4246
+ const message = createBaseUninterpretedOption_NamePart();
4247
+ while (reader.pos < end) {
4248
+ const tag = reader.uint32();
4249
+ switch (tag >>> 3) {
4250
+ case 1:
4251
+ if (tag !== 10) {
4252
+ break;
4253
+ }
4254
+
4255
+ message.namePart = reader.string();
4256
+ continue;
4257
+ case 2:
4258
+ if (tag !== 16) {
4259
+ break;
4260
+ }
4261
+
4262
+ message.isExtension = reader.bool();
4263
+ continue;
4264
+ }
4265
+ if ((tag & 7) === 4 || tag === 0) {
4266
+ break;
4267
+ }
4268
+ reader.skipType(tag & 7);
4269
+ }
4270
+ return message;
4271
+ }
4272
+
4273
+ export function fromJSON(object: any): UninterpretedOption_NamePart {
4274
+ return {
4275
+ namePart: isSet(object.namePart) ? String(object.namePart) : "",
4276
+ isExtension: isSet(object.isExtension) ? Boolean(object.isExtension) : false,
4277
+ };
4278
+ }
4279
+
4280
+ export function toJSON(message: UninterpretedOption_NamePart): unknown {
4281
+ const obj: any = {};
4282
+ message.namePart !== undefined && (obj.namePart = message.namePart);
4283
+ message.isExtension !== undefined && (obj.isExtension = message.isExtension);
4284
+ return obj;
4285
+ }
4286
+
4287
+ export function create<I extends Exact<DeepPartial<UninterpretedOption_NamePart>, I>>(
4288
+ base?: I,
4289
+ ): UninterpretedOption_NamePart {
4290
+ return UninterpretedOption_NamePart.fromPartial(base ?? {});
4291
+ }
4292
+
4293
+ export function fromPartial<I extends Exact<DeepPartial<UninterpretedOption_NamePart>, I>>(
4294
+ object: I,
4295
+ ): UninterpretedOption_NamePart {
4296
+ const message = createBaseUninterpretedOption_NamePart();
4297
+ message.namePart = object.namePart ?? "";
4298
+ message.isExtension = object.isExtension ?? false;
4299
+ return message;
4300
+ }
4301
+ }
4302
+
4303
+ function createBaseSourceCodeInfo(): SourceCodeInfo {
4304
+ return { location: [] };
4305
+ }
4306
+
4307
+ export namespace SourceCodeInfo {
4308
+ export function encode(message: SourceCodeInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
4309
+ for (const v of message.location) {
4310
+ SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim();
4311
+ }
4312
+ return writer;
4313
+ }
4314
+
4315
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): SourceCodeInfo {
4316
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
4317
+ let end = length === undefined ? reader.len : reader.pos + length;
4318
+ const message = createBaseSourceCodeInfo();
4319
+ while (reader.pos < end) {
4320
+ const tag = reader.uint32();
4321
+ switch (tag >>> 3) {
4322
+ case 1:
4323
+ if (tag !== 10) {
4324
+ break;
4325
+ }
4326
+
4327
+ message.location.push(SourceCodeInfo_Location.decode(reader, reader.uint32()));
4328
+ continue;
4329
+ }
4330
+ if ((tag & 7) === 4 || tag === 0) {
4331
+ break;
4332
+ }
4333
+ reader.skipType(tag & 7);
4334
+ }
4335
+ return message;
4336
+ }
4337
+
4338
+ export function fromJSON(object: any): SourceCodeInfo {
4339
+ return {
4340
+ location: Array.isArray(object?.location)
4341
+ ? object.location.map((e: any) => SourceCodeInfo_Location.fromJSON(e))
4342
+ : [],
4343
+ };
4344
+ }
4345
+
4346
+ export function toJSON(message: SourceCodeInfo): unknown {
4347
+ const obj: any = {};
4348
+ if (message.location) {
4349
+ obj.location = message.location.map((e) => e ? SourceCodeInfo_Location.toJSON(e) : undefined);
4350
+ } else {
4351
+ obj.location = [];
4352
+ }
4353
+ return obj;
4354
+ }
4355
+
4356
+ export function create<I extends Exact<DeepPartial<SourceCodeInfo>, I>>(base?: I): SourceCodeInfo {
4357
+ return SourceCodeInfo.fromPartial(base ?? {});
4358
+ }
4359
+
4360
+ export function fromPartial<I extends Exact<DeepPartial<SourceCodeInfo>, I>>(object: I): SourceCodeInfo {
4361
+ const message = createBaseSourceCodeInfo();
4362
+ message.location = object.location?.map((e) => SourceCodeInfo_Location.fromPartial(e)) || [];
4363
+ return message;
4364
+ }
4365
+ }
4366
+
4367
+ function createBaseSourceCodeInfo_Location(): SourceCodeInfo_Location {
4368
+ return { path: [], span: [], leadingComments: "", trailingComments: "", leadingDetachedComments: [] };
4369
+ }
4370
+
4371
+ export namespace SourceCodeInfo_Location {
4372
+ export function encode(message: SourceCodeInfo_Location, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
4373
+ writer.uint32(10).fork();
4374
+ for (const v of message.path) {
4375
+ writer.int32(v);
4376
+ }
4377
+ writer.ldelim();
4378
+ writer.uint32(18).fork();
4379
+ for (const v of message.span) {
4380
+ writer.int32(v);
4381
+ }
4382
+ writer.ldelim();
4383
+ if (message.leadingComments !== "") {
4384
+ writer.uint32(26).string(message.leadingComments);
4385
+ }
4386
+ if (message.trailingComments !== "") {
4387
+ writer.uint32(34).string(message.trailingComments);
4388
+ }
4389
+ for (const v of message.leadingDetachedComments) {
4390
+ writer.uint32(50).string(v!);
4391
+ }
4392
+ return writer;
4393
+ }
4394
+
4395
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): SourceCodeInfo_Location {
4396
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
4397
+ let end = length === undefined ? reader.len : reader.pos + length;
4398
+ const message = createBaseSourceCodeInfo_Location();
4399
+ while (reader.pos < end) {
4400
+ const tag = reader.uint32();
4401
+ switch (tag >>> 3) {
4402
+ case 1:
4403
+ if (tag === 8) {
4404
+ message.path.push(reader.int32());
4405
+
4406
+ continue;
4407
+ }
4408
+
4409
+ if (tag === 10) {
4410
+ const end2 = reader.uint32() + reader.pos;
4411
+ while (reader.pos < end2) {
4412
+ message.path.push(reader.int32());
4413
+ }
4414
+
4415
+ continue;
4416
+ }
4417
+
4418
+ break;
4419
+ case 2:
4420
+ if (tag === 16) {
4421
+ message.span.push(reader.int32());
4422
+
4423
+ continue;
4424
+ }
4425
+
4426
+ if (tag === 18) {
4427
+ const end2 = reader.uint32() + reader.pos;
4428
+ while (reader.pos < end2) {
4429
+ message.span.push(reader.int32());
4430
+ }
4431
+
4432
+ continue;
4433
+ }
4434
+
4435
+ break;
4436
+ case 3:
4437
+ if (tag !== 26) {
4438
+ break;
4439
+ }
4440
+
4441
+ message.leadingComments = reader.string();
4442
+ continue;
4443
+ case 4:
4444
+ if (tag !== 34) {
4445
+ break;
4446
+ }
4447
+
4448
+ message.trailingComments = reader.string();
4449
+ continue;
4450
+ case 6:
4451
+ if (tag !== 50) {
4452
+ break;
4453
+ }
4454
+
4455
+ message.leadingDetachedComments.push(reader.string());
4456
+ continue;
4457
+ }
4458
+ if ((tag & 7) === 4 || tag === 0) {
4459
+ break;
4460
+ }
4461
+ reader.skipType(tag & 7);
4462
+ }
4463
+ return message;
4464
+ }
4465
+
4466
+ export function fromJSON(object: any): SourceCodeInfo_Location {
4467
+ return {
4468
+ path: Array.isArray(object?.path) ? object.path.map((e: any) => Number(e)) : [],
4469
+ span: Array.isArray(object?.span) ? object.span.map((e: any) => Number(e)) : [],
4470
+ leadingComments: isSet(object.leadingComments) ? String(object.leadingComments) : "",
4471
+ trailingComments: isSet(object.trailingComments) ? String(object.trailingComments) : "",
4472
+ leadingDetachedComments: Array.isArray(object?.leadingDetachedComments)
4473
+ ? object.leadingDetachedComments.map((e: any) => String(e))
4474
+ : [],
4475
+ };
4476
+ }
4477
+
4478
+ export function toJSON(message: SourceCodeInfo_Location): unknown {
4479
+ const obj: any = {};
4480
+ if (message.path) {
4481
+ obj.path = message.path.map((e) => Math.round(e));
4482
+ } else {
4483
+ obj.path = [];
4484
+ }
4485
+ if (message.span) {
4486
+ obj.span = message.span.map((e) => Math.round(e));
4487
+ } else {
4488
+ obj.span = [];
4489
+ }
4490
+ message.leadingComments !== undefined && (obj.leadingComments = message.leadingComments);
4491
+ message.trailingComments !== undefined && (obj.trailingComments = message.trailingComments);
4492
+ if (message.leadingDetachedComments) {
4493
+ obj.leadingDetachedComments = message.leadingDetachedComments.map((e) => e);
4494
+ } else {
4495
+ obj.leadingDetachedComments = [];
4496
+ }
4497
+ return obj;
4498
+ }
4499
+
4500
+ export function create<I extends Exact<DeepPartial<SourceCodeInfo_Location>, I>>(base?: I): SourceCodeInfo_Location {
4501
+ return SourceCodeInfo_Location.fromPartial(base ?? {});
4502
+ }
4503
+
4504
+ export function fromPartial<I extends Exact<DeepPartial<SourceCodeInfo_Location>, I>>(
4505
+ object: I,
4506
+ ): SourceCodeInfo_Location {
4507
+ const message = createBaseSourceCodeInfo_Location();
4508
+ message.path = object.path?.map((e) => e) || [];
4509
+ message.span = object.span?.map((e) => e) || [];
4510
+ message.leadingComments = object.leadingComments ?? "";
4511
+ message.trailingComments = object.trailingComments ?? "";
4512
+ message.leadingDetachedComments = object.leadingDetachedComments?.map((e) => e) || [];
4513
+ return message;
4514
+ }
4515
+ }
4516
+
4517
+ function createBaseGeneratedCodeInfo(): GeneratedCodeInfo {
4518
+ return { annotation: [] };
4519
+ }
4520
+
4521
+ export namespace GeneratedCodeInfo {
4522
+ export function encode(message: GeneratedCodeInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
4523
+ for (const v of message.annotation) {
4524
+ GeneratedCodeInfo_Annotation.encode(v!, writer.uint32(10).fork()).ldelim();
4525
+ }
4526
+ return writer;
4527
+ }
4528
+
4529
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): GeneratedCodeInfo {
4530
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
4531
+ let end = length === undefined ? reader.len : reader.pos + length;
4532
+ const message = createBaseGeneratedCodeInfo();
4533
+ while (reader.pos < end) {
4534
+ const tag = reader.uint32();
4535
+ switch (tag >>> 3) {
4536
+ case 1:
4537
+ if (tag !== 10) {
4538
+ break;
4539
+ }
4540
+
4541
+ message.annotation.push(GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()));
4542
+ continue;
4543
+ }
4544
+ if ((tag & 7) === 4 || tag === 0) {
4545
+ break;
4546
+ }
4547
+ reader.skipType(tag & 7);
4548
+ }
4549
+ return message;
4550
+ }
4551
+
4552
+ export function fromJSON(object: any): GeneratedCodeInfo {
4553
+ return {
4554
+ annotation: Array.isArray(object?.annotation)
4555
+ ? object.annotation.map((e: any) => GeneratedCodeInfo_Annotation.fromJSON(e))
4556
+ : [],
4557
+ };
4558
+ }
4559
+
4560
+ export function toJSON(message: GeneratedCodeInfo): unknown {
4561
+ const obj: any = {};
4562
+ if (message.annotation) {
4563
+ obj.annotation = message.annotation.map((e) => e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined);
4564
+ } else {
4565
+ obj.annotation = [];
4566
+ }
4567
+ return obj;
4568
+ }
4569
+
4570
+ export function create<I extends Exact<DeepPartial<GeneratedCodeInfo>, I>>(base?: I): GeneratedCodeInfo {
4571
+ return GeneratedCodeInfo.fromPartial(base ?? {});
4572
+ }
4573
+
4574
+ export function fromPartial<I extends Exact<DeepPartial<GeneratedCodeInfo>, I>>(object: I): GeneratedCodeInfo {
4575
+ const message = createBaseGeneratedCodeInfo();
4576
+ message.annotation = object.annotation?.map((e) => GeneratedCodeInfo_Annotation.fromPartial(e)) || [];
4577
+ return message;
4578
+ }
4579
+ }
4580
+
4581
+ function createBaseGeneratedCodeInfo_Annotation(): GeneratedCodeInfo_Annotation {
4582
+ return { path: [], sourceFile: "", begin: 0, end: 0, semantic: 0 };
4583
+ }
4584
+
4585
+ export namespace GeneratedCodeInfo_Annotation {
4586
+ export function encode(message: GeneratedCodeInfo_Annotation, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
4587
+ writer.uint32(10).fork();
4588
+ for (const v of message.path) {
4589
+ writer.int32(v);
4590
+ }
4591
+ writer.ldelim();
4592
+ if (message.sourceFile !== "") {
4593
+ writer.uint32(18).string(message.sourceFile);
4594
+ }
4595
+ if (message.begin !== 0) {
4596
+ writer.uint32(24).int32(message.begin);
4597
+ }
4598
+ if (message.end !== 0) {
4599
+ writer.uint32(32).int32(message.end);
4600
+ }
4601
+ if (message.semantic !== 0) {
4602
+ writer.uint32(40).int32(message.semantic);
4603
+ }
4604
+ return writer;
4605
+ }
4606
+
4607
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): GeneratedCodeInfo_Annotation {
4608
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
4609
+ let end = length === undefined ? reader.len : reader.pos + length;
4610
+ const message = createBaseGeneratedCodeInfo_Annotation();
4611
+ while (reader.pos < end) {
4612
+ const tag = reader.uint32();
4613
+ switch (tag >>> 3) {
4614
+ case 1:
4615
+ if (tag === 8) {
4616
+ message.path.push(reader.int32());
4617
+
4618
+ continue;
4619
+ }
4620
+
4621
+ if (tag === 10) {
4622
+ const end2 = reader.uint32() + reader.pos;
4623
+ while (reader.pos < end2) {
4624
+ message.path.push(reader.int32());
4625
+ }
4626
+
4627
+ continue;
4628
+ }
4629
+
4630
+ break;
4631
+ case 2:
4632
+ if (tag !== 18) {
4633
+ break;
4634
+ }
4635
+
4636
+ message.sourceFile = reader.string();
4637
+ continue;
4638
+ case 3:
4639
+ if (tag !== 24) {
4640
+ break;
4641
+ }
4642
+
4643
+ message.begin = reader.int32();
4644
+ continue;
4645
+ case 4:
4646
+ if (tag !== 32) {
4647
+ break;
4648
+ }
4649
+
4650
+ message.end = reader.int32();
4651
+ continue;
4652
+ case 5:
4653
+ if (tag !== 40) {
4654
+ break;
4655
+ }
4656
+
4657
+ message.semantic = reader.int32() as any;
4658
+ continue;
4659
+ }
4660
+ if ((tag & 7) === 4 || tag === 0) {
4661
+ break;
4662
+ }
4663
+ reader.skipType(tag & 7);
4664
+ }
4665
+ return message;
4666
+ }
4667
+
4668
+ export function fromJSON(object: any): GeneratedCodeInfo_Annotation {
4669
+ return {
4670
+ path: Array.isArray(object?.path) ? object.path.map((e: any) => Number(e)) : [],
4671
+ sourceFile: isSet(object.sourceFile) ? String(object.sourceFile) : "",
4672
+ begin: isSet(object.begin) ? Number(object.begin) : 0,
4673
+ end: isSet(object.end) ? Number(object.end) : 0,
4674
+ semantic: isSet(object.semantic) ? generatedCodeInfo_Annotation_SemanticFromJSON(object.semantic) : 0,
4675
+ };
4676
+ }
4677
+
4678
+ export function toJSON(message: GeneratedCodeInfo_Annotation): unknown {
4679
+ const obj: any = {};
4680
+ if (message.path) {
4681
+ obj.path = message.path.map((e) => Math.round(e));
4682
+ } else {
4683
+ obj.path = [];
4684
+ }
4685
+ message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile);
4686
+ message.begin !== undefined && (obj.begin = Math.round(message.begin));
4687
+ message.end !== undefined && (obj.end = Math.round(message.end));
4688
+ message.semantic !== undefined && (obj.semantic = generatedCodeInfo_Annotation_SemanticToJSON(message.semantic));
4689
+ return obj;
4690
+ }
4691
+
4692
+ export function create<I extends Exact<DeepPartial<GeneratedCodeInfo_Annotation>, I>>(
4693
+ base?: I,
4694
+ ): GeneratedCodeInfo_Annotation {
4695
+ return GeneratedCodeInfo_Annotation.fromPartial(base ?? {});
4696
+ }
4697
+
4698
+ export function fromPartial<I extends Exact<DeepPartial<GeneratedCodeInfo_Annotation>, I>>(
4699
+ object: I,
4700
+ ): GeneratedCodeInfo_Annotation {
4701
+ const message = createBaseGeneratedCodeInfo_Annotation();
4702
+ message.path = object.path?.map((e) => e) || [];
4703
+ message.sourceFile = object.sourceFile ?? "";
4704
+ message.begin = object.begin ?? 0;
4705
+ message.end = object.end ?? 0;
4706
+ message.semantic = object.semantic ?? 0;
4707
+ return message;
4708
+ }
4709
+ }
4710
+
4711
+ declare const self: any | undefined;
4712
+ declare const window: any | undefined;
4713
+ declare const global: any | undefined;
4714
+ const tsProtoGlobalThis: any = (() => {
4715
+ if (typeof globalThis !== "undefined") {
4716
+ return globalThis;
4717
+ }
4718
+ if (typeof self !== "undefined") {
4719
+ return self;
4720
+ }
4721
+ if (typeof window !== "undefined") {
4722
+ return window;
4723
+ }
4724
+ if (typeof global !== "undefined") {
4725
+ return global;
4726
+ }
4727
+ throw "Unable to locate global object";
4728
+ })();
4729
+
4730
+ function bytesFromBase64(b64: string): Uint8Array {
4731
+ if (tsProtoGlobalThis.Buffer) {
4732
+ return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64"));
4733
+ } else {
4734
+ const bin = tsProtoGlobalThis.atob(b64);
4735
+ const arr = new Uint8Array(bin.length);
4736
+ for (let i = 0; i < bin.length; ++i) {
4737
+ arr[i] = bin.charCodeAt(i);
4738
+ }
4739
+ return arr;
4740
+ }
4741
+ }
4742
+
4743
+ function base64FromBytes(arr: Uint8Array): string {
4744
+ if (tsProtoGlobalThis.Buffer) {
4745
+ return tsProtoGlobalThis.Buffer.from(arr).toString("base64");
4746
+ } else {
4747
+ const bin: string[] = [];
4748
+ arr.forEach((byte) => {
4749
+ bin.push(String.fromCharCode(byte));
4750
+ });
4751
+ return tsProtoGlobalThis.btoa(bin.join(""));
4752
+ }
4753
+ }
4754
+
4755
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
4756
+
4757
+ export type DeepPartial<T> = T extends Builtin ? T
4758
+ : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
4759
+ : T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
4760
+ : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
4761
+ : Partial<T>;
4762
+
4763
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
4764
+ export type Exact<P, I extends P> = P extends Builtin ? P
4765
+ : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
4766
+
4767
+ function longToNumber(long: Long): number {
4768
+ if (long.gt(Number.MAX_SAFE_INTEGER)) {
4769
+ throw new tsProtoGlobalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
4770
+ }
4771
+ return long.toNumber();
4772
+ }
4773
+
4774
+ if (_m0.util.Long !== Long) {
4775
+ _m0.util.Long = Long as any;
4776
+ _m0.configure();
4777
+ }
4778
+
4779
+ function isSet(value: any): boolean {
4780
+ return value !== null && value !== undefined;
4781
+ }