grpc 1.73.0 → 1.74.0

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 (499) hide show
  1. checksums.yaml +4 -4
  2. data/Makefile +38 -17
  3. data/include/grpc/create_channel_from_endpoint.h +54 -0
  4. data/include/grpc/credentials.h +11 -5
  5. data/include/grpc/event_engine/event_engine.h +74 -17
  6. data/include/grpc/grpc_posix.h +20 -1
  7. data/include/grpc/impl/channel_arg_names.h +2 -4
  8. data/include/grpc/module.modulemap +1 -0
  9. data/include/grpc/support/json.h +24 -0
  10. data/src/core/call/interception_chain.h +7 -11
  11. data/src/core/channelz/channel_trace.cc +213 -115
  12. data/src/core/channelz/channel_trace.h +380 -86
  13. data/src/core/channelz/channelz.cc +270 -181
  14. data/src/core/channelz/channelz.h +168 -55
  15. data/src/core/channelz/channelz_registry.cc +2 -1
  16. data/src/core/channelz/channelz_registry.h +24 -0
  17. data/src/core/channelz/property_list.cc +357 -0
  18. data/src/core/channelz/property_list.h +202 -0
  19. data/src/core/channelz/ztrace_collector.h +3 -2
  20. data/src/core/client_channel/backup_poller.cc +17 -2
  21. data/src/core/client_channel/client_channel.cc +17 -28
  22. data/src/core/client_channel/client_channel_filter.cc +19 -29
  23. data/src/core/client_channel/config_selector.h +8 -2
  24. data/src/core/client_channel/dynamic_filters.cc +5 -6
  25. data/src/core/client_channel/dynamic_filters.h +1 -1
  26. data/src/core/client_channel/global_subchannel_pool.cc +4 -1
  27. data/src/core/client_channel/retry_filter.cc +21 -27
  28. data/src/core/client_channel/retry_filter.h +10 -7
  29. data/src/core/client_channel/retry_filter_legacy_call_data.cc +5 -5
  30. data/src/core/client_channel/retry_filter_legacy_call_data.h +1 -1
  31. data/src/core/client_channel/retry_interceptor.cc +30 -44
  32. data/src/core/client_channel/retry_interceptor.h +18 -17
  33. data/src/core/client_channel/retry_throttle.cc +46 -61
  34. data/src/core/client_channel/retry_throttle.h +17 -39
  35. data/src/core/client_channel/subchannel.cc +43 -19
  36. data/src/core/client_channel/subchannel.h +8 -0
  37. data/src/core/config/config_vars.cc +2 -0
  38. data/src/core/config/core_configuration.cc +1 -0
  39. data/src/core/config/core_configuration.h +11 -0
  40. data/src/core/credentials/call/call_creds_registry.h +125 -0
  41. data/src/core/credentials/call/call_creds_registry_init.cc +91 -0
  42. data/src/core/credentials/call/gcp_service_account_identity/gcp_service_account_identity_credentials.cc +6 -48
  43. data/src/core/credentials/call/jwt_token_file/jwt_token_file_call_credentials.cc +86 -0
  44. data/src/core/credentials/call/jwt_token_file/jwt_token_file_call_credentials.h +74 -0
  45. data/src/core/credentials/call/jwt_util.cc +70 -0
  46. data/src/core/credentials/call/jwt_util.h +32 -0
  47. data/src/core/credentials/transport/channel_creds_registry_init.cc +1 -1
  48. data/src/core/credentials/transport/google_default/google_default_credentials.cc +72 -4
  49. data/src/core/credentials/transport/ssl/ssl_credentials.cc +0 -1
  50. data/src/core/credentials/transport/tls/load_system_roots_supported.cc +1 -0
  51. data/src/core/credentials/transport/xds/xds_credentials.cc +0 -3
  52. data/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.cc +8 -8
  53. data/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.h +16 -16
  54. data/src/core/ext/filters/http/client_authority_filter.cc +2 -4
  55. data/src/core/ext/filters/http/message_compress/compression_filter.h +25 -22
  56. data/src/core/ext/filters/http/server/http_server_filter.h +12 -11
  57. data/src/core/ext/transport/chttp2/client/chttp2_connector.cc +120 -35
  58. data/src/core/ext/transport/chttp2/server/chttp2_server.cc +6 -5
  59. data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +162 -115
  60. data/src/core/ext/transport/chttp2/transport/chttp2_transport.h +0 -3
  61. data/src/core/ext/transport/chttp2/transport/decode_huff.cc +1239 -3514
  62. data/src/core/ext/transport/chttp2/transport/decode_huff.h +1008 -1486
  63. data/src/core/ext/transport/chttp2/transport/flow_control.h +22 -17
  64. data/src/core/ext/transport/chttp2/transport/frame.cc +10 -0
  65. data/src/core/ext/transport/chttp2/transport/frame.h +2 -2
  66. data/src/core/ext/transport/chttp2/transport/frame_data.cc +1 -1
  67. data/src/core/ext/transport/chttp2/transport/frame_settings.cc +7 -8
  68. data/src/core/ext/transport/chttp2/transport/frame_window_update.cc +4 -5
  69. data/src/core/ext/transport/chttp2/transport/header_assembler.h +299 -0
  70. data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +1 -1
  71. data/src/core/ext/transport/chttp2/transport/hpack_parser_table.cc +11 -5
  72. data/src/core/ext/transport/chttp2/transport/hpack_parser_table.h +12 -1
  73. data/src/core/ext/transport/chttp2/transport/http2_client_transport.cc +1017 -0
  74. data/src/core/ext/transport/chttp2/transport/http2_client_transport.h +593 -0
  75. data/src/core/ext/transport/chttp2/transport/http2_settings.h +19 -22
  76. data/{third_party/abseil-cpp/absl/strings/cord_buffer.cc → src/core/ext/transport/chttp2/transport/http2_stats_collector.cc} +14 -14
  77. data/src/core/ext/transport/chttp2/transport/http2_stats_collector.h +33 -0
  78. data/src/core/ext/transport/chttp2/transport/http2_status.h +6 -1
  79. data/src/core/ext/transport/chttp2/transport/http2_transport.cc +43 -0
  80. data/src/core/ext/transport/chttp2/transport/http2_transport.h +65 -0
  81. data/src/core/ext/transport/chttp2/transport/http2_ztrace_collector.h +0 -29
  82. data/src/core/ext/transport/chttp2/transport/internal.h +18 -8
  83. data/src/core/ext/transport/chttp2/transport/keepalive.cc +105 -0
  84. data/src/core/ext/transport/chttp2/transport/keepalive.h +138 -0
  85. data/src/core/ext/transport/chttp2/transport/message_assembler.h +185 -0
  86. data/src/core/ext/transport/chttp2/transport/parsing.cc +2 -4
  87. data/src/core/ext/transport/chttp2/transport/ping_callbacks.h +19 -0
  88. data/src/core/ext/transport/chttp2/transport/ping_promise.cc +151 -0
  89. data/src/core/ext/transport/chttp2/transport/ping_promise.h +180 -0
  90. data/src/core/ext/transport/chttp2/transport/ping_rate_policy.cc +5 -9
  91. data/src/core/ext/transport/chttp2/transport/ping_rate_policy.h +11 -0
  92. data/src/core/ext/transport/chttp2/transport/stream_lists.cc +39 -1
  93. data/src/core/ext/transport/chttp2/transport/transport_common.cc +19 -0
  94. data/src/core/ext/transport/chttp2/transport/transport_common.h +27 -0
  95. data/src/core/ext/transport/chttp2/transport/writing.cc +37 -11
  96. data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/channelz.upb.h +571 -0
  97. data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/channelz.upb_minitable.c +120 -0
  98. data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/channelz.upb_minitable.h +36 -0
  99. data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/promise.upb.h +1272 -0
  100. data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/promise.upb_minitable.c +312 -0
  101. data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/promise.upb_minitable.h +50 -0
  102. data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/property_list.upb.h +984 -0
  103. data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/property_list.upb_minitable.c +226 -0
  104. data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/property_list.upb_minitable.h +44 -0
  105. data/src/core/ext/upbdefs-gen/src/proto/grpc/channelz/v2/promise.upbdefs.c +175 -0
  106. data/src/core/ext/upbdefs-gen/src/proto/grpc/channelz/v2/promise.upbdefs.h +82 -0
  107. data/src/core/ext/upbdefs-gen/src/proto/grpc/channelz/v2/property_list.upbdefs.c +135 -0
  108. data/src/core/ext/upbdefs-gen/src/proto/grpc/channelz/v2/property_list.upbdefs.h +67 -0
  109. data/src/core/filter/auth/auth_filters.h +0 -25
  110. data/src/core/filter/auth/client_auth_filter.cc +0 -118
  111. data/src/core/filter/filter_args.h +9 -23
  112. data/src/core/handshaker/handshaker.cc +23 -14
  113. data/src/core/handshaker/handshaker.h +3 -0
  114. data/src/core/handshaker/http_connect/http_connect_handshaker.cc +3 -1
  115. data/src/core/handshaker/security/legacy_secure_endpoint.cc +6 -5
  116. data/src/core/handshaker/security/secure_endpoint.cc +70 -25
  117. data/src/core/handshaker/security/security_handshaker.cc +4 -1
  118. data/src/core/handshaker/tcp_connect/tcp_connect_handshaker.cc +7 -1
  119. data/src/core/lib/channel/channel_args.cc +15 -0
  120. data/src/core/lib/channel/channel_args.h +3 -0
  121. data/src/core/lib/channel/channel_stack.cc +22 -23
  122. data/src/core/lib/channel/channel_stack.h +9 -7
  123. data/src/core/lib/channel/channel_stack_builder_impl.cc +1 -1
  124. data/src/core/lib/channel/channel_stack_builder_impl.h +2 -7
  125. data/src/core/lib/channel/promise_based_filter.h +5 -5
  126. data/src/core/lib/debug/trace_impl.h +0 -1
  127. data/src/core/lib/event_engine/ares_resolver.cc +165 -46
  128. data/src/core/lib/event_engine/ares_resolver.h +48 -2
  129. data/src/core/lib/event_engine/cf_engine/cf_engine.cc +3 -1
  130. data/src/core/lib/event_engine/cf_engine/cf_engine.h +1 -4
  131. data/src/core/lib/event_engine/cf_engine/cfstream_endpoint.h +2 -6
  132. data/src/core/lib/event_engine/endpoint_channel_arg_wrapper.cc +40 -0
  133. data/src/core/lib/event_engine/endpoint_channel_arg_wrapper.h +60 -0
  134. data/src/core/lib/event_engine/event_engine.cc +7 -0
  135. data/src/core/lib/event_engine/extensions/channelz.h +10 -6
  136. data/src/core/lib/event_engine/grpc_polled_fd.h +5 -0
  137. data/src/core/lib/event_engine/posix_engine/ev_epoll1_linux.cc +130 -162
  138. data/src/core/lib/event_engine/posix_engine/ev_epoll1_linux.h +11 -15
  139. data/src/core/lib/event_engine/posix_engine/ev_poll_posix.cc +75 -117
  140. data/src/core/lib/event_engine/posix_engine/ev_poll_posix.h +7 -9
  141. data/src/core/lib/event_engine/posix_engine/event_poller.h +18 -15
  142. data/src/core/lib/event_engine/posix_engine/event_poller_posix_default.cc +0 -18
  143. data/src/core/lib/event_engine/posix_engine/file_descriptor_collection.cc +124 -0
  144. data/src/core/lib/event_engine/posix_engine/file_descriptor_collection.h +243 -0
  145. data/src/core/lib/event_engine/posix_engine/grpc_polled_fd_posix.h +29 -19
  146. data/src/core/lib/event_engine/posix_engine/internal_errqueue.cc +6 -2
  147. data/src/core/lib/event_engine/posix_engine/internal_errqueue.h +6 -1
  148. data/src/core/lib/event_engine/posix_engine/posix_endpoint.cc +145 -92
  149. data/src/core/lib/event_engine/posix_engine/posix_endpoint.h +9 -19
  150. data/src/core/lib/event_engine/posix_engine/posix_engine.cc +333 -116
  151. data/src/core/lib/event_engine/posix_engine/posix_engine.h +61 -18
  152. data/src/core/lib/event_engine/posix_engine/posix_engine_listener.cc +45 -37
  153. data/src/core/lib/event_engine/posix_engine/posix_engine_listener.h +6 -4
  154. data/src/core/lib/event_engine/posix_engine/posix_engine_listener_utils.cc +32 -142
  155. data/src/core/lib/event_engine/posix_engine/posix_engine_listener_utils.h +6 -5
  156. data/src/core/lib/event_engine/posix_engine/posix_interface.h +211 -0
  157. data/src/core/lib/event_engine/posix_engine/posix_interface_posix.cc +1083 -0
  158. data/src/core/lib/event_engine/posix_engine/posix_interface_windows.cc +281 -0
  159. data/src/core/lib/event_engine/posix_engine/posix_write_event_sink.cc +154 -0
  160. data/src/core/lib/event_engine/posix_engine/posix_write_event_sink.h +174 -0
  161. data/src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc +3 -719
  162. data/src/core/lib/event_engine/posix_engine/tcp_socket_utils.h +10 -170
  163. data/src/core/lib/event_engine/posix_engine/timer_manager.cc +33 -22
  164. data/src/core/lib/event_engine/posix_engine/timer_manager.h +13 -11
  165. data/src/core/lib/event_engine/posix_engine/traced_buffer_list.cc +117 -151
  166. data/src/core/lib/event_engine/posix_engine/traced_buffer_list.h +26 -94
  167. data/src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.cc +26 -25
  168. data/src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.h +6 -2
  169. data/src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.cc +36 -62
  170. data/src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.h +6 -2
  171. data/src/core/lib/event_engine/posix_engine/wakeup_fd_posix.h +7 -6
  172. data/src/core/lib/event_engine/posix_engine/wakeup_fd_posix_default.cc +12 -6
  173. data/src/core/lib/event_engine/posix_engine/wakeup_fd_posix_default.h +3 -1
  174. data/src/core/lib/event_engine/shim.cc +9 -0
  175. data/src/core/lib/event_engine/shim.h +3 -0
  176. data/src/core/lib/event_engine/thread_pool/thread_pool.h +7 -3
  177. data/src/core/lib/event_engine/thread_pool/thread_pool_factory.cc +0 -17
  178. data/src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.cc +4 -2
  179. data/src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.h +3 -2
  180. data/src/core/lib/event_engine/windows/grpc_polled_fd_windows.cc +4 -0
  181. data/src/core/lib/event_engine/windows/grpc_polled_fd_windows.h +4 -0
  182. data/src/core/lib/event_engine/windows/windows_endpoint.h +2 -6
  183. data/src/core/lib/event_engine/windows/windows_engine.cc +0 -1
  184. data/src/core/lib/event_engine/windows/windows_engine.h +1 -3
  185. data/src/core/lib/event_engine/windows/windows_listener.cc +14 -2
  186. data/src/core/lib/experiments/experiments.cc +45 -93
  187. data/src/core/lib/experiments/experiments.h +21 -51
  188. data/src/core/lib/iomgr/endpoint.cc +4 -3
  189. data/src/core/lib/iomgr/endpoint.h +7 -4
  190. data/src/core/lib/iomgr/endpoint_cfstream.cc +3 -2
  191. data/src/core/lib/iomgr/ev_epoll1_linux.cc +7 -2
  192. data/src/core/lib/iomgr/ev_poll_posix.cc +7 -2
  193. data/src/core/lib/iomgr/event_engine_shims/endpoint.cc +4 -6
  194. data/src/core/lib/iomgr/tcp_posix.cc +12 -6
  195. data/src/core/lib/iomgr/tcp_windows.cc +3 -2
  196. data/src/core/lib/promise/activity.h +1 -0
  197. data/src/core/lib/promise/arena_promise.h +23 -7
  198. data/src/core/lib/promise/detail/promise_factory.h +10 -0
  199. data/src/core/lib/promise/detail/promise_like.h +118 -11
  200. data/src/core/lib/promise/detail/promise_variant.h +50 -0
  201. data/src/core/lib/promise/detail/seq_state.h +687 -548
  202. data/src/core/lib/promise/if.h +20 -0
  203. data/src/core/lib/promise/inter_activity_latch.h +147 -0
  204. data/src/core/lib/promise/inter_activity_mutex.h +547 -0
  205. data/src/core/lib/promise/loop.h +65 -3
  206. data/src/core/lib/promise/map.h +24 -0
  207. data/src/core/lib/promise/match_promise.h +103 -0
  208. data/src/core/lib/promise/mpsc.cc +425 -0
  209. data/src/core/lib/promise/mpsc.h +490 -0
  210. data/src/core/lib/promise/party.cc +50 -1
  211. data/src/core/lib/promise/party.h +66 -1
  212. data/src/core/lib/promise/race.h +31 -0
  213. data/src/core/lib/promise/seq.h +4 -1
  214. data/src/core/lib/promise/status_flag.h +7 -0
  215. data/src/core/lib/promise/try_seq.h +4 -1
  216. data/src/core/lib/promise/wait_set.cc +28 -0
  217. data/src/core/lib/promise/wait_set.h +86 -0
  218. data/src/core/lib/resource_quota/arena.h +19 -0
  219. data/src/core/lib/slice/slice.h +5 -0
  220. data/src/core/lib/surface/channel_create.cc +88 -13
  221. data/src/core/lib/surface/channel_create.h +4 -0
  222. data/src/core/lib/surface/channel_init.cc +164 -47
  223. data/src/core/lib/surface/channel_init.h +64 -1
  224. data/src/core/lib/surface/filter_stack_call.cc +18 -9
  225. data/src/core/lib/surface/init.cc +6 -15
  226. data/src/core/lib/surface/legacy_channel.cc +3 -5
  227. data/src/core/lib/surface/legacy_channel.h +3 -1
  228. data/src/core/lib/surface/version.cc +2 -2
  229. data/src/core/lib/transport/promise_endpoint.cc +110 -0
  230. data/src/core/lib/transport/promise_endpoint.h +307 -0
  231. data/src/core/load_balancing/child_policy_handler.cc +2 -4
  232. data/src/core/load_balancing/delegating_helper.h +2 -3
  233. data/src/core/load_balancing/health_check_client.cc +1 -5
  234. data/src/core/load_balancing/lb_policy.h +1 -3
  235. data/src/core/load_balancing/oob_backend_metric.cc +1 -5
  236. data/src/core/load_balancing/pick_first/pick_first.cc +3 -0
  237. data/src/core/load_balancing/xds/cds.cc +10 -1
  238. data/src/core/plugin_registry/grpc_plugin_registry_extra.cc +2 -0
  239. data/src/core/resolver/xds/xds_config.cc +6 -3
  240. data/src/core/resolver/xds/xds_config.h +9 -4
  241. data/src/core/resolver/xds/xds_dependency_manager.cc +21 -6
  242. data/src/core/resolver/xds/xds_dependency_manager.h +2 -1
  243. data/src/core/resolver/xds/xds_resolver.cc +31 -11
  244. data/src/core/server/server.cc +83 -12
  245. data/src/core/server/server.h +21 -2
  246. data/src/core/server/xds_server_config_fetcher.cc +63 -25
  247. data/src/core/service_config/service_config.h +1 -1
  248. data/src/core/service_config/service_config_impl.h +1 -1
  249. data/src/core/telemetry/context_list_entry.cc +38 -0
  250. data/src/core/telemetry/context_list_entry.h +42 -12
  251. data/src/core/telemetry/stats_data.cc +233 -207
  252. data/src/core/telemetry/stats_data.h +250 -153
  253. data/src/core/telemetry/tcp_tracer.h +1 -1
  254. data/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.cc +11 -3
  255. data/src/core/tsi/fake_transport_security.cc +17 -0
  256. data/src/core/tsi/ssl_transport_security.cc +2 -0
  257. data/src/core/tsi/transport_security_grpc.cc +8 -0
  258. data/src/core/tsi/transport_security_grpc.h +15 -0
  259. data/src/core/util/backoff.cc +1 -5
  260. data/src/core/util/backoff.h +1 -0
  261. data/src/core/util/down_cast.h +1 -1
  262. data/src/core/util/function_signature.h +15 -1
  263. data/src/core/util/http_client/httpcli.cc +12 -5
  264. data/src/core/util/http_client/httpcli.h +4 -1
  265. data/src/core/util/latent_see.h +8 -5
  266. data/src/core/util/log.cc +4 -0
  267. data/src/core/util/memory_usage.h +268 -0
  268. data/src/core/util/per_cpu.cc +2 -0
  269. data/src/core/util/per_cpu.h +7 -0
  270. data/src/core/util/shared_bit_gen.h +20 -0
  271. data/src/core/util/single_set_ptr.h +2 -2
  272. data/src/core/util/upb_utils.h +42 -0
  273. data/src/core/util/uri.cc +3 -2
  274. data/src/core/util/useful.h +53 -2
  275. data/src/core/util/wait_for_single_owner.cc +31 -0
  276. data/src/core/util/wait_for_single_owner.h +24 -0
  277. data/src/core/xds/grpc/xds_bootstrap_grpc.cc +2 -0
  278. data/src/core/xds/grpc/xds_bootstrap_grpc.h +5 -0
  279. data/src/core/xds/grpc/xds_client_grpc.cc +6 -2
  280. data/src/core/xds/grpc/xds_common_types_parser.cc +138 -50
  281. data/src/core/xds/grpc/xds_common_types_parser.h +12 -0
  282. data/src/core/xds/grpc/xds_http_filter.h +7 -0
  283. data/src/core/xds/grpc/xds_http_gcp_authn_filter.cc +22 -0
  284. data/src/core/xds/grpc/xds_http_gcp_authn_filter.h +3 -0
  285. data/src/core/xds/grpc/xds_route_config_parser.cc +15 -38
  286. data/src/core/xds/grpc/xds_server_grpc.cc +63 -13
  287. data/src/core/xds/grpc/xds_server_grpc.h +10 -2
  288. data/src/core/xds/grpc/xds_server_grpc_interface.h +4 -0
  289. data/src/core/xds/grpc/xds_transport_grpc.cc +18 -0
  290. data/src/core/xds/xds_client/xds_bootstrap.h +2 -0
  291. data/src/core/xds/xds_client/xds_client.cc +26 -5
  292. data/src/ruby/ext/grpc/extconf.rb +2 -0
  293. data/src/ruby/ext/grpc/rb_call.c +1 -8
  294. data/src/ruby/ext/grpc/rb_channel.c +72 -568
  295. data/src/ruby/ext/grpc/rb_channel.h +0 -3
  296. data/src/ruby/ext/grpc/rb_completion_queue.c +26 -14
  297. data/src/ruby/ext/grpc/rb_completion_queue.h +1 -7
  298. data/src/ruby/ext/grpc/rb_grpc.c +9 -5
  299. data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +1 -1
  300. data/src/ruby/ext/grpc/rb_loader.c +0 -4
  301. data/src/ruby/ext/grpc/rb_server.c +31 -50
  302. data/src/ruby/lib/grpc/generic/client_stub.rb +4 -4
  303. data/src/ruby/lib/grpc/version.rb +1 -1
  304. data/src/ruby/spec/core_spec.rb +22 -0
  305. data/src/ruby/spec/generic/active_call_spec.rb +1 -1
  306. data/third_party/abseil-cpp/absl/algorithm/container.h +2 -19
  307. data/third_party/abseil-cpp/absl/base/attributes.h +76 -7
  308. data/third_party/abseil-cpp/absl/base/call_once.h +11 -12
  309. data/third_party/abseil-cpp/absl/base/config.h +20 -129
  310. data/third_party/abseil-cpp/absl/base/{internal/fast_type_id.h → fast_type_id.h} +11 -16
  311. data/third_party/abseil-cpp/absl/base/internal/cycleclock.cc +0 -5
  312. data/third_party/abseil-cpp/absl/base/internal/cycleclock_config.h +7 -7
  313. data/third_party/abseil-cpp/absl/base/internal/endian.h +34 -38
  314. data/third_party/abseil-cpp/absl/base/internal/iterator_traits.h +71 -0
  315. data/third_party/abseil-cpp/absl/base/internal/low_level_alloc.cc +6 -5
  316. data/third_party/abseil-cpp/absl/base/internal/{nullability_impl.h → nullability_deprecated.h} +45 -8
  317. data/third_party/abseil-cpp/absl/base/internal/spinlock.cc +0 -9
  318. data/third_party/abseil-cpp/absl/base/internal/spinlock.h +3 -13
  319. data/third_party/abseil-cpp/absl/base/internal/unaligned_access.h +6 -6
  320. data/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.h +8 -3
  321. data/third_party/abseil-cpp/absl/base/no_destructor.h +11 -32
  322. data/third_party/abseil-cpp/absl/base/nullability.h +84 -72
  323. data/third_party/abseil-cpp/absl/base/options.h +3 -80
  324. data/third_party/abseil-cpp/absl/base/policy_checks.h +7 -7
  325. data/third_party/abseil-cpp/absl/cleanup/cleanup.h +1 -3
  326. data/third_party/abseil-cpp/absl/cleanup/internal/cleanup.h +3 -4
  327. data/third_party/abseil-cpp/absl/container/btree_map.h +4 -2
  328. data/third_party/abseil-cpp/absl/container/btree_set.h +4 -2
  329. data/third_party/abseil-cpp/absl/container/fixed_array.h +7 -14
  330. data/third_party/abseil-cpp/absl/container/flat_hash_map.h +5 -0
  331. data/third_party/abseil-cpp/absl/container/flat_hash_set.h +6 -1
  332. data/third_party/abseil-cpp/absl/container/inlined_vector.h +8 -5
  333. data/third_party/abseil-cpp/absl/container/internal/btree.h +132 -29
  334. data/third_party/abseil-cpp/absl/container/internal/btree_container.h +175 -71
  335. data/third_party/abseil-cpp/absl/container/internal/common.h +43 -0
  336. data/third_party/abseil-cpp/absl/container/internal/common_policy_traits.h +1 -2
  337. data/third_party/abseil-cpp/absl/container/internal/container_memory.h +9 -10
  338. data/third_party/abseil-cpp/absl/container/internal/hash_function_defaults.h +1 -8
  339. data/third_party/abseil-cpp/absl/container/internal/hash_policy_traits.h +0 -4
  340. data/third_party/abseil-cpp/absl/container/internal/hashtable_control_bytes.h +527 -0
  341. data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.cc +20 -4
  342. data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.h +31 -12
  343. data/third_party/abseil-cpp/absl/container/internal/inlined_vector.h +2 -7
  344. data/third_party/abseil-cpp/absl/container/internal/layout.h +26 -42
  345. data/third_party/abseil-cpp/absl/container/internal/raw_hash_map.h +199 -68
  346. data/third_party/abseil-cpp/absl/container/internal/raw_hash_set.cc +1354 -183
  347. data/third_party/abseil-cpp/absl/container/internal/raw_hash_set.h +881 -1424
  348. data/third_party/abseil-cpp/absl/container/internal/raw_hash_set_resize_impl.h +80 -0
  349. data/third_party/abseil-cpp/absl/crc/crc32c.cc +0 -4
  350. data/third_party/abseil-cpp/absl/crc/crc32c.h +7 -5
  351. data/third_party/abseil-cpp/absl/crc/internal/crc32_x86_arm_combined_simd.h +0 -22
  352. data/third_party/abseil-cpp/absl/crc/internal/crc_x86_arm_combined.cc +45 -74
  353. data/third_party/abseil-cpp/absl/debugging/internal/addresses.h +57 -0
  354. data/third_party/abseil-cpp/absl/debugging/internal/decode_rust_punycode.cc +1 -1
  355. data/third_party/abseil-cpp/absl/debugging/internal/decode_rust_punycode.h +5 -5
  356. data/third_party/abseil-cpp/absl/debugging/internal/demangle.cc +8 -35
  357. data/third_party/abseil-cpp/absl/debugging/internal/demangle_rust.cc +16 -16
  358. data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_aarch64-inl.inc +40 -37
  359. data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_arm-inl.inc +16 -7
  360. data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_emscripten-inl.inc +14 -5
  361. data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_generic-inl.inc +10 -4
  362. data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_powerpc-inl.inc +27 -16
  363. data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_riscv-inl.inc +13 -4
  364. data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_unimplemented-inl.inc +4 -3
  365. data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_win32-inl.inc +15 -28
  366. data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_x86-inl.inc +19 -9
  367. data/third_party/abseil-cpp/absl/debugging/stacktrace.cc +144 -27
  368. data/third_party/abseil-cpp/absl/debugging/stacktrace.h +73 -5
  369. data/third_party/abseil-cpp/absl/debugging/symbolize_elf.inc +19 -9
  370. data/third_party/abseil-cpp/absl/debugging/symbolize_emscripten.inc +3 -2
  371. data/third_party/abseil-cpp/absl/debugging/symbolize_win32.inc +25 -6
  372. data/third_party/abseil-cpp/absl/flags/commandlineflag.h +2 -2
  373. data/third_party/abseil-cpp/absl/flags/flag.h +4 -3
  374. data/third_party/abseil-cpp/absl/flags/internal/commandlineflag.h +2 -2
  375. data/third_party/abseil-cpp/absl/flags/internal/flag.cc +2 -1
  376. data/third_party/abseil-cpp/absl/flags/internal/flag.h +7 -6
  377. data/third_party/abseil-cpp/absl/flags/internal/registry.h +4 -3
  378. data/third_party/abseil-cpp/absl/flags/reflection.cc +2 -3
  379. data/third_party/abseil-cpp/absl/functional/any_invocable.h +8 -10
  380. data/third_party/abseil-cpp/absl/functional/function_ref.h +2 -9
  381. data/third_party/abseil-cpp/absl/functional/internal/any_invocable.h +110 -226
  382. data/third_party/abseil-cpp/absl/functional/internal/front_binder.h +10 -12
  383. data/third_party/abseil-cpp/absl/functional/internal/function_ref.h +2 -5
  384. data/third_party/abseil-cpp/absl/hash/hash.h +18 -0
  385. data/third_party/abseil-cpp/absl/hash/internal/hash.cc +1 -5
  386. data/third_party/abseil-cpp/absl/hash/internal/hash.h +86 -61
  387. data/third_party/abseil-cpp/absl/hash/internal/low_level_hash.cc +25 -68
  388. data/third_party/abseil-cpp/absl/hash/internal/low_level_hash.h +2 -6
  389. data/third_party/abseil-cpp/absl/hash/internal/weakly_mixed_integer.h +38 -0
  390. data/third_party/abseil-cpp/absl/log/check.h +2 -1
  391. data/third_party/abseil-cpp/absl/log/globals.h +4 -5
  392. data/third_party/abseil-cpp/absl/log/internal/append_truncated.h +28 -0
  393. data/third_party/abseil-cpp/absl/log/internal/check_op.cc +22 -22
  394. data/third_party/abseil-cpp/absl/log/internal/check_op.h +65 -62
  395. data/third_party/abseil-cpp/absl/log/internal/conditions.cc +5 -3
  396. data/third_party/abseil-cpp/absl/log/internal/conditions.h +7 -2
  397. data/third_party/abseil-cpp/absl/log/internal/log_message.cc +85 -43
  398. data/third_party/abseil-cpp/absl/log/internal/log_message.h +84 -59
  399. data/third_party/abseil-cpp/absl/log/internal/nullstream.h +1 -0
  400. data/third_party/abseil-cpp/absl/log/internal/proto.cc +3 -2
  401. data/third_party/abseil-cpp/absl/log/internal/proto.h +3 -3
  402. data/third_party/abseil-cpp/absl/log/internal/strip.h +4 -12
  403. data/third_party/abseil-cpp/absl/log/internal/vlog_config.h +8 -6
  404. data/third_party/abseil-cpp/absl/log/internal/voidify.h +10 -4
  405. data/third_party/abseil-cpp/absl/log/log.h +48 -35
  406. data/third_party/abseil-cpp/absl/log/log_sink_registry.h +2 -2
  407. data/third_party/abseil-cpp/absl/meta/type_traits.h +46 -175
  408. data/third_party/abseil-cpp/absl/numeric/bits.h +68 -2
  409. data/third_party/abseil-cpp/absl/numeric/int128.cc +0 -52
  410. data/third_party/abseil-cpp/absl/numeric/internal/bits.h +7 -3
  411. data/third_party/abseil-cpp/absl/profiling/internal/exponential_biased.cc +1 -1
  412. data/third_party/abseil-cpp/absl/random/bit_gen_ref.h +10 -11
  413. data/third_party/abseil-cpp/absl/random/distributions.h +6 -8
  414. data/third_party/abseil-cpp/absl/random/gaussian_distribution.h +1 -1
  415. data/third_party/abseil-cpp/absl/random/internal/distribution_caller.h +5 -6
  416. data/third_party/abseil-cpp/absl/random/internal/{pool_urbg.cc → entropy_pool.cc} +22 -90
  417. data/third_party/abseil-cpp/absl/random/internal/entropy_pool.h +35 -0
  418. data/third_party/abseil-cpp/absl/random/internal/nonsecure_base.h +5 -6
  419. data/third_party/abseil-cpp/absl/random/internal/randen_detect.cc +1 -1
  420. data/third_party/abseil-cpp/absl/random/internal/seed_material.cc +20 -12
  421. data/third_party/abseil-cpp/absl/random/internal/seed_material.h +5 -5
  422. data/third_party/abseil-cpp/absl/random/random.h +88 -53
  423. data/third_party/abseil-cpp/absl/random/seed_sequences.cc +6 -2
  424. data/third_party/abseil-cpp/absl/status/internal/status_internal.cc +3 -4
  425. data/third_party/abseil-cpp/absl/status/internal/status_internal.h +3 -4
  426. data/third_party/abseil-cpp/absl/status/internal/statusor_internal.h +4 -3
  427. data/third_party/abseil-cpp/absl/status/status.cc +4 -8
  428. data/third_party/abseil-cpp/absl/status/status.h +8 -8
  429. data/third_party/abseil-cpp/absl/status/status_payload_printer.h +2 -2
  430. data/third_party/abseil-cpp/absl/status/statusor.cc +2 -2
  431. data/third_party/abseil-cpp/absl/status/statusor.h +6 -6
  432. data/third_party/abseil-cpp/absl/strings/ascii.cc +9 -9
  433. data/third_party/abseil-cpp/absl/strings/ascii.h +18 -18
  434. data/third_party/abseil-cpp/absl/strings/charconv.cc +21 -22
  435. data/third_party/abseil-cpp/absl/strings/charconv.h +5 -5
  436. data/third_party/abseil-cpp/absl/strings/cord.cc +54 -58
  437. data/third_party/abseil-cpp/absl/strings/cord.h +94 -83
  438. data/third_party/abseil-cpp/absl/strings/cord_analysis.cc +11 -11
  439. data/third_party/abseil-cpp/absl/strings/cord_analysis.h +3 -3
  440. data/third_party/abseil-cpp/absl/strings/escaping.cc +130 -149
  441. data/third_party/abseil-cpp/absl/strings/escaping.h +9 -10
  442. data/third_party/abseil-cpp/absl/strings/internal/charconv_bigint.cc +1 -1
  443. data/third_party/abseil-cpp/absl/strings/internal/cord_internal.h +6 -8
  444. data/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree.cc +0 -4
  445. data/third_party/abseil-cpp/absl/strings/internal/cordz_info.cc +0 -4
  446. data/third_party/abseil-cpp/absl/strings/internal/str_format/arg.cc +7 -63
  447. data/third_party/abseil-cpp/absl/strings/internal/str_format/arg.h +1 -11
  448. data/third_party/abseil-cpp/absl/strings/internal/str_format/extension.cc +0 -22
  449. data/third_party/abseil-cpp/absl/strings/internal/str_format/output.cc +5 -3
  450. data/third_party/abseil-cpp/absl/strings/internal/str_format/parser.h +4 -2
  451. data/third_party/abseil-cpp/absl/strings/internal/str_join_internal.h +3 -3
  452. data/third_party/abseil-cpp/absl/strings/internal/string_constant.h +0 -5
  453. data/third_party/abseil-cpp/absl/strings/internal/utf8.cc +96 -1
  454. data/third_party/abseil-cpp/absl/strings/internal/utf8.h +15 -1
  455. data/third_party/abseil-cpp/absl/strings/numbers.cc +53 -32
  456. data/third_party/abseil-cpp/absl/strings/numbers.h +87 -58
  457. data/third_party/abseil-cpp/absl/strings/str_cat.cc +6 -7
  458. data/third_party/abseil-cpp/absl/strings/str_cat.h +32 -32
  459. data/third_party/abseil-cpp/absl/strings/str_format.h +18 -18
  460. data/third_party/abseil-cpp/absl/strings/str_replace.cc +3 -3
  461. data/third_party/abseil-cpp/absl/strings/str_replace.h +6 -6
  462. data/third_party/abseil-cpp/absl/strings/string_view.cc +4 -9
  463. data/third_party/abseil-cpp/absl/strings/string_view.h +27 -32
  464. data/third_party/abseil-cpp/absl/strings/strip.h +4 -4
  465. data/third_party/abseil-cpp/absl/strings/substitute.cc +5 -4
  466. data/third_party/abseil-cpp/absl/strings/substitute.h +66 -64
  467. data/third_party/abseil-cpp/absl/synchronization/internal/futex_waiter.cc +0 -4
  468. data/third_party/abseil-cpp/absl/synchronization/internal/kernel_timeout.cc +0 -5
  469. data/third_party/abseil-cpp/absl/synchronization/internal/pthread_waiter.cc +0 -4
  470. data/third_party/abseil-cpp/absl/synchronization/internal/sem_waiter.cc +0 -4
  471. data/third_party/abseil-cpp/absl/synchronization/internal/stdcpp_waiter.cc +0 -4
  472. data/third_party/abseil-cpp/absl/synchronization/internal/waiter_base.cc +0 -4
  473. data/third_party/abseil-cpp/absl/synchronization/internal/win32_waiter.cc +0 -4
  474. data/third_party/abseil-cpp/absl/synchronization/mutex.cc +1 -1
  475. data/third_party/abseil-cpp/absl/synchronization/mutex.h +97 -69
  476. data/third_party/abseil-cpp/absl/synchronization/notification.h +1 -1
  477. data/third_party/abseil-cpp/absl/time/civil_time.cc +1 -0
  478. data/third_party/abseil-cpp/absl/time/duration.cc +12 -7
  479. data/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/time_zone.h +1 -1
  480. data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_lookup.cc +90 -111
  481. data/third_party/abseil-cpp/absl/time/time.h +20 -15
  482. data/third_party/abseil-cpp/absl/types/optional.h +7 -747
  483. data/third_party/abseil-cpp/absl/types/span.h +13 -11
  484. data/third_party/abseil-cpp/absl/types/variant.h +5 -784
  485. data/third_party/abseil-cpp/absl/utility/utility.h +10 -185
  486. metadata +72 -20
  487. data/src/core/lib/event_engine/forkable.cc +0 -105
  488. data/src/core/lib/event_engine/forkable.h +0 -67
  489. data/src/core/lib/iomgr/python_util.h +0 -46
  490. data/third_party/abseil-cpp/absl/base/internal/inline_variable.h +0 -108
  491. data/third_party/abseil-cpp/absl/base/internal/invoke.h +0 -241
  492. data/third_party/abseil-cpp/absl/log/log_entry.cc +0 -41
  493. data/third_party/abseil-cpp/absl/random/internal/pool_urbg.h +0 -131
  494. data/third_party/abseil-cpp/absl/types/bad_optional_access.cc +0 -66
  495. data/third_party/abseil-cpp/absl/types/bad_optional_access.h +0 -78
  496. data/third_party/abseil-cpp/absl/types/bad_variant_access.cc +0 -82
  497. data/third_party/abseil-cpp/absl/types/bad_variant_access.h +0 -82
  498. data/third_party/abseil-cpp/absl/types/internal/optional.h +0 -352
  499. data/third_party/abseil-cpp/absl/types/internal/variant.h +0 -1622
