grpc 1.32.0 → 1.33.0.pre1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of grpc might be problematic. Click here for more details.

Files changed (214) hide show
  1. checksums.yaml +4 -4
  2. data/Makefile +175 -376
  3. data/include/grpc/grpc.h +0 -5
  4. data/include/grpc/grpc_security.h +16 -0
  5. data/include/grpc/impl/codegen/grpc_types.h +0 -5
  6. data/src/core/ext/filters/client_channel/client_channel.cc +204 -170
  7. data/src/core/ext/filters/client_channel/config_selector.cc +0 -4
  8. data/src/core/ext/filters/client_channel/config_selector.h +34 -5
  9. data/src/core/ext/filters/client_channel/lb_policy.h +1 -1
  10. data/src/core/ext/filters/client_channel/lb_policy/address_filtering.cc +48 -35
  11. data/src/core/ext/filters/client_channel/lb_policy/address_filtering.h +7 -5
  12. data/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.cc +3 -2
  13. data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +106 -106
  14. data/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc +2 -2
  15. data/src/core/ext/filters/client_channel/lb_policy/priority/priority.cc +3 -3
  16. data/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc +3 -3
  17. data/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h +9 -32
  18. data/src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc +3 -3
  19. data/src/core/ext/filters/client_channel/lb_policy/xds/cds.cc +198 -126
  20. data/src/core/ext/filters/client_channel/lb_policy/xds/eds.cc +439 -249
  21. data/src/core/ext/filters/client_channel/lb_policy/xds/eds_drop.cc +571 -0
  22. data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc +727 -0
  23. data/src/core/ext/filters/client_channel/lb_policy_registry.cc +8 -1
  24. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc +1 -1
  25. data/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc +553 -358
  26. data/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.h +28 -0
  27. data/src/core/ext/filters/client_channel/resolver_result_parsing.cc +8 -39
  28. data/src/core/ext/filters/client_channel/resolver_result_parsing.h +4 -2
  29. data/src/core/ext/filters/client_channel/resolving_lb_policy.cc +44 -43
  30. data/src/core/ext/filters/client_channel/resolving_lb_policy.h +5 -9
  31. data/src/core/ext/filters/client_channel/server_address.cc +80 -0
  32. data/src/core/ext/filters/client_channel/server_address.h +25 -36
  33. data/src/core/ext/filters/client_channel/service_config.cc +16 -13
  34. data/src/core/ext/filters/client_channel/service_config.h +7 -4
  35. data/src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc +2 -2
  36. data/src/core/ext/filters/client_channel/service_config_parser.cc +8 -6
  37. data/src/core/ext/filters/client_channel/service_config_parser.h +8 -5
  38. data/src/core/ext/filters/client_channel/subchannel_interface.h +44 -0
  39. data/src/core/ext/filters/message_size/message_size_filter.cc +2 -1
  40. data/src/core/ext/filters/message_size/message_size_filter.h +2 -1
  41. data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +17 -10
  42. data/src/core/ext/transport/chttp2/transport/flow_control.cc +10 -2
  43. data/src/core/ext/transport/chttp2/transport/flow_control.h +10 -0
  44. data/src/core/ext/transport/chttp2/transport/internal.h +5 -0
  45. data/src/core/ext/transport/chttp2/transport/parsing.cc +16 -2
  46. data/src/core/ext/upb-generated/envoy/config/accesslog/v3/accesslog.upb.c +29 -9
  47. data/src/core/ext/upb-generated/envoy/config/accesslog/v3/accesslog.upb.h +66 -0
  48. data/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.c +123 -45
  49. data/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.h +310 -53
  50. data/src/core/ext/upb-generated/envoy/config/core/v3/address.upb.c +17 -5
  51. data/src/core/ext/upb-generated/envoy/config/core/v3/address.upb.h +45 -0
  52. data/src/core/ext/upb-generated/envoy/config/core/v3/base.upb.c +1 -0
  53. data/src/core/ext/upb-generated/envoy/config/core/v3/config_source.upb.c +16 -9
  54. data/src/core/ext/upb-generated/envoy/config/core/v3/config_source.upb.h +38 -15
  55. data/src/core/ext/upb-generated/envoy/config/core/v3/extension.upb.c +53 -0
  56. data/src/core/ext/upb-generated/envoy/config/core/v3/extension.upb.h +133 -0
  57. data/src/core/ext/upb-generated/envoy/config/core/v3/grpc_service.upb.c +54 -8
  58. data/src/core/ext/upb-generated/envoy/config/core/v3/grpc_service.upb.h +123 -5
  59. data/src/core/ext/upb-generated/envoy/config/core/v3/protocol.upb.c +40 -16
  60. data/src/core/ext/upb-generated/envoy/config/core/v3/protocol.upb.h +114 -5
  61. data/src/core/ext/upb-generated/envoy/config/core/v3/substitution_format_string.upb.c +36 -0
  62. data/src/core/ext/upb-generated/envoy/config/core/v3/substitution_format_string.upb.h +85 -0
  63. data/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.c +36 -16
  64. data/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.h +86 -20
  65. data/src/core/ext/upb-generated/envoy/config/listener/v3/listener_components.upb.c +23 -6
  66. data/src/core/ext/upb-generated/envoy/config/listener/v3/listener_components.upb.h +54 -5
  67. data/src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.c +10 -6
  68. data/src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.h +28 -11
  69. data/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.c +184 -57
  70. data/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.h +504 -69
  71. data/src/core/ext/upb-generated/envoy/config/route/v3/scoped_route.upb.c +6 -5
  72. data/src/core/ext/upb-generated/envoy/config/route/v3/scoped_route.upb.h +11 -7
  73. data/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.c +78 -26
  74. data/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.h +236 -25
  75. data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/common.upb.c +8 -9
  76. data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/common.upb.h +19 -33
  77. data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/secret.upb.c +7 -3
  78. data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/secret.upb.h +16 -0
  79. data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls.upb.c +65 -23
  80. data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls.upb.h +229 -47
  81. data/src/core/ext/upb-generated/envoy/service/discovery/v3/discovery.upb.c +20 -10
  82. data/src/core/ext/upb-generated/envoy/service/discovery/v3/discovery.upb.h +67 -4
  83. data/src/core/ext/upb-generated/envoy/type/matcher/v3/string.upb.c +3 -2
  84. data/src/core/ext/upb-generated/envoy/type/matcher/v3/string.upb.h +6 -0
  85. data/src/core/ext/upb-generated/google/api/expr/v1alpha1/checked.upb.c +242 -0
  86. data/src/core/ext/upb-generated/google/api/expr/v1alpha1/checked.upb.h +753 -0
  87. data/src/core/ext/upb-generated/udpa/annotations/security.upb.c +31 -0
  88. data/src/core/ext/upb-generated/udpa/annotations/security.upb.h +57 -0
  89. data/src/core/ext/upb-generated/udpa/core/v1/authority.upb.c +28 -0
  90. data/src/core/ext/upb-generated/udpa/core/v1/authority.upb.h +53 -0
  91. data/src/core/ext/upb-generated/udpa/core/v1/collection_entry.upb.c +52 -0
  92. data/src/core/ext/upb-generated/udpa/core/v1/collection_entry.upb.h +129 -0
  93. data/src/core/ext/upb-generated/udpa/core/v1/context_params.upb.c +42 -0
  94. data/src/core/ext/upb-generated/udpa/core/v1/context_params.upb.h +77 -0
  95. data/src/core/ext/upb-generated/udpa/core/v1/resource.upb.c +36 -0
  96. data/src/core/ext/upb-generated/udpa/core/v1/resource.upb.h +85 -0
  97. data/src/core/ext/upb-generated/udpa/core/v1/resource_locator.upb.c +54 -0
  98. data/src/core/ext/upb-generated/udpa/core/v1/resource_locator.upb.h +160 -0
  99. data/src/core/ext/upb-generated/udpa/core/v1/resource_name.upb.c +36 -0
  100. data/src/core/ext/upb-generated/udpa/core/v1/resource_name.upb.h +84 -0
  101. data/src/core/ext/xds/certificate_provider_factory.h +59 -0
  102. data/src/core/ext/xds/certificate_provider_registry.cc +103 -0
  103. data/src/core/ext/xds/certificate_provider_registry.h +57 -0
  104. data/src/core/ext/xds/certificate_provider_store.h +50 -0
  105. data/src/core/ext/xds/google_mesh_ca_certificate_provider_factory.cc +377 -0
  106. data/src/core/ext/xds/google_mesh_ca_certificate_provider_factory.h +102 -0
  107. data/src/core/ext/xds/xds_api.cc +301 -93
  108. data/src/core/ext/xds/xds_api.h +129 -92
  109. data/src/core/ext/xds/xds_channel_args.h +6 -3
  110. data/src/core/ext/xds/xds_client.cc +498 -410
  111. data/src/core/ext/xds/xds_client.h +105 -51
  112. data/src/core/ext/xds/xds_client_stats.cc +18 -12
  113. data/src/core/ext/xds/xds_client_stats.h +33 -5
  114. data/src/core/lib/channel/channel_args.h +0 -1
  115. data/src/core/lib/channel/channelz.cc +10 -45
  116. data/src/core/lib/channel/channelz.h +11 -19
  117. data/src/core/lib/channel/channelz_registry.cc +12 -11
  118. data/src/core/lib/channel/channelz_registry.h +3 -0
  119. data/src/core/lib/gpr/time_precise.cc +2 -0
  120. data/src/core/lib/gpr/time_precise.h +6 -2
  121. data/src/core/lib/gprpp/dual_ref_counted.h +336 -0
  122. data/src/core/lib/gprpp/ref_counted.h +51 -22
  123. data/src/core/lib/gprpp/ref_counted_ptr.h +153 -0
  124. data/src/core/lib/iomgr/endpoint_cfstream.cc +9 -5
  125. data/src/core/lib/iomgr/exec_ctx.h +10 -8
  126. data/src/core/lib/json/json_util.cc +58 -0
  127. data/src/core/lib/json/json_util.h +37 -0
  128. data/src/core/lib/security/certificate_provider.h +60 -0
  129. data/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.cc +321 -0
  130. data/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h +214 -0
  131. data/src/core/lib/security/credentials/xds/xds_credentials.cc +45 -0
  132. data/src/core/lib/security/credentials/xds/xds_credentials.h +51 -0
  133. data/src/core/lib/security/security_connector/fake/fake_security_connector.cc +6 -10
  134. data/src/core/lib/security/security_connector/ssl_utils.h +5 -0
  135. data/src/core/lib/surface/channel.cc +9 -31
  136. data/src/core/lib/surface/channel.h +6 -1
  137. data/src/core/lib/surface/init.cc +26 -9
  138. data/src/core/lib/surface/version.cc +2 -2
  139. data/src/core/lib/transport/bdp_estimator.h +2 -1
  140. data/src/core/lib/transport/connectivity_state.h +2 -2
  141. data/src/core/lib/transport/metadata.cc +11 -1
  142. data/src/core/plugin_registry/grpc_plugin_registry.cc +35 -20
  143. data/src/core/tsi/ssl_transport_security.cc +2 -2
  144. data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +2 -2
  145. data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +3 -3
  146. data/src/ruby/lib/grpc/version.rb +1 -1
  147. data/third_party/boringssl-with-bazel/err_data.c +465 -463
  148. data/third_party/boringssl-with-bazel/src/crypto/asn1/asn1_lib.c +0 -6
  149. data/third_party/boringssl-with-bazel/src/crypto/dsa/dsa.c +9 -43
  150. data/third_party/boringssl-with-bazel/src/crypto/dsa/dsa_asn1.c +55 -4
  151. data/third_party/boringssl-with-bazel/src/crypto/dsa/internal.h +34 -0
  152. data/third_party/boringssl-with-bazel/src/crypto/evp/evp.c +4 -0
  153. data/third_party/boringssl-with-bazel/src/crypto/evp/p_dsa_asn1.c +6 -2
  154. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/digest.c +2 -0
  155. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/internal.h +4 -0
  156. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/rsa.c +30 -10
  157. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/rsa_impl.c +10 -15
  158. data/third_party/boringssl-with-bazel/src/crypto/hpke/hpke.c +98 -11
  159. data/third_party/boringssl-with-bazel/src/crypto/hpke/internal.h +51 -6
  160. data/third_party/boringssl-with-bazel/src/crypto/trust_token/internal.h +44 -2
  161. data/third_party/boringssl-with-bazel/src/crypto/trust_token/pmbtoken.c +221 -49
  162. data/third_party/boringssl-with-bazel/src/crypto/trust_token/trust_token.c +64 -20
  163. data/third_party/boringssl-with-bazel/src/crypto/x509/a_strex.c +3 -3
  164. data/third_party/boringssl-with-bazel/src/crypto/x509/algorithm.c +0 -8
  165. data/third_party/boringssl-with-bazel/src/crypto/x509/t_crl.c +3 -3
  166. data/third_party/boringssl-with-bazel/src/crypto/x509/t_x509.c +1 -1
  167. data/third_party/boringssl-with-bazel/src/crypto/x509/x509_cmp.c +7 -2
  168. data/third_party/boringssl-with-bazel/src/crypto/x509/x509_ext.c +21 -18
  169. data/third_party/boringssl-with-bazel/src/crypto/x509/x509_obj.c +1 -1
  170. data/third_party/boringssl-with-bazel/src/crypto/x509/x509_set.c +24 -3
  171. data/third_party/boringssl-with-bazel/src/crypto/x509/x509_trs.c +3 -3
  172. data/third_party/boringssl-with-bazel/src/crypto/x509/x509_txt.c +67 -67
  173. data/third_party/boringssl-with-bazel/src/crypto/x509/x509_v3.c +3 -3
  174. data/third_party/boringssl-with-bazel/src/crypto/x509/x509_vfy.c +29 -35
  175. data/third_party/boringssl-with-bazel/src/crypto/x509/x509cset.c +13 -2
  176. data/third_party/boringssl-with-bazel/src/crypto/x509/x509name.c +9 -8
  177. data/third_party/boringssl-with-bazel/src/crypto/x509/x_all.c +10 -10
  178. data/third_party/boringssl-with-bazel/src/crypto/x509/x_crl.c +2 -2
  179. data/third_party/boringssl-with-bazel/src/crypto/x509/x_name.c +28 -40
  180. data/third_party/boringssl-with-bazel/src/crypto/x509/x_x509.c +3 -1
  181. data/third_party/boringssl-with-bazel/src/crypto/x509v3/ext_dat.h +1 -4
  182. data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_conf.c +7 -3
  183. data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_genn.c +2 -2
  184. data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_info.c +1 -1
  185. data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_purp.c +55 -8
  186. data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_skey.c +1 -1
  187. data/third_party/boringssl-with-bazel/src/include/openssl/asn1.h +0 -1
  188. data/third_party/boringssl-with-bazel/src/include/openssl/base.h +1 -1
  189. data/third_party/boringssl-with-bazel/src/include/openssl/cipher.h +6 -0
  190. data/third_party/boringssl-with-bazel/src/include/openssl/crypto.h +1 -1
  191. data/third_party/boringssl-with-bazel/src/include/openssl/dh.h +12 -0
  192. data/third_party/boringssl-with-bazel/src/include/openssl/digest.h +9 -0
  193. data/third_party/boringssl-with-bazel/src/include/openssl/evp.h +4 -1
  194. data/third_party/boringssl-with-bazel/src/include/openssl/ssl.h +9 -2
  195. data/third_party/boringssl-with-bazel/src/include/openssl/trust_token.h +26 -6
  196. data/third_party/boringssl-with-bazel/src/include/openssl/x509.h +188 -78
  197. data/third_party/boringssl-with-bazel/src/include/openssl/x509v3.h +52 -43
  198. data/third_party/boringssl-with-bazel/src/ssl/handshake.cc +18 -18
  199. data/third_party/boringssl-with-bazel/src/ssl/handshake_client.cc +2 -3
  200. data/third_party/boringssl-with-bazel/src/ssl/handshake_server.cc +1 -1
  201. data/third_party/boringssl-with-bazel/src/ssl/internal.h +9 -9
  202. data/third_party/boringssl-with-bazel/src/ssl/ssl_cipher.cc +8 -9
  203. data/third_party/boringssl-with-bazel/src/ssl/tls13_both.cc +1 -2
  204. data/third_party/boringssl-with-bazel/src/ssl/tls13_client.cc +4 -8
  205. data/third_party/boringssl-with-bazel/src/ssl/tls13_server.cc +2 -2
  206. metadata +72 -42
  207. data/src/core/ext/filters/client_channel/lb_policy/xds/lrs.cc +0 -537
  208. data/src/core/ext/filters/client_channel/lb_policy/xds/xds_routing.cc +0 -1141
  209. data/src/core/ext/upb-generated/gogoproto/gogo.upb.c +0 -17
  210. data/src/core/ext/upb-generated/gogoproto/gogo.upb.h +0 -29
  211. data/src/core/ext/xds/xds_channel.h +0 -46
  212. data/src/core/ext/xds/xds_channel_secure.cc +0 -103
  213. data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_pku.c +0 -110
  214. data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_sxnet.c +0 -274