@@ -33,7 +33,6 @@
33
33
  #include "src/core/lib/promise/promise.h"
34
34
  #include "src/core/util/construct_destruct.h"
35
35
  #include "src/core/util/debug_location.h"
36
- #include "src/core/util/json/json.h"
37
36
 
38
37
  // A sequence under some traits for some set of callables P, Fs.
39
38
  // P should be a promise-like object that yields a value.
@@ -131,29 +130,33 @@ struct SeqState<Traits, P, F0> {
131
130
  }
132
131
  GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION SeqState& operator=(SeqState&& other) =
133
132
  delete;
134
- Json ToJson(absl::string_view type_name) const {
135
- Json::Object obj;
136
- #ifndef NDEBUG
137
- obj["source_location"] =
138
- Json::FromString(absl::StrCat(whence.file(), ":", whence.line()));
139
- #endif
140
- obj["seq_type"] = Json::FromString(std::string(type_name));
141
- Json::Array steps;
142
- steps.reserve(2);
143
- Json::Object step0;
144
- step0["type"] = Json::FromString(std::string(TypeName<P>()));
133
+ void ToProto(grpc_channelz_v2_Promise_CompositionKind kind,
134
+ grpc_channelz_v2_Promise* promise_proto,
135
+ upb_Arena* arena) const {
136
+ auto* seq_promise =
137
+ grpc_channelz_v2_Promise_mutable_seq_promise(promise_proto, arena);
138
+ grpc_channelz_v2_Promise_Seq_set_kind(seq_promise, kind);
139
+ auto** steps =
140
+ grpc_channelz_v2_Promise_Seq_resize_steps(seq_promise, 2, arena);
141
+ for (int i = 0; i < 2; i++) {
142
+ steps[i] = grpc_channelz_v2_Promise_SeqStep_new(arena);
143
+ }
144
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
145
+ steps[0], StdStringToUpbString(TypeName<P>()));
145
146
  if (state == State::kState0) {
146
- step0["polling_state"] = PromiseAsJson(prior.current_promise);
147
+ PromiseAsProto(prior.current_promise,
148
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
149
+ steps[0], arena),
150
+ arena);
147
151
  }
148
- steps.emplace_back(Json::FromObject(step0));
149
- Json::Object step1;
150
- step1["type"] = Json::FromString(std::string(TypeName<F0>()));
152
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
153
+ steps[1], StdStringToUpbString(TypeName<F0>()));
151
154
  if (state == State::kState1) {
152
- step1["polling_state"] = PromiseAsJson(current_promise);
155
+ PromiseAsProto(current_promise,
156
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
157
+ steps[1], arena),
158
+ arena);
153
159
  }
154
- steps.emplace_back(Json::FromObject(step1));
155
- obj["steps"] = Json::FromArray(steps);
156
- return Json::FromObject(obj);
157
160
  }
158
161
  GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION Poll<Result> PollOnce() {
159
162
  switch (state) {
@@ -278,35 +281,41 @@ struct SeqState<Traits, P, F0, F1> {
278
281
  }
279
282
  GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION SeqState& operator=(SeqState&& other) =
280
283
  delete;
281
- Json ToJson(absl::string_view type_name) const {
282
- Json::Object obj;
283
- #ifndef NDEBUG
284
- obj["source_location"] =
285
- Json::FromString(absl::StrCat(whence.file(), ":", whence.line()));
286
- #endif
287
- obj["seq_type"] = Json::FromString(std::string(type_name));
288
- Json::Array steps;
289
- steps.reserve(3);
290
- Json::Object step0;
291
- step0["type"] = Json::FromString(std::string(TypeName<P>()));
284
+ void ToProto(grpc_channelz_v2_Promise_CompositionKind kind,
285
+ grpc_channelz_v2_Promise* promise_proto,
286
+ upb_Arena* arena) const {
287
+ auto* seq_promise =
288
+ grpc_channelz_v2_Promise_mutable_seq_promise(promise_proto, arena);
289
+ grpc_channelz_v2_Promise_Seq_set_kind(seq_promise, kind);
290
+ auto** steps =
291
+ grpc_channelz_v2_Promise_Seq_resize_steps(seq_promise, 3, arena);
292
+ for (int i = 0; i < 3; i++) {
293
+ steps[i] = grpc_channelz_v2_Promise_SeqStep_new(arena);
294
+ }
295
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
296
+ steps[0], StdStringToUpbString(TypeName<P>()));
292
297
  if (state == State::kState0) {
293
- step0["polling_state"] = PromiseAsJson(prior.prior.current_promise);
298
+ PromiseAsProto(prior.prior.current_promise,
299
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
300
+ steps[0], arena),
301
+ arena);
294
302
  }
295
- steps.emplace_back(Json::FromObject(step0));
296
- Json::Object step1;
297
- step1["type"] = Json::FromString(std::string(TypeName<F0>()));
303
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
304
+ steps[1], StdStringToUpbString(TypeName<F0>()));
298
305
  if (state == State::kState1) {
299
- step1["polling_state"] = PromiseAsJson(prior.current_promise);
306
+ PromiseAsProto(prior.current_promise,
307
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
308
+ steps[1], arena),
309
+ arena);
300
310
  }