@@ -0,0 +1,36 @@
1
+ /* This file was generated by upbc (the upb compiler) from the input
2
+ * file:
3
+ *
4
+ * udpa/core/v1/resource.proto
5
+ *
6
+ * Do not edit -- your changes will be discarded when the file is
7
+ * regenerated. */
8
+
9
+ #include <stddef.h>
10
+ #include "upb/msg.h"
11
+ #include "udpa/core/v1/resource.upb.h"
12
+ #include "google/protobuf/any.upb.h"
13
+ #include "udpa/annotations/status.upb.h"
14
+ #include "udpa/core/v1/resource_name.upb.h"
15
+
16
+ #include "upb/port_def.inc"
17
+
18
+ static const upb_msglayout *const udpa_core_v1_Resource_submsgs[2] = {
19
+ &google_protobuf_Any_msginit,
20
+ &udpa_core_v1_ResourceName_msginit,
21
+ };
22
+
23
+ static const upb_msglayout_field udpa_core_v1_Resource__fields[3] = {
24
+ {1, UPB_SIZE(8, 16), 0, 1, 11, 1},
25
+ {2, UPB_SIZE(0, 0), 0, 0, 9, 1},
26
+ {3, UPB_SIZE(12, 24), 0, 0, 11, 1},
27
+ };
28
+
29
+ const upb_msglayout udpa_core_v1_Resource_msginit = {
30
+ &udpa_core_v1_Resource_submsgs[0],
31
+ &udpa_core_v1_Resource__fields[0],
32
+ UPB_SIZE(16, 32), 3, false,
33
+ };
34
+
35
+ #include "upb/port_undef.inc"
36
+
@@ -0,0 +1,85 @@
1
+ /* This file was generated by upbc (the upb compiler) from the input
2
+ * file:
3
+ *
4
+ * udpa/core/v1/resource.proto
5
+ *
6
+ * Do not edit -- your changes will be discarded when the file is
7
+ * regenerated. */
8
+
9
+ #ifndef UDPA_CORE_V1_RESOURCE_PROTO_UPB_H_
10
+ #define UDPA_CORE_V1_RESOURCE_PROTO_UPB_H_
11
+
12
+ #include "upb/msg.h"
13
+ #include "upb/decode.h"
14
+ #include "upb/encode.h"
15
+
16
+ #include "upb/port_def.inc"
17
+
18
+ #ifdef __cplusplus
19
+ extern "C" {
20
+ #endif
21
+
22
+ struct udpa_core_v1_Resource;
23
+ typedef struct udpa_core_v1_Resource udpa_core_v1_Resource;
24
+ extern const upb_msglayout udpa_core_v1_Resource_msginit;
25
+ struct google_protobuf_Any;
26
+ struct udpa_core_v1_ResourceName;
27
+ extern const upb_msglayout google_protobuf_Any_msginit;
28
+ extern const upb_msglayout udpa_core_v1_ResourceName_msginit;
29
+
30
+
31
+ /* udpa.core.v1.Resource */
32
+
33
+ UPB_INLINE udpa_core_v1_Resource *udpa_core_v1_Resource_new(upb_arena *arena) {
34
+ return (udpa_core_v1_Resource *)_upb_msg_new(&udpa_core_v1_Resource_msginit, arena);
35
+ }
36
+ UPB_INLINE udpa_core_v1_Resource *udpa_core_v1_Resource_parse(const char *buf, size_t size,
37
+ upb_arena *arena) {
38
+ udpa_core_v1_Resource *ret = udpa_core_v1_Resource_new(arena);
39
+ return (ret && upb_decode(buf, size, ret, &udpa_core_v1_Resource_msginit, arena)) ? ret : NULL;
40
+ }
41
+ UPB_INLINE char *udpa_core_v1_Resource_serialize(const udpa_core_v1_Resource *msg, upb_arena *arena, size_t *len) {
42
+ return upb_encode(msg, &udpa_core_v1_Resource_msginit, arena, len);
43
+ }
44
+
45
+ UPB_INLINE bool udpa_core_v1_Resource_has_name(const udpa_core_v1_Resource *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
46
+ UPB_INLINE const struct udpa_core_v1_ResourceName* udpa_core_v1_Resource_name(const udpa_core_v1_Resource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct udpa_core_v1_ResourceName*); }
47
+ UPB_INLINE upb_strview udpa_core_v1_Resource_version(const udpa_core_v1_Resource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
48
+ UPB_INLINE bool udpa_core_v1_Resource_has_resource(const udpa_core_v1_Resource *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
49
+ UPB_INLINE const struct google_protobuf_Any* udpa_core_v1_Resource_resource(const udpa_core_v1_Resource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_Any*); }
50
+
51
+ UPB_INLINE void udpa_core_v1_Resource_set_name(udpa_core_v1_Resource *msg, struct udpa_core_v1_ResourceName* value) {
52
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct udpa_core_v1_ResourceName*) = value;
53
+ }
54
+ UPB_INLINE struct udpa_core_v1_ResourceName* udpa_core_v1_Resource_mutable_name(udpa_core_v1_Resource *msg, upb_arena *arena) {
55
+ struct udpa_core_v1_ResourceName* sub = (struct udpa_core_v1_ResourceName*)udpa_core_v1_Resource_name(msg);
56
+ if (sub == NULL) {
57
+ sub = (struct udpa_core_v1_ResourceName*)_upb_msg_new(&udpa_core_v1_ResourceName_msginit, arena);
58
+ if (!sub) return NULL;
59
+ udpa_core_v1_Resource_set_name(msg, sub);
60
+ }
61
+ return sub;
62
+ }
63
+ UPB_INLINE void udpa_core_v1_Resource_set_version(udpa_core_v1_Resource *msg, upb_strview value) {
64
+ *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
65
+ }
66
+ UPB_INLINE void udpa_core_v1_Resource_set_resource(udpa_core_v1_Resource *msg, struct google_protobuf_Any* value) {
67
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_Any*) = value;
68
+ }
69
+ UPB_INLINE struct google_protobuf_Any* udpa_core_v1_Resource_mutable_resource(udpa_core_v1_Resource *msg, upb_arena *arena) {
70
+ struct google_protobuf_Any* sub = (struct google_protobuf_Any*)udpa_core_v1_Resource_resource(msg);
71
+ if (sub == NULL) {
72
+ sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena);
73
+ if (!sub) return NULL;
74
+ udpa_core_v1_Resource_set_resource(msg, sub);
75
+ }
76
+ return sub;
77
+ }
78
+
79
+ #ifdef __cplusplus
80
+ } /* extern "C" */
81
+ #endif
82
+
83
+ #include "upb/port_undef.inc"
84
+
85
+ #endif /* UDPA_CORE_V1_RESOURCE_PROTO_UPB_H_ */
@@ -0,0 +1,54 @@
1
+ /* This file was generated by upbc (the upb compiler) from the input
2
+ * file:
3
+ *
4
+ * udpa/core/v1/resource_locator.proto
5
+ *
6
+ * Do not edit -- your changes will be discarded when the file is
7
+ * regenerated. */
8
+
9
+ #include <stddef.h>
10
+ #include "upb/msg.h"
11
+ #include "udpa/core/v1/resource_locator.upb.h"
12
+ #include "udpa/annotations/status.upb.h"
13
+ #include "udpa/core/v1/context_params.upb.h"
14
+ #include "validate/validate.upb.h"
15
+
16
+ #include "upb/port_def.inc"
17
+
18
+ static const upb_msglayout *const udpa_core_v1_ResourceLocator_submsgs[2] = {
19
+ &udpa_core_v1_ContextParams_msginit,
20
+ &udpa_core_v1_ResourceLocator_Directive_msginit,
21
+ };
22
+
23
+ static const upb_msglayout_field udpa_core_v1_ResourceLocator__fields[6] = {
24
+ {1, UPB_SIZE(0, 0), 0, 0, 14, 1},
25
+ {2, UPB_SIZE(24, 40), 0, 0, 9, 3},
26
+ {3, UPB_SIZE(8, 8), 0, 0, 9, 1},
27
+ {4, UPB_SIZE(16, 24), 0, 0, 9, 1},
28
+ {5, UPB_SIZE(32, 56), UPB_SIZE(-37, -65), 0, 11, 1},
29
+ {6, UPB_SIZE(28, 48), 0, 1, 11, 3},
30
+ };
31
+
32
+ const upb_msglayout udpa_core_v1_ResourceLocator_msginit = {
33
+ &udpa_core_v1_ResourceLocator_submsgs[0],
34
+ &udpa_core_v1_ResourceLocator__fields[0],
35
+ UPB_SIZE(40, 80), 6, false,
36
+ };
37
+
38
+ static const upb_msglayout *const udpa_core_v1_ResourceLocator_Directive_submsgs[1] = {
39
+ &udpa_core_v1_ResourceLocator_msginit,
40
+ };
41
+
42
+ static const upb_msglayout_field udpa_core_v1_ResourceLocator_Directive__fields[2] = {
43
+ {1, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 11, 1},
44
+ {2, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 9, 1},
45
+ };
46
+
47
+ const upb_msglayout udpa_core_v1_ResourceLocator_Directive_msginit = {
48
+ &udpa_core_v1_ResourceLocator_Directive_submsgs[0],
49
+ &udpa_core_v1_ResourceLocator_Directive__fields[0],
50
+ UPB_SIZE(16, 32), 2, false,
51
+ };
52
+
53
+ #include "upb/port_undef.inc"
54
+
@@ -0,0 +1,160 @@
1
+ /* This file was generated by upbc (the upb compiler) from the input
2
+ * file:
3
+ *
4
+ * udpa/core/v1/resource_locator.proto
5
+ *
6
+ * Do not edit -- your changes will be discarded when the file is
7
+ * regenerated. */
8
+
9
+ #ifndef UDPA_CORE_V1_RESOURCE_LOCATOR_PROTO_UPB_H_
10
+ #define UDPA_CORE_V1_RESOURCE_LOCATOR_PROTO_UPB_H_
11
+
12
+ #include "upb/msg.h"
13
+ #include "upb/decode.h"
14
+ #include "upb/encode.h"
15
+
16
+ #include "upb/port_def.inc"
17
+
18
+ #ifdef __cplusplus
19
+ extern "C" {
20
+ #endif
21
+
22
+ struct udpa_core_v1_ResourceLocator;
23
+ struct udpa_core_v1_ResourceLocator_Directive;
24
+ typedef struct udpa_core_v1_ResourceLocator udpa_core_v1_ResourceLocator;
25
+ typedef struct udpa_core_v1_ResourceLocator_Directive udpa_core_v1_ResourceLocator_Directive;
26
+ extern const upb_msglayout udpa_core_v1_ResourceLocator_msginit;
27
+ extern const upb_msglayout udpa_core_v1_ResourceLocator_Directive_msginit;
28
+ struct udpa_core_v1_ContextParams;
29
+ extern const upb_msglayout udpa_core_v1_ContextParams_msginit;
30
+
31
+ typedef enum {
32
+ udpa_core_v1_ResourceLocator_UDPA = 0,
33
+ udpa_core_v1_ResourceLocator_HTTP = 1,
34
+ udpa_core_v1_ResourceLocator_FILE = 2
35
+ } udpa_core_v1_ResourceLocator_Scheme;
36
+
37
+
38
+ /* udpa.core.v1.ResourceLocator */
39
+
40
+ UPB_INLINE udpa_core_v1_ResourceLocator *udpa_core_v1_ResourceLocator_new(upb_arena *arena) {
41
+ return (udpa_core_v1_ResourceLocator *)_upb_msg_new(&udpa_core_v1_ResourceLocator_msginit, arena);
42
+ }
43
+ UPB_INLINE udpa_core_v1_ResourceLocator *udpa_core_v1_ResourceLocator_parse(const char *buf, size_t size,
44
+ upb_arena *arena) {
45
+ udpa_core_v1_ResourceLocator *ret = udpa_core_v1_ResourceLocator_new(arena);
46
+ return (ret && upb_decode(buf, size, ret, &udpa_core_v1_ResourceLocator_msginit, arena)) ? ret : NULL;
47
+ }
48
+ UPB_INLINE char *udpa_core_v1_ResourceLocator_serialize(const udpa_core_v1_ResourceLocator *msg, upb_arena *arena, size_t *len) {
49
+ return upb_encode(msg, &udpa_core_v1_ResourceLocator_msginit, arena, len);
50
+ }
51
+
52
+ typedef enum {
53
+ udpa_core_v1_ResourceLocator_context_param_specifier_exact_context = 5,
54
+ udpa_core_v1_ResourceLocator_context_param_specifier_NOT_SET = 0
55
+ } udpa_core_v1_ResourceLocator_context_param_specifier_oneofcases;
56
+ UPB_INLINE udpa_core_v1_ResourceLocator_context_param_specifier_oneofcases udpa_core_v1_ResourceLocator_context_param_specifier_case(const udpa_core_v1_ResourceLocator* msg) { return (udpa_core_v1_ResourceLocator_context_param_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(36, 64), int32_t); }
57
+
58
+ UPB_INLINE int32_t udpa_core_v1_ResourceLocator_scheme(const udpa_core_v1_ResourceLocator *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
59
+ UPB_INLINE upb_strview const* udpa_core_v1_ResourceLocator_id(const udpa_core_v1_ResourceLocator *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(24, 40), len); }
60
+ UPB_INLINE upb_strview udpa_core_v1_ResourceLocator_authority(const udpa_core_v1_ResourceLocator *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview); }
61
+ UPB_INLINE upb_strview udpa_core_v1_ResourceLocator_resource_type(const udpa_core_v1_ResourceLocator *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_strview); }
62
+ UPB_INLINE bool udpa_core_v1_ResourceLocator_has_exact_context(const udpa_core_v1_ResourceLocator *msg) { return _upb_getoneofcase(msg, UPB_SIZE(36, 64)) == 5; }
63
+ UPB_INLINE const struct udpa_core_v1_ContextParams* udpa_core_v1_ResourceLocator_exact_context(const udpa_core_v1_ResourceLocator *msg) { return UPB_READ_ONEOF(msg, const struct udpa_core_v1_ContextParams*, UPB_SIZE(32, 56), UPB_SIZE(36, 64), 5, NULL); }
64
+ UPB_INLINE bool udpa_core_v1_ResourceLocator_has_directives(const udpa_core_v1_ResourceLocator *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 48)); }
65
+ UPB_INLINE const udpa_core_v1_ResourceLocator_Directive* const* udpa_core_v1_ResourceLocator_directives(const udpa_core_v1_ResourceLocator *msg, size_t *len) { return (const udpa_core_v1_ResourceLocator_Directive* const*)_upb_array_accessor(msg, UPB_SIZE(28, 48), len); }
66
+
67
+ UPB_INLINE void udpa_core_v1_ResourceLocator_set_scheme(udpa_core_v1_ResourceLocator *msg, int32_t value) {
68
+ *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
69
+ }
70
+ UPB_INLINE upb_strview* udpa_core_v1_ResourceLocator_mutable_id(udpa_core_v1_ResourceLocator *msg, size_t *len) {
71
+ return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 40), len);
72
+ }
73
+ UPB_INLINE upb_strview* udpa_core_v1_ResourceLocator_resize_id(udpa_core_v1_ResourceLocator *msg, size_t len, upb_arena *arena) {
74
+ return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 40), len, UPB_TYPE_STRING, arena);
75
+ }
76
+ UPB_INLINE bool udpa_core_v1_ResourceLocator_add_id(udpa_core_v1_ResourceLocator *msg, upb_strview val, upb_arena *arena) {
77
+ return _upb_array_append_accessor(msg, UPB_SIZE(24, 40), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
78
+ arena);
79
+ }
80
+ UPB_INLINE void udpa_core_v1_ResourceLocator_set_authority(udpa_core_v1_ResourceLocator *msg, upb_strview value) {
81
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value;
82
+ }
83
+ UPB_INLINE void udpa_core_v1_ResourceLocator_set_resource_type(udpa_core_v1_ResourceLocator *msg, upb_strview value) {
84
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_strview) = value;
85
+ }
86
+ UPB_INLINE void udpa_core_v1_ResourceLocator_set_exact_context(udpa_core_v1_ResourceLocator *msg, struct udpa_core_v1_ContextParams* value) {
87
+ UPB_WRITE_ONEOF(msg, struct udpa_core_v1_ContextParams*, UPB_SIZE(32, 56), value, UPB_SIZE(36, 64), 5);
88
+ }
89
+ UPB_INLINE struct udpa_core_v1_ContextParams* udpa_core_v1_ResourceLocator_mutable_exact_context(udpa_core_v1_ResourceLocator *msg, upb_arena *arena) {
90
+ struct udpa_core_v1_ContextParams* sub = (struct udpa_core_v1_ContextParams*)udpa_core_v1_ResourceLocator_exact_context(msg);
91
+ if (sub == NULL) {
92
+ sub = (struct udpa_core_v1_ContextParams*)_upb_msg_new(&udpa_core_v1_ContextParams_msginit, arena);
93
+ if (!sub) return NULL;
94
+ udpa_core_v1_ResourceLocator_set_exact_context(msg, sub);
95
+ }
96
+ return sub;
97
+ }
98
+ UPB_INLINE udpa_core_v1_ResourceLocator_Directive** udpa_core_v1_ResourceLocator_mutable_directives(udpa_core_v1_ResourceLocator *msg, size_t *len) {
99
+ return (udpa_core_v1_ResourceLocator_Directive**)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 48), len);
100
+ }
101
+ UPB_INLINE udpa_core_v1_ResourceLocator_Directive** udpa_core_v1_ResourceLocator_resize_directives(udpa_core_v1_ResourceLocator *msg, size_t len, upb_arena *arena) {
102
+ return (udpa_core_v1_ResourceLocator_Directive**)_upb_array_resize_accessor(msg, UPB_SIZE(28, 48), len, UPB_TYPE_MESSAGE, arena);
103
+ }
104
+ UPB_INLINE struct udpa_core_v1_ResourceLocator_Directive* udpa_core_v1_ResourceLocator_add_directives(udpa_core_v1_ResourceLocator *msg, upb_arena *arena) {
105
+ struct udpa_core_v1_ResourceLocator_Directive* sub = (struct udpa_core_v1_ResourceLocator_Directive*)_upb_msg_new(&udpa_core_v1_ResourceLocator_Directive_msginit, arena);
106
+ bool ok = _upb_array_append_accessor(
107
+ msg, UPB_SIZE(28, 48), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
108
+ if (!ok) return NULL;
109
+ return sub;
110
+ }
111
+
112
+ /* udpa.core.v1.ResourceLocator.Directive */
113
+
114
+ UPB_INLINE udpa_core_v1_ResourceLocator_Directive *udpa_core_v1_ResourceLocator_Directive_new(upb_arena *arena) {
115
+ return (udpa_core_v1_ResourceLocator_Directive *)_upb_msg_new(&udpa_core_v1_ResourceLocator_Directive_msginit, arena);
116
+ }
117
+ UPB_INLINE udpa_core_v1_ResourceLocator_Directive *udpa_core_v1_ResourceLocator_Directive_parse(const char *buf, size_t size,
118
+ upb_arena *arena) {
119
+ udpa_core_v1_ResourceLocator_Directive *ret = udpa_core_v1_ResourceLocator_Directive_new(arena);
120
+ return (ret && upb_decode(buf, size, ret, &udpa_core_v1_ResourceLocator_Directive_msginit, arena)) ? ret : NULL;
121
+ }
122
+ UPB_INLINE char *udpa_core_v1_ResourceLocator_Directive_serialize(const udpa_core_v1_ResourceLocator_Directive *msg, upb_arena *arena, size_t *len) {
123
+ return upb_encode(msg, &udpa_core_v1_ResourceLocator_Directive_msginit, arena, len);
124
+ }
125
+
126
+ typedef enum {
127
+ udpa_core_v1_ResourceLocator_Directive_directive_alt = 1,
128
+ udpa_core_v1_ResourceLocator_Directive_directive_entry = 2,
129
+ udpa_core_v1_ResourceLocator_Directive_directive_NOT_SET = 0
130
+ } udpa_core_v1_ResourceLocator_Directive_directive_oneofcases;
131
+ UPB_INLINE udpa_core_v1_ResourceLocator_Directive_directive_oneofcases udpa_core_v1_ResourceLocator_Directive_directive_case(const udpa_core_v1_ResourceLocator_Directive* msg) { return (udpa_core_v1_ResourceLocator_Directive_directive_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(8, 16), int32_t); }
132
+
133
+ UPB_INLINE bool udpa_core_v1_ResourceLocator_Directive_has_alt(const udpa_core_v1_ResourceLocator_Directive *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 1; }
134
+ UPB_INLINE const udpa_core_v1_ResourceLocator* udpa_core_v1_ResourceLocator_Directive_alt(const udpa_core_v1_ResourceLocator_Directive *msg) { return UPB_READ_ONEOF(msg, const udpa_core_v1_ResourceLocator*, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 1, NULL); }
135
+ UPB_INLINE bool udpa_core_v1_ResourceLocator_Directive_has_entry(const udpa_core_v1_ResourceLocator_Directive *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 2; }
136
+ UPB_INLINE upb_strview udpa_core_v1_ResourceLocator_Directive_entry(const udpa_core_v1_ResourceLocator_Directive *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 2, upb_strview_make("", strlen(""))); }
137
+
138
+ UPB_INLINE void udpa_core_v1_ResourceLocator_Directive_set_alt(udpa_core_v1_ResourceLocator_Directive *msg, udpa_core_v1_ResourceLocator* value) {
139
+ UPB_WRITE_ONEOF(msg, udpa_core_v1_ResourceLocator*, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 1);
140
+ }
141
+ UPB_INLINE struct udpa_core_v1_ResourceLocator* udpa_core_v1_ResourceLocator_Directive_mutable_alt(udpa_core_v1_ResourceLocator_Directive *msg, upb_arena *arena) {
142
+ struct udpa_core_v1_ResourceLocator* sub = (struct udpa_core_v1_ResourceLocator*)udpa_core_v1_ResourceLocator_Directive_alt(msg);
143
+ if (sub == NULL) {
144
+ sub = (struct udpa_core_v1_ResourceLocator*)_upb_msg_new(&udpa_core_v1_ResourceLocator_msginit, arena);
145
+ if (!sub) return NULL;
146
+ udpa_core_v1_ResourceLocator_Directive_set_alt(msg, sub);
147
+ }
148
+ return sub;
149
+ }
150
+ UPB_INLINE void udpa_core_v1_ResourceLocator_Directive_set_entry(udpa_core_v1_ResourceLocator_Directive *msg, upb_strview value) {
151
+ UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 2);
152
+ }
153
+
154
+ #ifdef __cplusplus
155
+ } /* extern "C" */
156
+ #endif
157
+
158
+ #include "upb/port_undef.inc"
159
+
160
+ #endif /* UDPA_CORE_V1_RESOURCE_LOCATOR_PROTO_UPB_H_ */
@@ -0,0 +1,36 @@
1
+ /* This file was generated by upbc (the upb compiler) from the input
2
+ * file:
3
+ *
4
+ * udpa/core/v1/resource_name.proto
5
+ *
6
+ * Do not edit -- your changes will be discarded when the file is
7
+ * regenerated. */
8
+
9
+ #include <stddef.h>
10
+ #include "upb/msg.h"
11
+ #include "udpa/core/v1/resource_name.upb.h"
12
+ #include "udpa/annotations/status.upb.h"
13
+ #include "udpa/core/v1/context_params.upb.h"
14
+ #include "validate/validate.upb.h"
15
+
16
+ #include "upb/port_def.inc"
17
+
18
+ static const upb_msglayout *const udpa_core_v1_ResourceName_submsgs[1] = {
19
+ &udpa_core_v1_ContextParams_msginit,
20
+ };
21
+
22
+ static const upb_msglayout_field udpa_core_v1_ResourceName__fields[4] = {
23
+ {1, UPB_SIZE(20, 40), 0, 0, 9, 3},
24
+ {2, UPB_SIZE(0, 0), 0, 0, 9, 1},
25
+ {3, UPB_SIZE(8, 16), 0, 0, 9, 1},
26
+ {4, UPB_SIZE(16, 32), 0, 0, 11, 1},
27
+ };
28
+
29
+ const upb_msglayout udpa_core_v1_ResourceName_msginit = {
30
+ &udpa_core_v1_ResourceName_submsgs[0],
31
+ &udpa_core_v1_ResourceName__fields[0],
32
+ UPB_SIZE(24, 48), 4, false,
33
+ };
34
+
35
+ #include "upb/port_undef.inc"
36
+
@@ -0,0 +1,84 @@
1
+ /* This file was generated by upbc (the upb compiler) from the input
2
+ * file:
3
+ *
4
+ * udpa/core/v1/resource_name.proto
5
+ *
6
+ * Do not edit -- your changes will be discarded when the file is
7
+ * regenerated. */
8
+
9
+ #ifndef UDPA_CORE_V1_RESOURCE_NAME_PROTO_UPB_H_
10
+ #define UDPA_CORE_V1_RESOURCE_NAME_PROTO_UPB_H_
11
+
12
+ #include "upb/msg.h"
13
+ #include "upb/decode.h"
14
+ #include "upb/encode.h"
15
+
16
+ #include "upb/port_def.inc"
17
+
18
+ #ifdef __cplusplus
19
+ extern "C" {
20
+ #endif
21
+
22
+ struct udpa_core_v1_ResourceName;
23
+ typedef struct udpa_core_v1_ResourceName udpa_core_v1_ResourceName;
24
+ extern const upb_msglayout udpa_core_v1_ResourceName_msginit;
25
+ struct udpa_core_v1_ContextParams;
26
+ extern const upb_msglayout udpa_core_v1_ContextParams_msginit;
27
+
28
+
29
+ /* udpa.core.v1.ResourceName */
30
+
31
+ UPB_INLINE udpa_core_v1_ResourceName *udpa_core_v1_ResourceName_new(upb_arena *arena) {
32
+ return (udpa_core_v1_ResourceName *)_upb_msg_new(&udpa_core_v1_ResourceName_msginit, arena);
33
+ }
34
+ UPB_INLINE udpa_core_v1_ResourceName *udpa_core_v1_ResourceName_parse(const char *buf, size_t size,
35
+ upb_arena *arena) {
36
+ udpa_core_v1_ResourceName *ret = udpa_core_v1_ResourceName_new(arena);
37
+ return (ret && upb_decode(buf, size, ret, &udpa_core_v1_ResourceName_msginit, arena)) ? ret : NULL;
38
+ }
39
+ UPB_INLINE char *udpa_core_v1_ResourceName_serialize(const udpa_core_v1_ResourceName *msg, upb_arena *arena, size_t *len) {
40
+ return upb_encode(msg, &udpa_core_v1_ResourceName_msginit, arena, len);
41
+ }
42
+
43
+ UPB_INLINE upb_strview const* udpa_core_v1_ResourceName_id(const udpa_core_v1_ResourceName *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); }
44
+ UPB_INLINE upb_strview udpa_core_v1_ResourceName_authority(const udpa_core_v1_ResourceName *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
45
+ UPB_INLINE upb_strview udpa_core_v1_ResourceName_resource_type(const udpa_core_v1_ResourceName *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview); }
46
+ UPB_INLINE bool udpa_core_v1_ResourceName_has_context(const udpa_core_v1_ResourceName *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
47
+ UPB_INLINE const struct udpa_core_v1_ContextParams* udpa_core_v1_ResourceName_context(const udpa_core_v1_ResourceName *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const struct udpa_core_v1_ContextParams*); }
48
+
49
+ UPB_INLINE upb_strview* udpa_core_v1_ResourceName_mutable_id(udpa_core_v1_ResourceName *msg, size_t *len) {
50
+ return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len);
51
+ }
52
+ UPB_INLINE upb_strview* udpa_core_v1_ResourceName_resize_id(udpa_core_v1_ResourceName *msg, size_t len, upb_arena *arena) {
53
+ return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(20, 40), len, UPB_TYPE_STRING, arena);
54
+ }
55
+ UPB_INLINE bool udpa_core_v1_ResourceName_add_id(udpa_core_v1_ResourceName *msg, upb_strview val, upb_arena *arena) {
56
+ return _upb_array_append_accessor(msg, UPB_SIZE(20, 40), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
57
+ arena);
58
+ }
59
+ UPB_INLINE void udpa_core_v1_ResourceName_set_authority(udpa_core_v1_ResourceName *msg, upb_strview value) {
60
+ *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
61
+ }
62
+ UPB_INLINE void udpa_core_v1_ResourceName_set_resource_type(udpa_core_v1_ResourceName *msg, upb_strview value) {
63
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview) = value;
64
+ }
65
+ UPB_INLINE void udpa_core_v1_ResourceName_set_context(udpa_core_v1_ResourceName *msg, struct udpa_core_v1_ContextParams* value) {
66
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 32), struct udpa_core_v1_ContextParams*) = value;
67
+ }
68
+ UPB_INLINE struct udpa_core_v1_ContextParams* udpa_core_v1_ResourceName_mutable_context(udpa_core_v1_ResourceName *msg, upb_arena *arena) {
69
+ struct udpa_core_v1_ContextParams* sub = (struct udpa_core_v1_ContextParams*)udpa_core_v1_ResourceName_context(msg);
70
+ if (sub == NULL) {
71
+ sub = (struct udpa_core_v1_ContextParams*)_upb_msg_new(&udpa_core_v1_ContextParams_msginit, arena);
72
+ if (!sub) return NULL;
73
+ udpa_core_v1_ResourceName_set_context(msg, sub);
74
+ }
75
+ return sub;
76
+ }
77
+
78
+ #ifdef __cplusplus
79
+ } /* extern "C" */
80
+ #endif
81
+
82
+ #include "upb/port_undef.inc"
83
+
84
+ #endif /* UDPA_CORE_V1_RESOURCE_NAME_PROTO_UPB_H_ */