301
- steps.emplace_back(Json::FromObject(step1));
302
- Json::Object step2;
303
- step2["type"] = Json::FromString(std::string(TypeName<F1>()));
311
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
312
+ steps[2], StdStringToUpbString(TypeName<F1>()));
304
313
  if (state == State::kState2) {
305
- step2["polling_state"] = PromiseAsJson(current_promise);
314
+ PromiseAsProto(current_promise,
315
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
316
+ steps[2], arena),
317
+ arena);
306
318
  }
307
- steps.emplace_back(Json::FromObject(step2));
308
- obj["steps"] = Json::FromArray(steps);
309
- return Json::FromObject(obj);
310
319
  }
311
320
  GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION Poll<Result> PollOnce() {
312
321
  switch (state) {
@@ -481,41 +490,49 @@ struct SeqState<Traits, P, F0, F1, F2> {
481
490
  }
482
491
  GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION SeqState& operator=(SeqState&& other) =
483
492
  delete;
484
- Json ToJson(absl::string_view type_name) const {
485
- Json::Object obj;
486
- #ifndef NDEBUG
487
- obj["source_location"] =
488
- Json::FromString(absl::StrCat(whence.file(), ":", whence.line()));
489
- #endif
490
- obj["seq_type"] = Json::FromString(std::string(type_name));
491
- Json::Array steps;
492
- steps.reserve(4);
493
- Json::Object step0;
494
- step0["type"] = Json::FromString(std::string(TypeName<P>()));
493
+ void ToProto(grpc_channelz_v2_Promise_CompositionKind kind,
494
+ grpc_channelz_v2_Promise* promise_proto,
495
+ upb_Arena* arena) const {
496
+ auto* seq_promise =
497
+ grpc_channelz_v2_Promise_mutable_seq_promise(promise_proto, arena);
498
+ grpc_channelz_v2_Promise_Seq_set_kind(seq_promise, kind);
499
+ auto** steps =
500
+ grpc_channelz_v2_Promise_Seq_resize_steps(seq_promise, 4, arena);
501
+ for (int i = 0; i < 4; i++) {
502
+ steps[i] = grpc_channelz_v2_Promise_SeqStep_new(arena);
503
+ }
504
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
505
+ steps[0], StdStringToUpbString(TypeName<P>()));
495
506
  if (state == State::kState0) {
496
- step0["polling_state"] = PromiseAsJson(prior.prior.prior.current_promise);
507
+ PromiseAsProto(prior.prior.prior.current_promise,
508
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
509
+ steps[0], arena),
510
+ arena);
497
511
  }
498
- steps.emplace_back(Json::FromObject(step0));
499
- Json::Object step1;
500
- step1["type"] = Json::FromString(std::string(TypeName<F0>()));
512
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
513
+ steps[1], StdStringToUpbString(TypeName<F0>()));
501
514
  if (state == State::kState1) {
502
- step1["polling_state"] = PromiseAsJson(prior.prior.current_promise);
515
+ PromiseAsProto(prior.prior.current_promise,
516
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
517
+ steps[1], arena),
518
+ arena);
503
519
  }
504
- steps.emplace_back(Json::FromObject(step1));
505
- Json::Object step2;
506
- step2["type"] = Json::FromString(std::string(TypeName<F1>()));
520
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
521
+ steps[2], StdStringToUpbString(TypeName<F1>()));
507
522
  if (state == State::kState2) {
508
- step2["polling_state"] = PromiseAsJson(prior.current_promise);
523
+ PromiseAsProto(prior.current_promise,
524
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
525
+ steps[2], arena),
526
+ arena);
509
527
  }
510
- steps.emplace_back(Json::FromObject(step2));
511
- Json::Object step3;
512
- step3["type"] = Json::FromString(std::string(TypeName<F2>()));
528
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
529
+ steps[3], StdStringToUpbString(TypeName<F2>()));
513
530
  if (state == State::kState3) {
514
- step3["polling_state"] = PromiseAsJson(current_promise);
531
+ PromiseAsProto(current_promise,
532
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
533
+ steps[3], arena),
534
+ arena);
515
535
  }
516
- steps.emplace_back(Json::FromObject(step3));
517
- obj["steps"] = Json::FromArray(steps);
518
- return Json::FromObject(obj);
519
536
  }
520
537
  GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION Poll<Result> PollOnce() {
521
538
  switch (state) {
@@ -739,48 +756,57 @@ struct SeqState<Traits, P, F0, F1, F2, F3> {
739
756
  }
740
757
  GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION SeqState& operator=(SeqState&& other) =
741
758
  delete;
742
- Json ToJson(absl::string_view type_name) const {
743
- Json::Object obj;
744
- #ifndef NDEBUG
745
- obj["source_location"] =
746
- Json::FromString(absl::StrCat(whence.file(), ":", whence.line()));
747
- #endif
748
- obj["seq_type"] = Json::FromString(std::string(type_name));
749
- Json::Array steps;
750
- steps.reserve(5);
751
- Json::Object step0;
752
- step0["type"] = Json::FromString(std::string(TypeName<P>()));
759
+ void ToProto(grpc_channelz_v2_Promise_CompositionKind kind,
760
+ grpc_channelz_v2_Promise* promise_proto,
761
+ upb_Arena* arena) const {
762
+ auto* seq_promise =
763
+ grpc_channelz_v2_Promise_mutable_seq_promise(promise_proto, arena);
764
+ grpc_channelz_v2_Promise_Seq_set_kind(seq_promise, kind);
765
+ auto** steps =
766
+ grpc_channelz_v2_Promise_Seq_resize_steps(seq_promise, 5, arena);
767
+ for (int i = 0; i < 5; i++) {
768
+ steps[i] = grpc_channelz_v2_Promise_SeqStep_new(arena);
769
+ }
770
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
771
+ steps[0], StdStringToUpbString(TypeName<P>()));
753
772
  if (state == State::kState0) {
754
- step0["polling_state"] =
755
- PromiseAsJson(prior.prior.prior.prior.current_promise);
773
+ PromiseAsProto(prior.prior.prior.prior.current_promise,
774
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
775
+ steps[0], arena),
776
+ arena);
756
777
  }
757
- steps.emplace_back(Json::FromObject(step0));
758
- Json::Object step1;
759
- step1["type"] = Json::FromString(std::string(TypeName<F0>()));
778
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
779
+ steps[1], StdStringToUpbString(TypeName<F0>()));
760
780
  if (state == State::kState1) {
761
- step1["polling_state"] = PromiseAsJson(prior.prior.prior.current_promise);
781
+ PromiseAsProto(prior.prior.prior.current_promise,
782
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
783
+ steps[1], arena),
784
+ arena);
762
785
  }
763
- steps.emplace_back(Json::FromObject(step1));
764
- Json::Object step2;
765
- step2["type"] = Json::FromString(std::string(TypeName<F1>()));
786
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
787
+ steps[2], StdStringToUpbString(TypeName<F1>()));
766
788
  if (state == State::kState2) {
767
- step2["polling_state"] = PromiseAsJson(prior.prior.current_promise);
789
+ PromiseAsProto(prior.prior.current_promise,
790
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
791
+ steps[2], arena),
792
+ arena);
768
793
  }
769
- steps.emplace_back(Json::FromObject(step2));
770
- Json::Object step3;
771
- step3["type"] = Json::FromString(std::string(TypeName<F2>()));
794
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
795
+ steps[3], StdStringToUpbString(TypeName<F2>()));
772
796
  if (state == State::kState3) {
773
- step3["polling_state"] = PromiseAsJson(prior.current_promise);
797
+ PromiseAsProto(prior.current_promise,
798
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
799
+ steps[3], arena),
800
+ arena);
774
801
  }
775
- steps.emplace_back(Json::FromObject(step3));
776
- Json::Object step4;
777
- step4["type"] = Json::FromString(std::string(TypeName<F3>()));
802
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
803
+ steps[4], StdStringToUpbString(TypeName<F3>()));
778
804
  if (state == State::kState4) {
779
- step4["polling_state"] = PromiseAsJson(current_promise);
805
+ PromiseAsProto(current_promise,
806
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
807
+ steps[4], arena),
808
+ arena);
780
809
  }
781
- steps.emplace_back(Json::FromObject(step4));
782
- obj["steps"] = Json::FromArray(steps);
783
- return Json::FromObject(obj);
784
810
  }
785
811
  GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION Poll<Result> PollOnce() {
786
812
  switch (state) {
@@ -1062,55 +1088,65 @@ struct SeqState<Traits, P, F0, F1, F2, F3, F4> {
1062
1088
  }
1063
1089
  GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION SeqState& operator=(SeqState&& other) =
1064
1090
  delete;
1065
- Json ToJson(absl::string_view type_name) const {
1066
- Json::Object obj;
1067
- #ifndef NDEBUG
1068
- obj["source_location"] =
1069
- Json::FromString(absl::StrCat(whence.file(), ":", whence.line()));
1070
- #endif
1071
- obj["seq_type"] = Json::FromString(std::string(type_name));
1072
- Json::Array steps;
1073
- steps.reserve(6);
1074
- Json::Object step0;
1075
- step0["type"] = Json::FromString(std::string(TypeName<P>()));
1091
+ void ToProto(grpc_channelz_v2_Promise_CompositionKind kind,
1092
+ grpc_channelz_v2_Promise* promise_proto,
1093
+ upb_Arena* arena) const {
1094
+ auto* seq_promise =
1095
+ grpc_channelz_v2_Promise_mutable_seq_promise(promise_proto, arena);
1096
+ grpc_channelz_v2_Promise_Seq_set_kind(seq_promise, kind);
1097
+ auto** steps =
1098
+ grpc_channelz_v2_Promise_Seq_resize_steps(seq_promise, 6, arena);
1099
+ for (int i = 0; i < 6; i++) {
1100
+ steps[i] = grpc_channelz_v2_Promise_SeqStep_new(arena);
1101
+ }
1102
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
1103
+ steps[0], StdStringToUpbString(TypeName<P>()));
1076
1104
  if (state == State::kState0) {
1077
- step0["polling_state"] =
1078
- PromiseAsJson(prior.prior.prior.prior.prior.current_promise);
1105
+ PromiseAsProto(prior.prior.prior.prior.prior.current_promise,
1106
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
1107
+ steps[0], arena),
1108
+ arena);
1079
1109
  }
1080
- steps.emplace_back(Json::FromObject(step0));
1081
- Json::Object step1;
1082
- step1["type"] = Json::FromString(std::string(TypeName<F0>()));
1110
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
1111
+ steps[1], StdStringToUpbString(TypeName<F0>()));
1083
1112
  if (state == State::kState1) {
1084
- step1["polling_state"] =
1085
- PromiseAsJson(prior.prior.prior.prior.current_promise);
1113
+ PromiseAsProto(prior.prior.prior.prior.current_promise,
1114
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
1115
+ steps[1], arena),
1116
+ arena);
1086
1117
  }
1087
- steps.emplace_back(Json::FromObject(step1));
1088
- Json::Object step2;
1089
- step2["type"] = Json::FromString(std::string(TypeName<F1>()));
1118
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
1119
+ steps[2], StdStringToUpbString(TypeName<F1>()));
1090
1120
  if (state == State::kState2) {
1091
- step2["polling_state"] = PromiseAsJson(prior.prior.prior.current_promise);
1121
+ PromiseAsProto(prior.prior.prior.current_promise,
1122
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
1123
+ steps[2], arena),
1124
+ arena);
1092
1125
  }
1093
- steps.emplace_back(Json::FromObject(step2));
1094
- Json::Object step3;
1095
- step3["type"] = Json::FromString(std::string(TypeName<F2>()));
1126
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
1127
+ steps[3], StdStringToUpbString(TypeName<F2>()));
1096
1128
  if (state == State::kState3) {
1097
- step3["polling_state"] = PromiseAsJson(prior.prior.current_promise);
1129
+ PromiseAsProto(prior.prior.current_promise,
1130
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
1131
+ steps[3], arena),
1132
+ arena);
1098
1133
  }
1099
- steps.emplace_back(Json::FromObject(step3));
1100
- Json::Object step4;
1101
- step4["type"] = Json::FromString(std::string(TypeName<F3>()));
1134
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
1135
+ steps[4], StdStringToUpbString(TypeName<F3>()));
1102
1136
  if (state == State::kState4) {
1103
- step4["polling_state"] = PromiseAsJson(prior.current_promise);
1137
+ PromiseAsProto(prior.current_promise,
1138
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
1139
+ steps[4], arena),
1140
+ arena);
1104
1141
  }
1105
- steps.emplace_back(Json::FromObject(step4));
1106
- Json::Object step5;
1107
- step5["type"] = Json::FromString(std::string(TypeName<F4>()));
1142
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
1143
+ steps[5], StdStringToUpbString(TypeName<F4>()));
1108
1144
  if (state == State::kState5) {
1109
- step5["polling_state"] = PromiseAsJson(current_promise);
1145
+ PromiseAsProto(current_promise,
1146
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
1147
+ steps[5], arena),
1148
+ arena);
1110
1149
  }
1111
- steps.emplace_back(Json::FromObject(step5));
1112
- obj["steps"] = Json::FromArray(steps);
1113
- return Json::FromObject(obj);
1114
1150
  }
1115
1151
  GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION Poll<Result> PollOnce() {
1116
1152
  switch (state) {
@@ -1447,62 +1483,73 @@ struct SeqState<Traits, P, F0, F1, F2, F3, F4, F5> {
1447
1483
  }
1448
1484
  GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION SeqState& operator=(SeqState&& other) =
1449
1485
  delete;
1450
- Json ToJson(absl::string_view type_name) const {
1451
- Json::Object obj;
1452
- #ifndef NDEBUG
1453
- obj["source_location"] =
1454
- Json::FromString(absl::StrCat(whence.file(), ":", whence.line()));
1455
- #endif
1456
- obj["seq_type"] = Json::FromString(std::string(type_name));
1457
- Json::Array steps;
1458
- steps.reserve(7);
1459
- Json::Object step0;
1460
- step0["type"] = Json::FromString(std::string(TypeName<P>()));
1486
+ void ToProto(grpc_channelz_v2_Promise_CompositionKind kind,
1487
+ grpc_channelz_v2_Promise* promise_proto,
1488
+ upb_Arena* arena) const {
1489
+ auto* seq_promise =
1490
+ grpc_channelz_v2_Promise_mutable_seq_promise(promise_proto, arena);
1491
+ grpc_channelz_v2_Promise_Seq_set_kind(seq_promise, kind);
1492
+ auto** steps =
1493
+ grpc_channelz_v2_Promise_Seq_resize_steps(seq_promise, 7, arena);
1494
+ for (int i = 0; i < 7; i++) {
1495
+ steps[i] = grpc_channelz_v2_Promise_SeqStep_new(arena);
1496
+ }
1497
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
1498
+ steps[0], StdStringToUpbString(TypeName<P>()));
1461
1499
  if (state == State::kState0) {
1462
- step0["polling_state"] =
1463
- PromiseAsJson(prior.prior.prior.prior.prior.prior.current_promise);
1500
+ PromiseAsProto(prior.prior.prior.prior.prior.prior.current_promise,
1501
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
1502
+ steps[0], arena),
1503
+ arena);
1464
1504
  }
1465
- steps.emplace_back(Json::FromObject(step0));
1466
- Json::Object step1;
1467
- step1["type"] = Json::FromString(std::string(TypeName<F0>()));
1505
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
1506
+ steps[1], StdStringToUpbString(TypeName<F0>()));
1468
1507
  if (state == State::kState1) {
1469
- step1["polling_state"] =
1470
- PromiseAsJson(prior.prior.prior.prior.prior.current_promise);
1508
+ PromiseAsProto(prior.prior.prior.prior.prior.current_promise,
1509
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
1510
+ steps[1], arena),
1511
+ arena);
1471
1512
  }
1472
- steps.emplace_back(Json::FromObject(step1));
1473
- Json::Object step2;
1474
- step2["type"] = Json::FromString(std::string(TypeName<F1>()));
1513
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
1514
+ steps[2], StdStringToUpbString(TypeName<F1>()));
1475
1515
  if (state == State::kState2) {
1476
- step2["polling_state"] =
1477
- PromiseAsJson(prior.prior.prior.prior.current_promise);
1516
+ PromiseAsProto(prior.prior.prior.prior.current_promise,
1517
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
1518
+ steps[2], arena),
1519
+ arena);
1478
1520
  }
1479
- steps.emplace_back(Json::FromObject(step2));
1480
- Json::Object step3;
1481
- step3["type"] = Json::FromString(std::string(TypeName<F2>()));
1521
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
1522
+ steps[3], StdStringToUpbString(TypeName<F2>()));
1482
1523
  if (state == State::kState3) {
1483
- step3["polling_state"] = PromiseAsJson(prior.prior.prior.current_promise);
1524
+ PromiseAsProto(prior.prior.prior.current_promise,
1525
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
1526
+ steps[3], arena),
1527
+ arena);
1484
1528
  }
1485
- steps.emplace_back(Json::FromObject(step3));
1486
- Json::Object step4;
1487
- step4["type"] = Json::FromString(std::string(TypeName<F3>()));
1529
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
1530
+ steps[4], StdStringToUpbString(TypeName<F3>()));
1488
1531
  if (state == State::kState4) {
1489
- step4["polling_state"] = PromiseAsJson(prior.prior.current_promise);
1532
+ PromiseAsProto(prior.prior.current_promise,
1533
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
1534
+ steps[4], arena),
1535
+ arena);
1490
1536
  }
1491
- steps.emplace_back(Json::FromObject(step4));
1492
- Json::Object step5;
1493
- step5["type"] = Json::FromString(std::string(TypeName<F4>()));
1537
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
1538
+ steps[5], StdStringToUpbString(TypeName<F4>()));
1494
1539
  if (state == State::kState5) {
1495
- step5["polling_state"] = PromiseAsJson(prior.current_promise);
1540
+ PromiseAsProto(prior.current_promise,
1541
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
1542
+ steps[5], arena),
1543
+ arena);
1496
1544
  }
1497
- steps.emplace_back(Json::FromObject(step5));
1498
- Json::Object step6;
1499
- step6["type"] = Json::FromString(std::string(TypeName<F5>()));
1545
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
1546
+ steps[6], StdStringToUpbString(TypeName<F5>()));
1500
1547
  if (state == State::kState6) {
1501
- step6["polling_state"] = PromiseAsJson(current_promise);
1548
+ PromiseAsProto(current_promise,
1549
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
1550
+ steps[6], arena),
1551
+ arena);
1502
1552
  }
1503
- steps.emplace_back(Json::FromObject(step6));
1504
- obj["steps"] = Json::FromArray(steps);
1505
- return Json::FromObject(obj);
1506
1553
  }
1507
1554
  GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION Poll<Result> PollOnce() {
1508
1555
  switch (state) {
@@ -1895,69 +1942,81 @@ struct SeqState<Traits, P, F0, F1, F2, F3, F4, F5, F6> {
1895
1942
  }
1896
1943
  GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION SeqState& operator=(SeqState&& other) =
1897
1944
  delete;
1898
- Json ToJson(absl::string_view type_name) const {
1899
- Json::Object obj;
1900
- #ifndef NDEBUG
1901
- obj["source_location"] =
1902
- Json::FromString(absl::StrCat(whence.file(), ":", whence.line()));
1903
- #endif
1904
- obj["seq_type"] = Json::FromString(std::string(type_name));
1905
- Json::Array steps;
1906
- steps.reserve(8);
1907
- Json::Object step0;
1908
- step0["type"] = Json::FromString(std::string(TypeName<P>()));
1945
+ void ToProto(grpc_channelz_v2_Promise_CompositionKind kind,
1946
+ grpc_channelz_v2_Promise* promise_proto,
1947
+ upb_Arena* arena) const {
1948
+ auto* seq_promise =
1949
+ grpc_channelz_v2_Promise_mutable_seq_promise(promise_proto, arena);
1950
+ grpc_channelz_v2_Promise_Seq_set_kind(seq_promise, kind);
1951
+ auto** steps =
1952
+ grpc_channelz_v2_Promise_Seq_resize_steps(seq_promise, 8, arena);
1953
+ for (int i = 0; i < 8; i++) {
1954
+ steps[i] = grpc_channelz_v2_Promise_SeqStep_new(arena);
1955
+ }
1956
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
1957
+ steps[0], StdStringToUpbString(TypeName<P>()));
1909
1958
  if (state == State::kState0) {
1910
- step0["polling_state"] = PromiseAsJson(
1911
- prior.prior.prior.prior.prior.prior.prior.current_promise);
1959
+ PromiseAsProto(prior.prior.prior.prior.prior.prior.prior.current_promise,
1960
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
1961
+ steps[0], arena),
1962
+ arena);
1912
1963
  }
1913
- steps.emplace_back(Json::FromObject(step0));
1914
- Json::Object step1;
1915
- step1["type"] = Json::FromString(std::string(TypeName<F0>()));
1964
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
1965
+ steps[1], StdStringToUpbString(TypeName<F0>()));
1916
1966
  if (state == State::kState1) {
1917
- step1["polling_state"] =
1918
- PromiseAsJson(prior.prior.prior.prior.prior.prior.current_promise);
1967
+ PromiseAsProto(prior.prior.prior.prior.prior.prior.current_promise,
1968
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
1969
+ steps[1], arena),
1970
+ arena);
1919
1971
  }
1920
- steps.emplace_back(Json::FromObject(step1));
1921
- Json::Object step2;
1922
- step2["type"] = Json::FromString(std::string(TypeName<F1>()));
1972
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
1973
+ steps[2], StdStringToUpbString(TypeName<F1>()));
1923
1974
  if (state == State::kState2) {
1924
- step2["polling_state"] =
1925
- PromiseAsJson(prior.prior.prior.prior.prior.current_promise);
1975
+ PromiseAsProto(prior.prior.prior.prior.prior.current_promise,
1976
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
1977
+ steps[2], arena),
1978
+ arena);
1926
1979
  }
1927
- steps.emplace_back(Json::FromObject(step2));
1928
- Json::Object step3;
1929
- step3["type"] = Json::FromString(std::string(TypeName<F2>()));
1980
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
1981
+ steps[3], StdStringToUpbString(TypeName<F2>()));
1930
1982
  if (state == State::kState3) {
1931
- step3["polling_state"] =
1932
- PromiseAsJson(prior.prior.prior.prior.current_promise);
1983
+ PromiseAsProto(prior.prior.prior.prior.current_promise,
1984
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
1985
+ steps[3], arena),
1986
+ arena);
1933
1987
  }
1934
- steps.emplace_back(Json::FromObject(step3));
1935
- Json::Object step4;
1936
- step4["type"] = Json::FromString(std::string(TypeName<F3>()));
1988
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
1989
+ steps[4], StdStringToUpbString(TypeName<F3>()));
1937
1990
  if (state == State::kState4) {
1938
- step4["polling_state"] = PromiseAsJson(prior.prior.prior.current_promise);
1991
+ PromiseAsProto(prior.prior.prior.current_promise,
1992
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
1993
+ steps[4], arena),
1994
+ arena);
1939
1995
  }
1940
- steps.emplace_back(Json::FromObject(step4));
1941
- Json::Object step5;
1942
- step5["type"] = Json::FromString(std::string(TypeName<F4>()));
1996
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
1997
+ steps[5], StdStringToUpbString(TypeName<F4>()));
1943
1998
  if (state == State::kState5) {
1944
- step5["polling_state"] = PromiseAsJson(prior.prior.current_promise);
1999
+ PromiseAsProto(prior.prior.current_promise,
2000
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
2001
+ steps[5], arena),
2002
+ arena);
1945
2003
  }
1946
- steps.emplace_back(Json::FromObject(step5));
1947
- Json::Object step6;
1948
- step6["type"] = Json::FromString(std::string(TypeName<F5>()));
2004
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
2005
+ steps[6], StdStringToUpbString(TypeName<F5>()));
1949
2006
  if (state == State::kState6) {
1950
- step6["polling_state"] = PromiseAsJson(prior.current_promise);
2007
+ PromiseAsProto(prior.current_promise,
2008
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
2009
+ steps[6], arena),
2010
+ arena);
1951
2011
  }
1952
- steps.emplace_back(Json::FromObject(step6));
1953
- Json::Object step7;
1954
- step7["type"] = Json::FromString(std::string(TypeName<F6>()));
2012
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
2013
+ steps[7], StdStringToUpbString(TypeName<F6>()));
1955
2014
  if (state == State::kState7) {
1956
- step7["polling_state"] = PromiseAsJson(current_promise);
2015
+ PromiseAsProto(current_promise,
2016
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
2017
+ steps[7], arena),
2018
+ arena);
1957
2019
  }
1958
- steps.emplace_back(Json::FromObject(step7));
1959
- obj["steps"] = Json::FromArray(steps);
1960
- return Json::FromObject(obj);
1961
2020
  }
1962
2021
  GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION Poll<Result> PollOnce() {
1963
2022
  switch (state) {
@@ -2405,76 +2464,90 @@ struct SeqState<Traits, P, F0, F1, F2, F3, F4, F5, F6, F7> {
2405
2464
  }
2406
2465
  GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION SeqState& operator=(SeqState&& other) =
2407
2466
  delete;
2408
- Json ToJson(absl::string_view type_name) const {
2409
- Json::Object obj;
2410
- #ifndef NDEBUG
2411
- obj["source_location"] =
2412
- Json::FromString(absl::StrCat(whence.file(), ":", whence.line()));
2413
- #endif
2414
- obj["seq_type"] = Json::FromString(std::string(type_name));
2415
- Json::Array steps;
2416
- steps.reserve(9);
2417
- Json::Object step0;
2418
- step0["type"] = Json::FromString(std::string(TypeName<P>()));
2467
+ void ToProto(grpc_channelz_v2_Promise_CompositionKind kind,
2468
+ grpc_channelz_v2_Promise* promise_proto,
2469
+ upb_Arena* arena) const {
2470
+ auto* seq_promise =
2471
+ grpc_channelz_v2_Promise_mutable_seq_promise(promise_proto, arena);
2472
+ grpc_channelz_v2_Promise_Seq_set_kind(seq_promise, kind);
2473
+ auto** steps =
2474
+ grpc_channelz_v2_Promise_Seq_resize_steps(seq_promise, 9, arena);
2475
+ for (int i = 0; i < 9; i++) {
2476
+ steps[i] = grpc_channelz_v2_Promise_SeqStep_new(arena);
2477
+ }
2478
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
2479
+ steps[0], StdStringToUpbString(TypeName<P>()));
2419
2480
  if (state == State::kState0) {
2420
- step0["polling_state"] = PromiseAsJson(
2421
- prior.prior.prior.prior.prior.prior.prior.prior.current_promise);
2481
+ PromiseAsProto(
2482
+ prior.prior.prior.prior.prior.prior.prior.prior.current_promise,
2483
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(steps[0],
2484
+ arena),
2485
+ arena);
2422
2486
  }
2423
- steps.emplace_back(Json::FromObject(step0));
2424
- Json::Object step1;
2425
- step1["type"] = Json::FromString(std::string(TypeName<F0>()));
2487
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
2488
+ steps[1], StdStringToUpbString(TypeName<F0>()));
2426
2489
  if (state == State::kState1) {
2427
- step1["polling_state"] = PromiseAsJson(
2428
- prior.prior.prior.prior.prior.prior.prior.current_promise);
2490
+ PromiseAsProto(prior.prior.prior.prior.prior.prior.prior.current_promise,
2491
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
2492
+ steps[1], arena),
2493
+ arena);
2429
2494
  }
2430
- steps.emplace_back(Json::FromObject(step1));
2431
- Json::Object step2;
2432
- step2["type"] = Json::FromString(std::string(TypeName<F1>()));
2495
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
2496
+ steps[2], StdStringToUpbString(TypeName<F1>()));
2433
2497
  if (state == State::kState2) {
2434
- step2["polling_state"] =
2435
- PromiseAsJson(prior.prior.prior.prior.prior.prior.current_promise);
2498
+ PromiseAsProto(prior.prior.prior.prior.prior.prior.current_promise,
2499
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
2500
+ steps[2], arena),
2501
+ arena);
2436
2502
  }
2437
- steps.emplace_back(Json::FromObject(step2));
2438
- Json::Object step3;
2439
- step3["type"] = Json::FromString(std::string(TypeName<F2>()));
2503
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
2504
+ steps[3], StdStringToUpbString(TypeName<F2>()));
2440
2505
  if (state == State::kState3) {
2441
- step3["polling_state"] =
2442
- PromiseAsJson(prior.prior.prior.prior.prior.current_promise);
2506
+ PromiseAsProto(prior.prior.prior.prior.prior.current_promise,
2507
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
2508
+ steps[3], arena),
2509
+ arena);
2443
2510
  }
2444
- steps.emplace_back(Json::FromObject(step3));
2445
- Json::Object step4;
2446
- step4["type"] = Json::FromString(std::string(TypeName<F3>()));
2511
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
2512
+ steps[4], StdStringToUpbString(TypeName<F3>()));
2447
2513
  if (state == State::kState4) {
2448
- step4["polling_state"] =
2449
- PromiseAsJson(prior.prior.prior.prior.current_promise);
2514
+ PromiseAsProto(prior.prior.prior.prior.current_promise,
2515
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
2516
+ steps[4], arena),
2517
+ arena);
2450
2518
  }
2451
- steps.emplace_back(Json::FromObject(step4));
2452
- Json::Object step5;
2453
- step5["type"] = Json::FromString(std::string(TypeName<F4>()));
2519
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
2520
+ steps[5], StdStringToUpbString(TypeName<F4>()));
2454
2521
  if (state == State::kState5) {
2455
- step5["polling_state"] = PromiseAsJson(prior.prior.prior.current_promise);
2522
+ PromiseAsProto(prior.prior.prior.current_promise,
2523
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
2524
+ steps[5], arena),
2525
+ arena);
2456
2526
  }
2457
- steps.emplace_back(Json::FromObject(step5));
2458
- Json::Object step6;
2459
- step6["type"] = Json::FromString(std::string(TypeName<F5>()));
2527
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
2528
+ steps[6], StdStringToUpbString(TypeName<F5>()));
2460
2529
  if (state == State::kState6) {
2461
- step6["polling_state"] = PromiseAsJson(prior.prior.current_promise);
2530
+ PromiseAsProto(prior.prior.current_promise,
2531
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
2532
+ steps[6], arena),
2533
+ arena);
2462
2534
  }
2463
- steps.emplace_back(Json::FromObject(step6));
2464
- Json::Object step7;
2465
- step7["type"] = Json::FromString(std::string(TypeName<F6>()));
2535
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
2536
+ steps[7], StdStringToUpbString(TypeName<F6>()));
2466
2537
  if (state == State::kState7) {
2467
- step7["polling_state"] = PromiseAsJson(prior.current_promise);
2538
+ PromiseAsProto(prior.current_promise,
2539
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
2540
+ steps[7], arena),
2541
+ arena);
2468
2542
  }
2469
- steps.emplace_back(Json::FromObject(step7));
2470
- Json::Object step8;
2471
- step8["type"] = Json::FromString(std::string(TypeName<F7>()));
2543
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
2544
+ steps[8], StdStringToUpbString(TypeName<F7>()));
2472
2545
  if (state == State::kState8) {
2473
- step8["polling_state"] = PromiseAsJson(current_promise);
2546
+ PromiseAsProto(current_promise,
2547
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
2548
+ steps[8], arena),
2549
+ arena);
2474
2550
  }
2475
- steps.emplace_back(Json::FromObject(step8));
2476
- obj["steps"] = Json::FromArray(steps);
2477
- return Json::FromObject(obj);
2478
2551
  }
2479
2552
  GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION Poll<Result> PollOnce() {
2480
2553
  switch (state) {
@@ -2985,84 +3058,99 @@ struct SeqState<Traits, P, F0, F1, F2, F3, F4, F5, F6, F7, F8> {
2985
3058
  }
2986
3059
  GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION SeqState& operator=(SeqState&& other) =
2987
3060
  delete;
2988
- Json ToJson(absl::string_view type_name) const {
2989
- Json::Object obj;
2990
- #ifndef NDEBUG
2991
- obj["source_location"] =
2992
- Json::FromString(absl::StrCat(whence.file(), ":", whence.line()));
2993
- #endif
2994
- obj["seq_type"] = Json::FromString(std::string(type_name));
2995
- Json::Array steps;
2996
- steps.reserve(10);
2997
- Json::Object step0;
2998
- step0["type"] = Json::FromString(std::string(TypeName<P>()));
3061
+ void ToProto(grpc_channelz_v2_Promise_CompositionKind kind,
3062
+ grpc_channelz_v2_Promise* promise_proto,
3063
+ upb_Arena* arena) const {
3064
+ auto* seq_promise =
3065
+ grpc_channelz_v2_Promise_mutable_seq_promise(promise_proto, arena);
3066
+ grpc_channelz_v2_Promise_Seq_set_kind(seq_promise, kind);
3067
+ auto** steps =
3068
+ grpc_channelz_v2_Promise_Seq_resize_steps(seq_promise, 10, arena);
3069
+ for (int i = 0; i < 10; i++) {
3070
+ steps[i] = grpc_channelz_v2_Promise_SeqStep_new(arena);
3071
+ }
3072
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
3073
+ steps[0], StdStringToUpbString(TypeName<P>()));
2999
3074
  if (state == State::kState0) {
3000
- step0["polling_state"] =
3001
- PromiseAsJson(prior.prior.prior.prior.prior.prior.prior.prior.prior
3002
- .current_promise);
3075
+ PromiseAsProto(
3076
+ prior.prior.prior.prior.prior.prior.prior.prior.prior.current_promise,
3077
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(steps[0],
3078
+ arena),
3079
+ arena);
3003
3080
  }
3004
- steps.emplace_back(Json::FromObject(step0));
3005
- Json::Object step1;
3006
- step1["type"] = Json::FromString(std::string(TypeName<F0>()));
3081
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
3082
+ steps[1], StdStringToUpbString(TypeName<F0>()));
3007
3083
  if (state == State::kState1) {
3008
- step1["polling_state"] = PromiseAsJson(
3009
- prior.prior.prior.prior.prior.prior.prior.prior.current_promise);
3084
+ PromiseAsProto(
3085
+ prior.prior.prior.prior.prior.prior.prior.prior.current_promise,
3086
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(steps[1],
3087
+ arena),
3088
+ arena);
3010
3089
  }
3011
- steps.emplace_back(Json::FromObject(step1));
3012
- Json::Object step2;
3013
- step2["type"] = Json::FromString(std::string(TypeName<F1>()));
3090
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
3091
+ steps[2], StdStringToUpbString(TypeName<F1>()));
3014
3092
  if (state == State::kState2) {
3015
- step2["polling_state"] = PromiseAsJson(
3016
- prior.prior.prior.prior.prior.prior.prior.current_promise);
3093
+ PromiseAsProto(prior.prior.prior.prior.prior.prior.prior.current_promise,
3094
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
3095
+ steps[2], arena),
3096
+ arena);
3017
3097
  }
3018
- steps.emplace_back(Json::FromObject(step2));
3019
- Json::Object step3;
3020
- step3["type"] = Json::FromString(std::string(TypeName<F2>()));
3098
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
3099
+ steps[3], StdStringToUpbString(TypeName<F2>()));
3021
3100
  if (state == State::kState3) {
3022
- step3["polling_state"] =
3023
- PromiseAsJson(prior.prior.prior.prior.prior.prior.current_promise);
3101
+ PromiseAsProto(prior.prior.prior.prior.prior.prior.current_promise,
3102
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
3103
+ steps[3], arena),
3104
+ arena);
3024
3105
  }
3025
- steps.emplace_back(Json::FromObject(step3));
3026
- Json::Object step4;
3027
- step4["type"] = Json::FromString(std::string(TypeName<F3>()));
3106
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
3107
+ steps[4], StdStringToUpbString(TypeName<F3>()));
3028
3108
  if (state == State::kState4) {
3029
- step4["polling_state"] =
3030
- PromiseAsJson(prior.prior.prior.prior.prior.current_promise);
3109
+ PromiseAsProto(prior.prior.prior.prior.prior.current_promise,
3110
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
3111
+ steps[4], arena),
3112
+ arena);
3031
3113
  }
3032
- steps.emplace_back(Json::FromObject(step4));
3033
- Json::Object step5;
3034
- step5["type"] = Json::FromString(std::string(TypeName<F4>()));
3114
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
3115
+ steps[5], StdStringToUpbString(TypeName<F4>()));
3035
3116
  if (state == State::kState5) {
3036
- step5["polling_state"] =
3037
- PromiseAsJson(prior.prior.prior.prior.current_promise);
3117
+ PromiseAsProto(prior.prior.prior.prior.current_promise,
3118
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
3119
+ steps[5], arena),
3120
+ arena);
3038
3121
  }
3039
- steps.emplace_back(Json::FromObject(step5));
3040
- Json::Object step6;
3041
- step6["type"] = Json::FromString(std::string(TypeName<F5>()));
3122
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
3123
+ steps[6], StdStringToUpbString(TypeName<F5>()));
3042
3124
  if (state == State::kState6) {
3043
- step6["polling_state"] = PromiseAsJson(prior.prior.prior.current_promise);
3125
+ PromiseAsProto(prior.prior.prior.current_promise,
3126
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
3127
+ steps[6], arena),
3128
+ arena);
3044
3129
  }
3045
- steps.emplace_back(Json::FromObject(step6));
3046
- Json::Object step7;
3047
- step7["type"] = Json::FromString(std::string(TypeName<F6>()));
3130
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
3131
+ steps[7], StdStringToUpbString(TypeName<F6>()));
3048
3132
  if (state == State::kState7) {
3049
- step7["polling_state"] = PromiseAsJson(prior.prior.current_promise);
3133
+ PromiseAsProto(prior.prior.current_promise,
3134
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
3135
+ steps[7], arena),
3136
+ arena);
3050
3137
  }
3051
- steps.emplace_back(Json::FromObject(step7));
3052
- Json::Object step8;
3053
- step8["type"] = Json::FromString(std::string(TypeName<F7>()));
3138
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
3139
+ steps[8], StdStringToUpbString(TypeName<F7>()));
3054
3140
  if (state == State::kState8) {
3055
- step8["polling_state"] = PromiseAsJson(prior.current_promise);
3141
+ PromiseAsProto(prior.current_promise,
3142
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
3143
+ steps[8], arena),
3144
+ arena);
3056
3145
  }
3057
- steps.emplace_back(Json::FromObject(step8));
3058
- Json::Object step9;
3059
- step9["type"] = Json::FromString(std::string(TypeName<F8>()));
3146
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
3147
+ steps[9], StdStringToUpbString(TypeName<F8>()));
3060
3148
  if (state == State::kState9) {
3061
- step9["polling_state"] = PromiseAsJson(current_promise);
3149
+ PromiseAsProto(current_promise,
3150
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
3151
+ steps[9], arena),
3152
+ arena);
3062
3153
  }
3063
- steps.emplace_back(Json::FromObject(step9));
3064
- obj["steps"] = Json::FromArray(steps);
3065
- return Json::FromObject(obj);
3066
3154
  }
3067
3155
  GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION Poll<Result> PollOnce() {
3068
3156
  switch (state) {
@@ -3635,92 +3723,108 @@ struct SeqState<Traits, P, F0, F1, F2, F3, F4, F5, F6, F7, F8, F9> {
3635
3723
  }
3636
3724
  GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION SeqState& operator=(SeqState&& other) =
3637
3725
  delete;
3638
- Json ToJson(absl::string_view type_name) const {
3639
- Json::Object obj;
3640
- #ifndef NDEBUG
3641
- obj["source_location"] =
3642
- Json::FromString(absl::StrCat(whence.file(), ":", whence.line()));
3643
- #endif
3644
- obj["seq_type"] = Json::FromString(std::string(type_name));
3645
- Json::Array steps;
3646
- steps.reserve(11);
3647
- Json::Object step0;
3648
- step0["type"] = Json::FromString(std::string(TypeName<P>()));
3726
+ void ToProto(grpc_channelz_v2_Promise_CompositionKind kind,
3727
+ grpc_channelz_v2_Promise* promise_proto,
3728
+ upb_Arena* arena) const {
3729
+ auto* seq_promise =
3730
+ grpc_channelz_v2_Promise_mutable_seq_promise(promise_proto, arena);
3731
+ grpc_channelz_v2_Promise_Seq_set_kind(seq_promise, kind);
3732
+ auto** steps =
3733
+ grpc_channelz_v2_Promise_Seq_resize_steps(seq_promise, 11, arena);
3734
+ for (int i = 0; i < 11; i++) {
3735
+ steps[i] = grpc_channelz_v2_Promise_SeqStep_new(arena);
3736
+ }
3737
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
3738
+ steps[0], StdStringToUpbString(TypeName<P>()));
3649
3739
  if (state == State::kState0) {
3650
- step0["polling_state"] =
3651
- PromiseAsJson(prior.prior.prior.prior.prior.prior.prior.prior.prior
3652
- .prior.current_promise);
3740
+ PromiseAsProto(prior.prior.prior.prior.prior.prior.prior.prior.prior.prior
3741
+ .current_promise,
3742
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
3743
+ steps[0], arena),
3744
+ arena);
3653
3745
  }
3654
- steps.emplace_back(Json::FromObject(step0));
3655
- Json::Object step1;
3656
- step1["type"] = Json::FromString(std::string(TypeName<F0>()));
3746
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
3747
+ steps[1], StdStringToUpbString(TypeName<F0>()));
3657
3748
  if (state == State::kState1) {
3658
- step1["polling_state"] =
3659
- PromiseAsJson(prior.prior.prior.prior.prior.prior.prior.prior.prior
3660
- .current_promise);
3749
+ PromiseAsProto(
3750
+ prior.prior.prior.prior.prior.prior.prior.prior.prior.current_promise,
3751
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(steps[1],
3752
+ arena),
3753
+ arena);
3661
3754
  }
3662
- steps.emplace_back(Json::FromObject(step1));
3663
- Json::Object step2;
3664
- step2["type"] = Json::FromString(std::string(TypeName<F1>()));
3755
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
3756
+ steps[2], StdStringToUpbString(TypeName<F1>()));
3665
3757
  if (state == State::kState2) {
3666
- step2["polling_state"] = PromiseAsJson(
3667
- prior.prior.prior.prior.prior.prior.prior.prior.current_promise);
3758
+ PromiseAsProto(
3759
+ prior.prior.prior.prior.prior.prior.prior.prior.current_promise,
3760
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(steps[2],
3761
+ arena),
3762
+ arena);
3668
3763
  }
3669
- steps.emplace_back(Json::FromObject(step2));
3670
- Json::Object step3;
3671
- step3["type"] = Json::FromString(std::string(TypeName<F2>()));
3764
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
3765
+ steps[3], StdStringToUpbString(TypeName<F2>()));
3672
3766
  if (state == State::kState3) {
3673
- step3["polling_state"] = PromiseAsJson(
3674
- prior.prior.prior.prior.prior.prior.prior.current_promise);
3767
+ PromiseAsProto(prior.prior.prior.prior.prior.prior.prior.current_promise,
3768
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
3769
+ steps[3], arena),
3770
+ arena);
3675
3771
  }
3676
- steps.emplace_back(Json::FromObject(step3));
3677
- Json::Object step4;
3678
- step4["type"] = Json::FromString(std::string(TypeName<F3>()));
3772
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
3773
+ steps[4], StdStringToUpbString(TypeName<F3>()));
3679
3774
  if (state == State::kState4) {
3680
- step4["polling_state"] =
3681
- PromiseAsJson(prior.prior.prior.prior.prior.prior.current_promise);
3775
+ PromiseAsProto(prior.prior.prior.prior.prior.prior.current_promise,
3776
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
3777
+ steps[4], arena),
3778
+ arena);
3682
3779
  }
3683
- steps.emplace_back(Json::FromObject(step4));
3684
- Json::Object step5;
3685
- step5["type"] = Json::FromString(std::string(TypeName<F4>()));
3780
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
3781
+ steps[5], StdStringToUpbString(TypeName<F4>()));
3686
3782
  if (state == State::kState5) {
3687
- step5["polling_state"] =
3688
- PromiseAsJson(prior.prior.prior.prior.prior.current_promise);
3783
+ PromiseAsProto(prior.prior.prior.prior.prior.current_promise,
3784
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
3785
+ steps[5], arena),
3786
+ arena);
3689
3787
  }
3690
- steps.emplace_back(Json::FromObject(step5));
3691
- Json::Object step6;
3692
- step6["type"] = Json::FromString(std::string(TypeName<F5>()));
3788
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
3789
+ steps[6], StdStringToUpbString(TypeName<F5>()));
3693
3790
  if (state == State::kState6) {
3694
- step6["polling_state"] =
3695
- PromiseAsJson(prior.prior.prior.prior.current_promise);
3791
+ PromiseAsProto(prior.prior.prior.prior.current_promise,
3792
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
3793
+ steps[6], arena),
3794
+ arena);
3696
3795
  }
3697
- steps.emplace_back(Json::FromObject(step6));
3698
- Json::Object step7;
3699
- step7["type"] = Json::FromString(std::string(TypeName<F6>()));
3796
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
3797
+ steps[7], StdStringToUpbString(TypeName<F6>()));
3700
3798
  if (state == State::kState7) {
3701
- step7["polling_state"] = PromiseAsJson(prior.prior.prior.current_promise);
3799
+ PromiseAsProto(prior.prior.prior.current_promise,
3800
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
3801
+ steps[7], arena),
3802
+ arena);
3702
3803
  }
3703
- steps.emplace_back(Json::FromObject(step7));
3704
- Json::Object step8;
3705
- step8["type"] = Json::FromString(std::string(TypeName<F7>()));
3804
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
3805
+ steps[8], StdStringToUpbString(TypeName<F7>()));
3706
3806
  if (state == State::kState8) {
3707
- step8["polling_state"] = PromiseAsJson(prior.prior.current_promise);
3807
+ PromiseAsProto(prior.prior.current_promise,
3808
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
3809
+ steps[8], arena),
3810
+ arena);
3708
3811
  }
3709
- steps.emplace_back(Json::FromObject(step8));
3710
- Json::Object step9;
3711
- step9["type"] = Json::FromString(std::string(TypeName<F8>()));
3812
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
3813
+ steps[9], StdStringToUpbString(TypeName<F8>()));
3712
3814
  if (state == State::kState9) {
3713
- step9["polling_state"] = PromiseAsJson(prior.current_promise);
3815
+ PromiseAsProto(prior.current_promise,
3816
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
3817
+ steps[9], arena),
3818
+ arena);
3714
3819
  }
3715
- steps.emplace_back(Json::FromObject(step9));
3716
- Json::Object step10;
3717
- step10["type"] = Json::FromString(std::string(TypeName<F9>()));
3820
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
3821
+ steps[10], StdStringToUpbString(TypeName<F9>()));
3718
3822
  if (state == State::kState10) {
3719
- step10["polling_state"] = PromiseAsJson(current_promise);
3823
+ PromiseAsProto(current_promise,
3824
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
3825
+ steps[10], arena),
3826
+ arena);
3720
3827
  }
3721
- steps.emplace_back(Json::FromObject(step10));
3722
- obj["steps"] = Json::FromArray(steps);
3723
- return Json::FromObject(obj);
3724
3828
  }
3725
3829
  GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION Poll<Result> PollOnce() {
3726
3830
  switch (state) {
@@ -4356,100 +4460,117 @@ struct SeqState<Traits, P, F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10> {
4356
4460
  }
4357
4461
  GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION SeqState& operator=(SeqState&& other) =
4358
4462
  delete;
4359
- Json ToJson(absl::string_view type_name) const {
4360
- Json::Object obj;
4361
- #ifndef NDEBUG
4362
- obj["source_location"] =
4363
- Json::FromString(absl::StrCat(whence.file(), ":", whence.line()));
4364
- #endif
4365
- obj["seq_type"] = Json::FromString(std::string(type_name));
4366
- Json::Array steps;
4367
- steps.reserve(12);
4368
- Json::Object step0;
4369
- step0["type"] = Json::FromString(std::string(TypeName<P>()));
4463
+ void ToProto(grpc_channelz_v2_Promise_CompositionKind kind,
4464
+ grpc_channelz_v2_Promise* promise_proto,
4465
+ upb_Arena* arena) const {
4466
+ auto* seq_promise =
4467
+ grpc_channelz_v2_Promise_mutable_seq_promise(promise_proto, arena);
4468
+ grpc_channelz_v2_Promise_Seq_set_kind(seq_promise, kind);
4469
+ auto** steps =
4470
+ grpc_channelz_v2_Promise_Seq_resize_steps(seq_promise, 12, arena);
4471
+ for (int i = 0; i < 12; i++) {
4472
+ steps[i] = grpc_channelz_v2_Promise_SeqStep_new(arena);
4473
+ }
4474
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
4475
+ steps[0], StdStringToUpbString(TypeName<P>()));
4370
4476
  if (state == State::kState0) {
4371
- step0["polling_state"] =
4372
- PromiseAsJson(prior.prior.prior.prior.prior.prior.prior.prior.prior
4373
- .prior.prior.current_promise);
4477
+ PromiseAsProto(prior.prior.prior.prior.prior.prior.prior.prior.prior.prior
4478
+ .prior.current_promise,
4479
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
4480
+ steps[0], arena),
4481
+ arena);
4374
4482
  }
4375
- steps.emplace_back(Json::FromObject(step0));
4376
- Json::Object step1;
4377
- step1["type"] = Json::FromString(std::string(TypeName<F0>()));
4483
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
4484
+ steps[1], StdStringToUpbString(TypeName<F0>()));
4378
4485
  if (state == State::kState1) {
4379
- step1["polling_state"] =
4380
- PromiseAsJson(prior.prior.prior.prior.prior.prior.prior.prior.prior
4381
- .prior.current_promise);
4486
+ PromiseAsProto(prior.prior.prior.prior.prior.prior.prior.prior.prior.prior
4487
+ .current_promise,
4488
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
4489
+ steps[1], arena),
4490
+ arena);
4382
4491
  }
4383
- steps.emplace_back(Json::FromObject(step1));
4384
- Json::Object step2;
4385
- step2["type"] = Json::FromString(std::string(TypeName<F1>()));
4492
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
4493
+ steps[2], StdStringToUpbString(TypeName<F1>()));
4386
4494
  if (state == State::kState2) {
4387
- step2["polling_state"] =
4388
- PromiseAsJson(prior.prior.prior.prior.prior.prior.prior.prior.prior
4389
- .current_promise);
4495
+ PromiseAsProto(
4496
+ prior.prior.prior.prior.prior.prior.prior.prior.prior.current_promise,
4497
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(steps[2],
4498
+ arena),
4499
+ arena);
4390
4500
  }
4391
- steps.emplace_back(Json::FromObject(step2));
4392
- Json::Object step3;
4393
- step3["type"] = Json::FromString(std::string(TypeName<F2>()));
4501
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
4502
+ steps[3], StdStringToUpbString(TypeName<F2>()));
4394
4503
  if (state == State::kState3) {
4395
- step3["polling_state"] = PromiseAsJson(
4396
- prior.prior.prior.prior.prior.prior.prior.prior.current_promise);
4504
+ PromiseAsProto(
4505
+ prior.prior.prior.prior.prior.prior.prior.prior.current_promise,
4506
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(steps[3],
4507
+ arena),
4508
+ arena);
4397
4509
  }
4398
- steps.emplace_back(Json::FromObject(step3));
4399
- Json::Object step4;
4400
- step4["type"] = Json::FromString(std::string(TypeName<F3>()));
4510
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
4511
+ steps[4], StdStringToUpbString(TypeName<F3>()));
4401
4512
  if (state == State::kState4) {
4402
- step4["polling_state"] = PromiseAsJson(
4403
- prior.prior.prior.prior.prior.prior.prior.current_promise);
4513
+ PromiseAsProto(prior.prior.prior.prior.prior.prior.prior.current_promise,
4514
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
4515
+ steps[4], arena),
4516
+ arena);
4404
4517
  }
4405
- steps.emplace_back(Json::FromObject(step4));
4406
- Json::Object step5;
4407
- step5["type"] = Json::FromString(std::string(TypeName<F4>()));
4518
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
4519
+ steps[5], StdStringToUpbString(TypeName<F4>()));
4408
4520
  if (state == State::kState5) {
4409
- step5["polling_state"] =
4410
- PromiseAsJson(prior.prior.prior.prior.prior.prior.current_promise);
4521
+ PromiseAsProto(prior.prior.prior.prior.prior.prior.current_promise,
4522
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
4523
+ steps[5], arena),
4524
+ arena);
4411
4525
  }
4412
- steps.emplace_back(Json::FromObject(step5));
4413
- Json::Object step6;
4414
- step6["type"] = Json::FromString(std::string(TypeName<F5>()));
4526
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
4527
+ steps[6], StdStringToUpbString(TypeName<F5>()));
4415
4528
  if (state == State::kState6) {
4416
- step6["polling_state"] =
4417
- PromiseAsJson(prior.prior.prior.prior.prior.current_promise);
4529
+ PromiseAsProto(prior.prior.prior.prior.prior.current_promise,
4530
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
4531
+ steps[6], arena),
4532
+ arena);
4418
4533
  }
4419
- steps.emplace_back(Json::FromObject(step6));
4420
- Json::Object step7;
4421
- step7["type"] = Json::FromString(std::string(TypeName<F6>()));
4534
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
4535
+ steps[7], StdStringToUpbString(TypeName<F6>()));
4422
4536
  if (state == State::kState7) {
4423
- step7["polling_state"] =
4424
- PromiseAsJson(prior.prior.prior.prior.current_promise);
4537
+ PromiseAsProto(prior.prior.prior.prior.current_promise,
4538
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
4539
+ steps[7], arena),
4540
+ arena);
4425
4541
  }
4426
- steps.emplace_back(Json::FromObject(step7));
4427
- Json::Object step8;
4428
- step8["type"] = Json::FromString(std::string(TypeName<F7>()));
4542
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
4543
+ steps[8], StdStringToUpbString(TypeName<F7>()));
4429
4544
  if (state == State::kState8) {
4430
- step8["polling_state"] = PromiseAsJson(prior.prior.prior.current_promise);
4545
+ PromiseAsProto(prior.prior.prior.current_promise,
4546
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
4547
+ steps[8], arena),
4548
+ arena);
4431
4549
  }
4432
- steps.emplace_back(Json::FromObject(step8));
4433
- Json::Object step9;
4434
- step9["type"] = Json::FromString(std::string(TypeName<F8>()));
4550
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
4551
+ steps[9], StdStringToUpbString(TypeName<F8>()));
4435
4552
  if (state == State::kState9) {
4436
- step9["polling_state"] = PromiseAsJson(prior.prior.current_promise);
4553
+ PromiseAsProto(prior.prior.current_promise,
4554
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
4555
+ steps[9], arena),
4556
+ arena);
4437
4557
  }
4438
- steps.emplace_back(Json::FromObject(step9));
4439
- Json::Object step10;
4440
- step10["type"] = Json::FromString(std::string(TypeName<F9>()));
4558
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
4559
+ steps[10], StdStringToUpbString(TypeName<F9>()));
4441
4560
  if (state == State::kState10) {
4442
- step10["polling_state"] = PromiseAsJson(prior.current_promise);
4561
+ PromiseAsProto(prior.current_promise,
4562
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
4563
+ steps[10], arena),
4564
+ arena);
4443
4565
  }
4444
- steps.emplace_back(Json::FromObject(step10));
4445
- Json::Object step11;
4446
- step11["type"] = Json::FromString(std::string(TypeName<F10>()));
4566
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
4567
+ steps[11], StdStringToUpbString(TypeName<F10>()));
4447
4568
  if (state == State::kState11) {
4448
- step11["polling_state"] = PromiseAsJson(current_promise);
4569
+ PromiseAsProto(current_promise,
4570
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
4571
+ steps[11], arena),
4572
+ arena);
4449
4573
  }
4450
- steps.emplace_back(Json::FromObject(step11));
4451
- obj["steps"] = Json::FromArray(steps);
4452
- return Json::FromObject(obj);
4453
4574
  }
4454
4575
  GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION Poll<Result> PollOnce() {
4455
4576
  switch (state) {
@@ -5151,108 +5272,126 @@ struct SeqState<Traits, P, F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11> {
5151
5272
  }
5152
5273
  GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION SeqState& operator=(SeqState&& other) =
5153
5274
  delete;
5154
- Json ToJson(absl::string_view type_name) const {
5155
- Json::Object obj;
5156
- #ifndef NDEBUG
5157
- obj["source_location"] =
5158
- Json::FromString(absl::StrCat(whence.file(), ":", whence.line()));
5159
- #endif
5160
- obj["seq_type"] = Json::FromString(std::string(type_name));
5161
- Json::Array steps;
5162
- steps.reserve(13);
5163
- Json::Object step0;
5164
- step0["type"] = Json::FromString(std::string(TypeName<P>()));
5275
+ void ToProto(grpc_channelz_v2_Promise_CompositionKind kind,
5276
+ grpc_channelz_v2_Promise* promise_proto,
5277
+ upb_Arena* arena) const {
5278
+ auto* seq_promise =
5279
+ grpc_channelz_v2_Promise_mutable_seq_promise(promise_proto, arena);
5280
+ grpc_channelz_v2_Promise_Seq_set_kind(seq_promise, kind);
5281
+ auto** steps =
5282
+ grpc_channelz_v2_Promise_Seq_resize_steps(seq_promise, 13, arena);
5283
+ for (int i = 0; i < 13; i++) {
5284
+ steps[i] = grpc_channelz_v2_Promise_SeqStep_new(arena);
5285
+ }
5286
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
5287
+ steps[0], StdStringToUpbString(TypeName<P>()));
5165
5288
  if (state == State::kState0) {
5166
- step0["polling_state"] =
5167
- PromiseAsJson(prior.prior.prior.prior.prior.prior.prior.prior.prior
5168
- .prior.prior.prior.current_promise);
5289
+ PromiseAsProto(prior.prior.prior.prior.prior.prior.prior.prior.prior.prior
5290
+ .prior.prior.current_promise,
5291
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
5292
+ steps[0], arena),
5293
+ arena);
5169
5294
  }
5170
- steps.emplace_back(Json::FromObject(step0));
5171
- Json::Object step1;
5172
- step1["type"] = Json::FromString(std::string(TypeName<F0>()));
5295
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
5296
+ steps[1], StdStringToUpbString(TypeName<F0>()));
5173
5297
  if (state == State::kState1) {
5174
- step1["polling_state"] =
5175
- PromiseAsJson(prior.prior.prior.prior.prior.prior.prior.prior.prior
5176
- .prior.prior.current_promise);
5298
+ PromiseAsProto(prior.prior.prior.prior.prior.prior.prior.prior.prior.prior
5299
+ .prior.current_promise,
5300
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
5301
+ steps[1], arena),
5302
+ arena);
5177
5303
  }
5178
- steps.emplace_back(Json::FromObject(step1));
5179
- Json::Object step2;
5180
- step2["type"] = Json::FromString(std::string(TypeName<F1>()));
5304
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
5305
+ steps[2], StdStringToUpbString(TypeName<F1>()));
5181
5306
  if (state == State::kState2) {
5182
- step2["polling_state"] =
5183
- PromiseAsJson(prior.prior.prior.prior.prior.prior.prior.prior.prior
5184
- .prior.current_promise);
5307
+ PromiseAsProto(prior.prior.prior.prior.prior.prior.prior.prior.prior.prior
5308
+ .current_promise,
5309
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
5310
+ steps[2], arena),
5311
+ arena);
5185
5312
  }
5186
- steps.emplace_back(Json::FromObject(step2));
5187
- Json::Object step3;
5188
- step3["type"] = Json::FromString(std::string(TypeName<F2>()));
5313
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
5314
+ steps[3], StdStringToUpbString(TypeName<F2>()));
5189
5315
  if (state == State::kState3) {
5190
- step3["polling_state"] =
5191
- PromiseAsJson(prior.prior.prior.prior.prior.prior.prior.prior.prior
5192
- .current_promise);
5316
+ PromiseAsProto(
5317
+ prior.prior.prior.prior.prior.prior.prior.prior.prior.current_promise,
5318
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(steps[3],
5319
+ arena),
5320
+ arena);
5193
5321
  }
5194
- steps.emplace_back(Json::FromObject(step3));
5195
- Json::Object step4;
5196
- step4["type"] = Json::FromString(std::string(TypeName<F3>()));
5322
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
5323
+ steps[4], StdStringToUpbString(TypeName<F3>()));
5197
5324
  if (state == State::kState4) {
5198
- step4["polling_state"] = PromiseAsJson(
5199
- prior.prior.prior.prior.prior.prior.prior.prior.current_promise);
5325
+ PromiseAsProto(
5326
+ prior.prior.prior.prior.prior.prior.prior.prior.current_promise,
5327
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(steps[4],
5328
+ arena),
5329
+ arena);
5200
5330
  }
5201
- steps.emplace_back(Json::FromObject(step4));
5202
- Json::Object step5;
5203
- step5["type"] = Json::FromString(std::string(TypeName<F4>()));
5331
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
5332
+ steps[5], StdStringToUpbString(TypeName<F4>()));
5204
5333
  if (state == State::kState5) {
5205
- step5["polling_state"] = PromiseAsJson(
5206
- prior.prior.prior.prior.prior.prior.prior.current_promise);
5334
+ PromiseAsProto(prior.prior.prior.prior.prior.prior.prior.current_promise,
5335
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
5336
+ steps[5], arena),
5337
+ arena);
5207
5338
  }
5208
- steps.emplace_back(Json::FromObject(step5));
5209
- Json::Object step6;
5210
- step6["type"] = Json::FromString(std::string(TypeName<F5>()));
5339
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
5340
+ steps[6], StdStringToUpbString(TypeName<F5>()));
5211
5341
  if (state == State::kState6) {
5212
- step6["polling_state"] =
5213
- PromiseAsJson(prior.prior.prior.prior.prior.prior.current_promise);
5342
+ PromiseAsProto(prior.prior.prior.prior.prior.prior.current_promise,
5343
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
5344
+ steps[6], arena),
5345
+ arena);
5214
5346
  }
5215
- steps.emplace_back(Json::FromObject(step6));
5216
- Json::Object step7;
5217
- step7["type"] = Json::FromString(std::string(TypeName<F6>()));
5347
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
5348
+ steps[7], StdStringToUpbString(TypeName<F6>()));
5218
5349
  if (state == State::kState7) {
5219
- step7["polling_state"] =
5220
- PromiseAsJson(prior.prior.prior.prior.prior.current_promise);
5350
+ PromiseAsProto(prior.prior.prior.prior.prior.current_promise,
5351
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
5352
+ steps[7], arena),
5353
+ arena);
5221
5354
  }
5222
- steps.emplace_back(Json::FromObject(step7));
5223
- Json::Object step8;
5224
- step8["type"] = Json::FromString(std::string(TypeName<F7>()));
5355
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
5356
+ steps[8], StdStringToUpbString(TypeName<F7>()));
5225
5357
  if (state == State::kState8) {
5226
- step8["polling_state"] =
5227
- PromiseAsJson(prior.prior.prior.prior.current_promise);
5358
+ PromiseAsProto(prior.prior.prior.prior.current_promise,
5359
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
5360
+ steps[8], arena),
5361
+ arena);
5228
5362
  }
5229
- steps.emplace_back(Json::FromObject(step8));
5230
- Json::Object step9;
5231
- step9["type"] = Json::FromString(std::string(TypeName<F8>()));
5363
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
5364
+ steps[9], StdStringToUpbString(TypeName<F8>()));
5232
5365
  if (state == State::kState9) {
5233
- step9["polling_state"] = PromiseAsJson(prior.prior.prior.current_promise);
5366
+ PromiseAsProto(prior.prior.prior.current_promise,
5367
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
5368
+ steps[9], arena),
5369
+ arena);
5234
5370
  }
5235
- steps.emplace_back(Json::FromObject(step9));
5236
- Json::Object step10;
5237
- step10["type"] = Json::FromString(std::string(TypeName<F9>()));
5371
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
5372
+ steps[10], StdStringToUpbString(TypeName<F9>()));
5238
5373
  if (state == State::kState10) {
5239
- step10["polling_state"] = PromiseAsJson(prior.prior.current_promise);
5374
+ PromiseAsProto(prior.prior.current_promise,
5375
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
5376
+ steps[10], arena),
5377
+ arena);
5240
5378
  }
5241
- steps.emplace_back(Json::FromObject(step10));
5242
- Json::Object step11;
5243
- step11["type"] = Json::FromString(std::string(TypeName<F10>()));
5379
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
5380
+ steps[11], StdStringToUpbString(TypeName<F10>()));
5244
5381
  if (state == State::kState11) {
5245
- step11["polling_state"] = PromiseAsJson(prior.current_promise);
5382
+ PromiseAsProto(prior.current_promise,
5383
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
5384
+ steps[11], arena),
5385
+ arena);
5246
5386
  }
5247
- steps.emplace_back(Json::FromObject(step11));
5248
- Json::Object step12;
5249
- step12["type"] = Json::FromString(std::string(TypeName<F11>()));
5387
+ grpc_channelz_v2_Promise_SeqStep_set_factory(
5388
+ steps[12], StdStringToUpbString(TypeName<F11>()));
5250
5389
  if (state == State::kState12) {
5251
- step12["polling_state"] = PromiseAsJson(current_promise);
5390
+ PromiseAsProto(current_promise,
5391
+ grpc_channelz_v2_Promise_SeqStep_mutable_polling_promise(
5392
+ steps[12], arena),
5393
+ arena);
5252
5394
  }
5253
- steps.emplace_back(Json::FromObject(step12));
5254
- obj["steps"] = Json::FromArray(steps);
5255
- return Json::FromObject(obj);
5256
5395
  }
5257
5396
  GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION Poll<Result> PollOnce() {
5258
5397
  switch (state) {